Add save-match-data to abbreviate-file-name (Bug#32201)
* 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.
This commit is contained in:
parent
47f75b1ba0
commit
59e8533286
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue