diff options
| author | Richard M. Stallman | 1993-06-10 20:44:12 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-06-10 20:44:12 +0000 |
| commit | e98dda89869c4aee4291c9976cac54af56ffd835 (patch) | |
| tree | 885e9d71095db6e9d4f20ff769e1d1e51e4e7433 | |
| parent | a6c5a8dd703e64d102e90363e9dd44c187c9c862 (diff) | |
| download | emacs-e98dda89869c4aee4291c9976cac54af56ffd835.tar.gz emacs-e98dda89869c4aee4291c9976cac54af56ffd835.zip | |
(abbreviate-file-name): Make abbreviated-home-dir
from `~/', not from just `~'.
| -rw-r--r-- | lisp/files.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el index b7cbb96db2b..37ad1c980bc 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -509,10 +509,12 @@ Type \\[describe-variable] directory-abbrev-alist RET for more information." | |||
| 509 | ;; Compute and save the abbreviated homedir name. | 509 | ;; Compute and save the abbreviated homedir name. |
| 510 | ;; We defer computing this until the first time it's needed, to | 510 | ;; We defer computing this until the first time it's needed, to |
| 511 | ;; give time for directory-abbrev-alist to be set properly. | 511 | ;; give time for directory-abbrev-alist to be set properly. |
| 512 | ;; We include a slash at the end, to avoid spurious matches | ||
| 513 | ;; such as `/usr/foobar' when the home dir is `/usr/foo'. | ||
| 512 | (or abbreviated-home-dir | 514 | (or abbreviated-home-dir |
| 513 | (setq abbreviated-home-dir | 515 | (setq abbreviated-home-dir |
| 514 | (let ((abbreviated-home-dir "$foo")) | 516 | (let ((abbreviated-home-dir "$foo")) |
| 515 | (concat "^" (abbreviate-file-name (expand-file-name "~")))))) | 517 | (concat "^" (abbreviate-file-name (expand-file-name "~/")))))) |
| 516 | ;; If FILENAME starts with the abbreviated homedir, | 518 | ;; If FILENAME starts with the abbreviated homedir, |
| 517 | ;; make it start with `~' instead. | 519 | ;; make it start with `~' instead. |
| 518 | (if (string-match abbreviated-home-dir filename) | 520 | (if (string-match abbreviated-home-dir filename) |