]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix speedbar highlighting bug.
authorMartin Rudalics <rudalics@gmx.at>
Sat, 10 Mar 2012 07:58:54 +0000 (15:58 +0800)
committerChong Yidong <cyd@gnu.org>
Sat, 10 Mar 2012 07:58:54 +0000 (15:58 +0800)
* lisp/speedbar.el (speedbar-unhighlight-one-tag-line): Avoid
unhighlighting due to frame switching.

Fixes: debbugs:10275
lisp/ChangeLog
lisp/speedbar.el

index c3b28cd8777d09e41defb6ca4b44571c392c6960..531c363d3f061deccb4a1eee4a0fd9b520dd47bc 100644 (file)
@@ -1,3 +1,8 @@
+2012-03-10  Martin Rudalics  <rudalics@gmx.at>
+
+       * speedbar.el (speedbar-unhighlight-one-tag-line): Avoid
+       unhighlighting due to frame switching (Bug#10275).
+
 2012-03-10  Chong Yidong  <cyd@gnu.org>
 
        * minibuffer.el (completion-in-region, completion-help-at-point):
index 89211b2b86e9d6f25ea7c42e2e5291a37e177fd8..bb1debb45528b8847a27e546c857ea238428593b 100644 (file)
@@ -3987,11 +3987,11 @@ TEXT is the buffer's name, TOKEN and INDENT are unused."
 
 (defun speedbar-unhighlight-one-tag-line ()
   "Unhighlight the currently highlighted line."
-  (if speedbar-highlight-one-tag-line
-      (progn
-       (speedbar-delete-overlay speedbar-highlight-one-tag-line)
-       (setq speedbar-highlight-one-tag-line nil)))
-  (remove-hook 'pre-command-hook 'speedbar-unhighlight-one-tag-line))
+  (when (and speedbar-highlight-one-tag-line
+            (not (eq this-command 'handle-switch-frame)))
+    (speedbar-delete-overlay speedbar-highlight-one-tag-line)
+    (setq speedbar-highlight-one-tag-line nil)
+    (remove-hook 'pre-command-hook 'speedbar-unhighlight-one-tag-line)))
 
 (defun speedbar-recenter-to-top ()
   "Recenter the current buffer so point is on the top of the window."