mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-18 14:11:38 -08:00
(abbreviate-file-name): Don't convert / to ~/ when the home dir is /.
This commit is contained in:
parent
0dee8d9be9
commit
ca33ccb548
1 changed files with 4 additions and 1 deletions
|
|
@ -545,7 +545,10 @@ Type \\[describe-variable] directory-abbrev-alist RET for more information."
|
|||
|
||||
;; If FILENAME starts with the abbreviated homedir,
|
||||
;; make it start with `~' instead.
|
||||
(if (string-match abbreviated-home-dir filename)
|
||||
(if (and (string-match abbreviated-home-dir filename)
|
||||
;; If the home dir is just /, don't change it.
|
||||
(not (and (= (match-end 0) 1)
|
||||
(= (aref filename 0) ?/))))
|
||||
(setq filename
|
||||
(concat "~"
|
||||
;; If abbreviated-home-dir ends with a slash,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue