Use a kill-buffer-hook to ensure that the preview is removed.

Previously, if the `*Kill Ring*' buffer is killed in by calling
`kill-buffer' directly, rather than `browse-kill-ring-quit' then the
preview is left active.  After this patch the preview will be removed
even in this case.
Perform the quit action earlier.

Previously the `*Kill-Ring*' buffer is only closed after the item has
been inserted and the highlighting has finished (if highlighting of the
inserted item is turned on), this takes 0.5 seconds, and gives a user
experience that appears unresponsive.

After this patch when the user asks for insert and exit, we first
establish what will be inserted, then we close the `*Kill Ring*' buffer,
and then we insert and highlight the item.  This gives a much more
responsive user experience.
Merge branch 'cleanup-on-kill' of github.com:T-J-Teru/browse-kill-ring into T-J-Teru-cleanup-on-kill
Merge branch 'T-J-Teru-cleanup-on-kill'
Merge branch 'early-quit-v2' of github.com:T-J-Teru/browse-kill-ring into T-J-Teru-early-quit-v2
Merge branch 'T-J-Teru-early-quit-v2'
Fix bug in browse-kill-ring-occur.

The parameters to browse-kill-ring-setup have changed at some point in
the past, and browse-kill-ring-occur had not been update to the new
usage, with the result that browse-kill-ring-occur no longer worked.
Fixed in this commit, brings use of browse-kill-ring-setup up to date.

ChangeLog:

	Fix bug in `browse-kill-ring-occur' due to change in parameters of
	`browse-kill-ring-setup'.
Inhibit read only before deleting Kill Ring entries.

This fix is from http://bugs.debian.org/224751.  Disable all read only
properties before trying to delete an entry from the *Kill Ring*
buffer.
Delete items that are edited to the empty string.

When using the edit feature of browse-kill-ring, if an item is edited to
the empty string then it is deleted from the `kill-ring'.  Care is taken
to ensure that the correct entry is reselected after the delete in order
to give the same user experience as if the user had just chosen to
delete the item from the kill-ring with browse-kill-ring-delete.
Merge pull request #43 from T-J-Teru/inhibit-read-ony

Inhibit read only before deleting Kill Ring entries.
Merge branch 'edit-delete-empty-v4' of github.com:T-J-Teru/browse-kill-ring into T-J-Teru-edit-delete-empty-v4
Merge branch 'T-J-Teru-edit-delete-empty-v4'
Make error optional in browse-kill-ring-target-overlay-at.

Allow this function to return nil in the case where there's no suitable
overlay at POSITION.
Use -target-overlay-at for -current-string.

Code reuse, there's now a common piece of code that looks for suitable
overlays at a position, lets use it where we can.
Change -current-index to use -target-overlay-at.

Should better handle the case where there are other overlays active in
the browse-kill-ring buffer.
Update -forward to use -target-overlay-at not overlays-at.

This enables the code to handle the case where there are other, non
browse-kill-ring, overlays active in the *Kill Ring* buffer.
Update -edit to use -target-overlay-at not overlays-at.

This enables browse-kill-ring to handle the situation where there are
overlays active in the *Kill Ring* buffer that are not from
browse-kill-ring.
Handle non browse-kill-ring overlays during item highlight.

Use browse-kill-ring-target-overlay-at rather than overlays-at to allow
for non browse-kill-ring overlays that might exist in the *Kill Ring*
buffer.
Update -search-forward to use -target-overlay-at.

Update browse-kill-ring-search-forward to use
browse-kill-ring-target-overlay-at rather than overlays-at so that we
can support non browse-kill-ring overlays existing in the *Kill Ring*
buffer.
Merge pull request #47 from T-J-Teru/linum-fix

Support non browse-kill-ring overlays in the *Kill Ring* buffer.