Fix `speedbar-directory-buttons' when using Tramp
* lisp/speedbar.el (speedbar-directory-buttons): Make speedbar work with directories accessed via Tramp (bug#44622). Copyright-paperwork-exempt: yes
This commit is contained in:
parent
61dca6e92a
commit
5afad3918b
1 changed files with 2 additions and 2 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue