mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-21 13:10:37 -08:00
(abbreviate-file-name): Add save-match-data.
This commit is contained in:
parent
d735cf50f7
commit
f663a1ce37
1 changed files with 42 additions and 41 deletions
|
|
@ -1275,6 +1275,7 @@ Choose the buffer's name using `generate-new-buffer-name'."
|
||||||
This also substitutes \"~\" for the user's home directory and
|
This also substitutes \"~\" for the user's home directory and
|
||||||
removes automounter prefixes (see the variable `automount-dir-prefix')."
|
removes automounter prefixes (see the variable `automount-dir-prefix')."
|
||||||
;; Get rid of the prefixes added by the automounter.
|
;; Get rid of the prefixes added by the automounter.
|
||||||
|
(save-match-data
|
||||||
(if (and automount-dir-prefix
|
(if (and automount-dir-prefix
|
||||||
(string-match automount-dir-prefix filename)
|
(string-match automount-dir-prefix filename)
|
||||||
(file-exists-p (file-name-directory
|
(file-exists-p (file-name-directory
|
||||||
|
|
@ -1316,7 +1317,7 @@ removes automounter prefixes (see the variable `automount-dir-prefix')."
|
||||||
(concat "~"
|
(concat "~"
|
||||||
(match-string 1 filename)
|
(match-string 1 filename)
|
||||||
(substring filename (match-end 0)))))
|
(substring filename (match-end 0)))))
|
||||||
filename))
|
filename)))
|
||||||
|
|
||||||
(defcustom find-file-not-true-dirname-list nil
|
(defcustom find-file-not-true-dirname-list nil
|
||||||
"*List of logical names for which visiting shouldn't save the true dirname.
|
"*List of logical names for which visiting shouldn't save the true dirname.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue