Fix speedbar highlighting bug.

* lisp/speedbar.el (speedbar-unhighlight-one-tag-line): Avoid
unhighlighting due to frame switching.

Fixes: debbugs:10275
This commit is contained in:
Martin Rudalics 2012-03-10 15:58:54 +08:00 committed by Chong Yidong
parent 1de11f569d
commit 570a171480
2 changed files with 10 additions and 5 deletions

View 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):

View 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."