[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 5ecf39a: Revert "Fix `speedbar-directory-buttons' when using Tram

From: Lars Ingebrigtsen
Subject: master 5ecf39a: Revert "Fix `speedbar-directory-buttons' when using Tramp"
Date: Sat, 31 Jul 2021 08:57:01 -0400 (EDT)

branch: master
commit 5ecf39a5eab1c697b5d15c3b5df230bf7d1a11b2
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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 4666026..34fbec9 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)))
         (p (point)))
     (if (string-match "^~[/\\]?\\'" displayme) (setq displayme tilde))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]