From 5ecf39a5eab1c697b5d15c3b5df230bf7d1a11b2 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sat, 31 Jul 2021 14:54:52 +0200 Subject: [PATCH] Revert "Fix `speedbar-directory-buttons' when using Tramp" This reverts commit 5afad3918bc8816b74e8efcff9cc441785446aa6. This patch can't possibly be correct, and it breaks the stated interface. --- lisp/speedbar.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/speedbar.el b/lisp/speedbar.el index 4666026f357..34fbec9c218 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -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)) -- 2.39.2