# HG changeset patch # User Richard M. Stallman # Date 739745052 0 # Node ID 386094c1a5693277ed41bf5a7c93a6b476b78d48 # Parent 739ba36097c99f7e25303d1b2ca1b4fb306d8aa1 (abbreviate-file-name): Make abbreviated-home-dir from `~/', not from just `~'. diff -r 739ba36097c9 -r 386094c1a569 lisp/files.el --- a/lisp/files.el Thu Jun 10 20:35:05 1993 +0000 +++ b/lisp/files.el Thu Jun 10 20:44:12 1993 +0000 @@ -509,10 +509,12 @@ ;; Compute and save the abbreviated homedir name. ;; We defer computing this until the first time it's needed, to ;; give time for directory-abbrev-alist to be set properly. + ;; We include a slash at the end, to avoid spurious matches + ;; such as `/usr/foobar' when the home dir is `/usr/foo'. (or abbreviated-home-dir (setq abbreviated-home-dir (let ((abbreviated-home-dir "$foo")) - (concat "^" (abbreviate-file-name (expand-file-name "~")))))) + (concat "^" (abbreviate-file-name (expand-file-name "~/")))))) ;; If FILENAME starts with the abbreviated homedir, ;; make it start with `~' instead. (if (string-match abbreviated-home-dir filename)