changeset 7440:1c0885a92832

(abbreviate-file-name): Add special case for ms-dos. Delete code that checked for abbreviated-home-dir ending in /; it never did anything.
author Richard M. Stallman <rms@gnu.org>
date Tue, 10 May 1994 21:00:32 +0000
parents 28b0a94bd673
children 7f25bd8883e6
files lisp/files.el
diffstat 1 files changed, 4 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Tue May 10 20:50:05 1994 +0000
+++ b/lisp/files.el	Tue May 10 21:00:32 1994 +0000
@@ -556,19 +556,12 @@
     (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) ?/))))
+		       (= (aref filename 0) ?/)))
+	     (not (and (eq system-type 'ms-dos)
+		       (save-match-data
+			 (string-match "^[a-zA-Z]:/$" filename)))))
 	(setq filename
 	      (concat "~"
-		      ;; If abbreviated-home-dir ends with a slash,
-		      ;; don't remove the corresponding slash from
-		      ;; filename.  On MS-DOS and OS/2, you can have
-		      ;; home directories like "g:/", in which it is
-		      ;; important not to remove the slash.  And what
-		      ;; about poor root on Unix systems?
-		      (if (eq ?/ (aref abbreviated-home-dir
-				       (1- (length abbreviated-home-dir))))
-			  "/"
-			"")
 		      (substring filename (match-beginning 1) (match-end 1))
 		      (substring filename (match-end 0)))))
     filename))