aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/files.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 688b71b5bd4..dc07a02473a 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -520,7 +520,9 @@ Type \\[describe-variable] directory-abbrev-alist RET for more information."
520 (or abbreviated-home-dir 520 (or abbreviated-home-dir
521 (setq abbreviated-home-dir 521 (setq abbreviated-home-dir
522 (let ((abbreviated-home-dir "$foo")) 522 (let ((abbreviated-home-dir "$foo"))
523 (concat "^" (abbreviate-file-name (expand-file-name "~/")))))) 523 (concat "^" (abbreviate-file-name (expand-file-name "~"))
524 "\\(/\\|$\\)"))))
525
524 ;; If FILENAME starts with the abbreviated homedir, 526 ;; If FILENAME starts with the abbreviated homedir,
525 ;; make it start with `~' instead. 527 ;; make it start with `~' instead.
526 (if (string-match abbreviated-home-dir filename) 528 (if (string-match abbreviated-home-dir filename)
@@ -536,6 +538,7 @@ Type \\[describe-variable] directory-abbrev-alist RET for more information."
536 (1- (length abbreviated-home-dir)))) 538 (1- (length abbreviated-home-dir))))
537 "/" 539 "/"
538 "") 540 "")
541 (substring filename (match-beginning 1) (match-end 1))
539 (substring filename (match-end 0))))) 542 (substring filename (match-end 0)))))
540 filename)) 543 filename))
541 544