1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Revert "Fix `speedbar-directory-buttons' when using Tramp"

This reverts commit 5afad3918b.

This patch can't possibly be correct, and it breaks the stated interface.
This commit is contained in:
Lars Ingebrigtsen 2021-07-31 14:54:52 +02:00
parent 32b9c7d06f
commit 5ecf39a5ea

View file

@ -1822,9 +1822,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-prefix-p "~/" dd))
(junk (string-match (regexp-quote tilde) dd))
(displayme (if junk
(concat "~/" (substring dd 2 nil))
(concat "~/" (substring dd (match-end 0)))
dd))
(p (point)))
(if (string-match "^~[/\\]?\\'" displayme) (setq displayme tilde))