Subject: Re: bug#10275: speedbar highlights first selected item in speedbar-highlight-face

From: "Eric M. Ludlam" <[email-masked]>
Date: Wed, 14 Dec 2011 18:06:18 -0500

On 12/14/2011 01:20 PM, martin rudalics wrote:
>  > IOW, the bug is in removing the highlight when selecting subsequent
> items.
>
> Not really. FWIW the bug happens because `handle-switch-frame' runs
> `pre-command-hook', something Eric probably didn't expect. Switching
> the frame is needed because the mouse click selects the speedbar frame
> and we immediately want to return to the frame where the source file is
> shown. But I don't understand why de-highlighting doesn't occur when
> hitting RET in the speedbar or switching to another buffer with the
> mouse.

I wrote that bit of code a long time ago.  The idea is to just show the 
line of interest in an easy to identify way, but have the highlight go 
away on the next keypress.

It seems like all the frame switching running the hook is defeating the 
mechanism it was using.

It could be that in speedbar-tag-find just swapping the last two lines 
is sufficient to move the post-command-hook execution to the right time.

Such a patch should be sent to the Emacs maintainers, as I haven't been 
maintaining speedbar directly lately.

Eric