From: Richard M. Stallman Date: Tue, 10 May 1994 21:00:32 +0000 (+0000) Subject: (abbreviate-file-name): Add special case for ms-dos. X-Git-Tag: emacs-19.34~8413 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=288201bd91468ff41caefe3b8145a1912f96bf6b;p=emacs.git (abbreviate-file-name): Add special case for ms-dos. Delete code that checked for abbreviated-home-dir ending in /; it never did anything. --- diff --git a/lisp/files.el b/lisp/files.el index eacb4f01eaa..9d60132d495 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -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))