diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-05-10 21:00:32 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-05-10 21:00:32 +0000 |
commit | 288201bd91468ff41caefe3b8145a1912f96bf6b (patch) | |
tree | cc69c9dfcefbd438ed27911499e3ffe9ccbc8778 /lisp/files.el | |
parent | d6dddccbb99183dd644ef5d3e6addee4fb064c78 (diff) | |
download | emacs-288201bd91468ff41caefe3b8145a1912f96bf6b.tar.gz emacs-288201bd91468ff41caefe3b8145a1912f96bf6b.tar.bz2 emacs-288201bd91468ff41caefe3b8145a1912f96bf6b.zip |
(abbreviate-file-name): Add special case for ms-dos.
Delete code that checked for abbreviated-home-dir ending in /;
it never did anything.
Diffstat (limited to 'lisp/files.el')
-rw-r--r-- | lisp/files.el | 15 |
1 files changed, 4 insertions, 11 deletions
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)) |