browse-kill-ring/browse-kill-ring — pull request #29 by T-J-Teru (2014-08-18 11:38:07+00:00)
Title: Highlight current entry now works with manual movement.

The highlighting of the current entry in the browse-kill-ring buffer
previously only worked when using the special forward/backward by entry
commands, though these are certainly the easiest way to navigate the
browse-kill-ring buffer, sometimes, a user might want to make use of the
manual movement commands.

This patch reworks the mechanism used to highlight the current entry so
that it will work whichever approach is used to navigate the
browse-kill-ring buffer.

ChangeLog:
(browse-kill-ring-preview-overlay) New variable, tracks previously
highlighted entry in the browse-kill-ring buffer.
(browse-kill-ring-update-highlighed-entry) New function, entry
point for highlighting entry in browse-kill-ring buffer. Can be
called even if the highlighting is turned off as it contains the
check.
(browse-kill-ring-clear-highlighted-entry) New function, clears
the highlighting off the current entry in the browse-kill-ring
buffer.
(browse-kill-ring-update-highlighed-entry-1) New function, worker
core for browse-kill-ring-update-highlighed-entry, selects correct
entry to highlight.
(browse-kill-ring-forward) Remove code to update highlighting of
entries in the browse-kill-ring buffer.
(browse-kill-ring-setup) Register a post-command-hook to update
the highlighting of the correct entry in the browse-kill-ring
buffer.