summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2021-07-31 14:54:52 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2021-07-31 14:54:52 +0200
commit5ecf39a5eab1c697b5d15c3b5df230bf7d1a11b2 (patch)
treef85c890928f954eed01f0a723cd65f808da48071
parent32b9c7d06f774b420b5d2cfbbdbb447f542fc88e (diff)
downloademacs-5ecf39a5eab1c697b5d15c3b5df230bf7d1a11b2.tar.gz
emacs-5ecf39a5eab1c697b5d15c3b5df230bf7d1a11b2.tar.bz2
emacs-5ecf39a5eab1c697b5d15c3b5df230bf7d1a11b2.zip
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.
-rw-r--r--lisp/speedbar.el4
1 files 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))