From: Martin Rudalics Date: Sat, 10 Mar 2012 07:58:54 +0000 (+0800) Subject: Fix speedbar highlighting bug. X-Git-Tag: emacs-pretest-24.0.05~121 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=570a1714808328275b04cb3d9a10cb7f7355c70e;p=emacs.git Fix speedbar highlighting bug. * lisp/speedbar.el (speedbar-unhighlight-one-tag-line): Avoid unhighlighting due to frame switching. Fixes: debbugs:10275 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c3b28cd8777..531c363d3f0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-03-10 Martin Rudalics + + * speedbar.el (speedbar-unhighlight-one-tag-line): Avoid + unhighlighting due to frame switching (Bug#10275). + 2012-03-10 Chong Yidong * minibuffer.el (completion-in-region, completion-help-at-point): diff --git a/lisp/speedbar.el b/lisp/speedbar.el index 89211b2b86e..bb1debb4552 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -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."