Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
e98dda89
Commit
e98dda89
authored
Jun 10, 1993
by
Richard M. Stallman
Browse files
(abbreviate-file-name): Make abbreviated-home-dir
from `~/', not from just `~'.
parent
a6c5a8dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
lisp/files.el
lisp/files.el
+3
-1
No files found.
lisp/files.el
View file @
e98dda89
...
...
@@ -509,10 +509,12 @@ Type \\[describe-variable] directory-abbrev-alist RET for more information."
;; 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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment