Mercurial > emacs
diff lisp/files.el @ 5582:cc4892ee6807
(abbreviate-file-name): Don't convert / to ~/ when the home dir is /.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 14 Jan 1994 18:06:40 +0000 |
parents | d9fa38b889c9 |
children | 777597fbd048 |
line wrap: on
line diff
--- a/lisp/files.el Fri Jan 14 17:58:37 1994 +0000 +++ b/lisp/files.el Fri Jan 14 18:06:40 1994 +0000 @@ -545,7 +545,10 @@ ;; 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,