changeset 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 92a0425caeea
children 1c084b38abc1
files lisp/files.el
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
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,