]> git.eshelyaron.com Git - emacs.git/commitdiff
(abbreviate-file-name): Add special case for ms-dos.
authorRichard M. Stallman <rms@gnu.org>
Tue, 10 May 1994 21:00:32 +0000 (21:00 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 10 May 1994 21:00:32 +0000 (21:00 +0000)
Delete code that checked for abbreviated-home-dir ending in /;
it never did anything.

lisp/files.el

index eacb4f01eaad786a77b8c355f6995376b6a41787..9d60132d495b103a55e3f56db5631798425521c2 100644 (file)
@@ -556,19 +556,12 @@ Type \\[describe-variable] directory-abbrev-alist RET for more information."
     (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))