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
3a8a836d
Commit
3a8a836d
authored
Jun 13, 1993
by
Richard M. Stallman
Browse files
(abbreviate-file-name): Match home dir with no / if nothing else follows.
parent
d90f825c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
lisp/files.el
lisp/files.el
+4
-1
No files found.
lisp/files.el
View file @
3a8a836d
...
...
@@ -520,7 +520,9 @@ Type \\[describe-variable] directory-abbrev-alist RET for more information."
(
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
)
...
...
@@ -536,6 +538,7 @@ Type \\[describe-variable] directory-abbrev-alist RET for more information."
(
1-
(
length
abbreviated-home-dir
))))
"/"
""
)
(
substring
filename
(
match-beginning
1
)
(
match-end
1
))
(
substring
filename
(
match-end
0
)))))
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