# HG changeset patch # User Richard M. Stallman # Date 758570800 0 # Node ID cc4892ee6807cafed3bad14425e6136a429abf8e # Parent 92a0425caeeaa0424bf44d3c9501fdf796e009ca (abbreviate-file-name): Don't convert / to ~/ when the home dir is /. diff -r 92a0425caeea -r cc4892ee6807 lisp/files.el --- 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,