projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
47f75b1
)
Add save-match-data to abbreviate-file-name (Bug#32201)
author
Noam Postavsky
<npostavs@gmail.com>
Wed, 18 Jul 2018 22:45:47 +0000
(18:45 -0400)
committer
Noam Postavsky
<npostavs@gmail.com>
Sun, 22 Jul 2018 01:07:07 +0000
(21:07 -0400)
* lisp/files.el (abbreviate-file-name): Save match-data around
expand-file-name; it is not guaranteed to preserve match-data, and may
well do so depending on what file handlers and hooks are in effect.
lisp/files.el
patch
|
blob
|
history
diff --git
a/lisp/files.el
b/lisp/files.el
index fb8c34bcae8a2bdbe30440dbb63fb93e1a4d6658..4eb1560a20de4d4d93e73588602295ec437d9c6a 100644
(file)
--- a/
lisp/files.el
+++ b/
lisp/files.el
@@
-1929,7
+1929,7
@@
started Emacs, set `abbreviated-home-dir' to nil so it will be recalculated)."
(save-match-data
(string-match "^[a-zA-`]:/$" filename))))
(equal (get 'abbreviated-home-dir 'home)
- (
expand-file-name "~"
)))
+ (
save-match-data (expand-file-name "~")
)))
(setq filename
(concat "~"
(match-string 1 filename)