diff options
author | Noam Postavsky <npostavs@gmail.com> | 2018-07-18 18:45:47 -0400 |
---|---|---|
committer | Noam Postavsky <npostavs@gmail.com> | 2018-07-21 21:07:07 -0400 |
commit | 59e8533286cc8b5abc80b0966ef4b9fb676fbdfe (patch) | |
tree | 1462067e51d6ce0bcd64289cc33652f6c3de0ae4 /lisp/files.el | |
parent | 47f75b1ba0246b5d770fbb52e0fa3e00f9f83ffb (diff) | |
download | emacs-59e8533286cc8b5abc80b0966ef4b9fb676fbdfe.tar.gz |
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.
Diffstat (limited to 'lisp/files.el')
-rw-r--r-- | lisp/files.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el index fb8c34bcae8..4eb1560a20d 100644 --- 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) |