Commit 2de9cc1a authored by Reuben Thomas's avatar Reuben Thomas Committed by Chong Yidong
Browse files

Handle git-style backup names in file-name-version-regexp (Bug#8159).

* files.el (file-name-version-regexp): Handle backup files of the
form `foo.js.~HEAD~1~' (Bug#8159).
parent 22c28cb8
2011-03-05 Reuben Thomas <rrt@sc3d.org>
* files.el (file-name-version-regexp): Handle backup files of the
form `foo.js.~HEAD~1~' (Bug#8159).
2011-03-05 Glenn Morris <rgm@gnu.org>
 
* eshell/esh-var.el: Don't require esh-test when compiling.
......
......@@ -3869,7 +3869,9 @@ BACKUPNAME is the backup file name, which is the old file renamed."
(set-file-selinux-context to-name context)))
(defvar file-name-version-regexp
"\\(?:~\\|\\.~[-[:alnum:]:#@^._]+~\\)"
"\\(?:~\\|\\.~[-[:alnum:]:#@^._]+\\(?:~[[:digit:]]+\\)?~\\)"
;; The last ~[[:digit]]+ matches relative versions in git,
;; e.g. `foo.js.~HEAD~1~'.
"Regular expression matching the backup/version part of a file name.
Used by `file-name-sans-versions'.")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment