diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/speedbar.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/speedbar.el b/lisp/speedbar.el index 991c8a33d46..3619b23d9e6 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -1874,9 +1874,9 @@ matches the user directory ~, then it is replaced with a ~. INDEX is not used, but is required by the caller." (let* ((tilde (expand-file-name "~/")) (dd (expand-file-name directory)) - (junk (string-match (regexp-quote tilde) dd)) + (junk (string-prefix-p "~/" dd)) (displayme (if junk - (concat "~/" (substring dd (match-end 0))) + (concat "~/" (substring dd 2 nil)) dd)) (p (point))) (if (string-match "^~[/\\]?\\'" displayme) (setq displayme tilde)) |