1
Fork 0
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:
Richard M. Stallman 1994-01-14 18:06:40 +00:00
parent 0dee8d9be9
commit ca33ccb548

View file

@ -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,