diff options
| author | Richard M. Stallman | 1994-01-14 18:06:40 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-01-14 18:06:40 +0000 |
| commit | ca33ccb548fe2ed658f97020ee97089c2160b72b (patch) | |
| tree | d8fdbe75d80c9f5ef4db968a09218e8c60640378 | |
| parent | 0dee8d9be9b39a50086fe074603534633d410f56 (diff) | |
| download | emacs-ca33ccb548fe2ed658f97020ee97089c2160b72b.tar.gz emacs-ca33ccb548fe2ed658f97020ee97089c2160b72b.zip | |
(abbreviate-file-name): Don't convert / to ~/ when the home dir is /.
| -rw-r--r-- | lisp/files.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el index d484fddb47c..47e2d74a16a 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -545,7 +545,10 @@ Type \\[describe-variable] directory-abbrev-alist RET for more information." | |||
| 545 | 545 | ||
| 546 | ;; If FILENAME starts with the abbreviated homedir, | 546 | ;; If FILENAME starts with the abbreviated homedir, |
| 547 | ;; make it start with `~' instead. | 547 | ;; make it start with `~' instead. |
| 548 | (if (string-match abbreviated-home-dir filename) | 548 | (if (and (string-match abbreviated-home-dir filename) |
| 549 | ;; If the home dir is just /, don't change it. | ||
| 550 | (not (and (= (match-end 0) 1) | ||
| 551 | (= (aref filename 0) ?/)))) | ||
| 549 | (setq filename | 552 | (setq filename |
| 550 | (concat "~" | 553 | (concat "~" |
| 551 | ;; If abbreviated-home-dir ends with a slash, | 554 | ;; If abbreviated-home-dir ends with a slash, |