diff options
| author | Richard M. Stallman | 1994-05-10 21:00:32 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-05-10 21:00:32 +0000 |
| commit | 288201bd91468ff41caefe3b8145a1912f96bf6b (patch) | |
| tree | cc69c9dfcefbd438ed27911499e3ffe9ccbc8778 | |
| parent | d6dddccbb99183dd644ef5d3e6addee4fb064c78 (diff) | |
| download | emacs-288201bd91468ff41caefe3b8145a1912f96bf6b.tar.gz 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.
| -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." | |||
| 556 | (if (and (string-match abbreviated-home-dir filename) | 556 | (if (and (string-match abbreviated-home-dir filename) |
| 557 | ;; If the home dir is just /, don't change it. | 557 | ;; If the home dir is just /, don't change it. |
| 558 | (not (and (= (match-end 0) 1) | 558 | (not (and (= (match-end 0) 1) |
| 559 | (= (aref filename 0) ?/)))) | 559 | (= (aref filename 0) ?/))) |
| 560 | (not (and (eq system-type 'ms-dos) | ||
| 561 | (save-match-data | ||
| 562 | (string-match "^[a-zA-Z]:/$" filename))))) | ||
| 560 | (setq filename | 563 | (setq filename |
| 561 | (concat "~" | 564 | (concat "~" |
| 562 | ;; If abbreviated-home-dir ends with a slash, | ||
| 563 | ;; don't remove the corresponding slash from | ||
| 564 | ;; filename. On MS-DOS and OS/2, you can have | ||
| 565 | ;; home directories like "g:/", in which it is | ||
| 566 | ;; important not to remove the slash. And what | ||
| 567 | ;; about poor root on Unix systems? | ||
| 568 | (if (eq ?/ (aref abbreviated-home-dir | ||
| 569 | (1- (length abbreviated-home-dir)))) | ||
| 570 | "/" | ||
| 571 | "") | ||
| 572 | (substring filename (match-beginning 1) (match-end 1)) | 565 | (substring filename (match-beginning 1) (match-end 1)) |
| 573 | (substring filename (match-end 0))))) | 566 | (substring filename (match-end 0))))) |
| 574 | filename)) | 567 | filename)) |