Commit ca33ccb5 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(abbreviate-file-name): Don't convert / to ~/ when the home dir is /.

parent 0dee8d9b
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment