Skip to content

Commit

Permalink
Remove browse-kill-ring-no-duplicates.
Browse files Browse the repository at this point in the history
The browse-kill-ring-no-duplicates functionality is not related to
browsing the kill-ring, but is instead about controlling what is placed
in to the kill-ring.

This functionality, if it is wanted at all, should be moved into a new
package, the browse-kill-ring package should focus on its core task.
  • Loading branch information
T-J-Teru committed Apr 29, 2015
1 parent 2a7acf9 commit 9ebb9ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 32 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
2015-04-27 Andrew Burgess <andrew.burgess@embecosm.com>
Remove `browse-kill-ring-no-duplicates'. This functionality was
never related to browsing the kill-ring, and would be better moved
in to a different package.

2014-11-04 Toon Claes <toon@tonotdo.com>
v2.0 release:
Legacy code is removed, README is converted and
Expand Down
32 changes: 0 additions & 32 deletions browse-kill-ring.el
Expand Up @@ -175,38 +175,6 @@ if non-nil, then display leftmost(last) duplicate items in `kill-ring'."
:type 'boolean
:group 'browse-kill-ring)

(defadvice kill-new (around browse-kill-ring-no-kill-new-duplicates)
"An advice for not adding duplicate elements to `kill-ring'.
Even after being \"activated\", this advice will only modify the
behavior of `kill-new' when `browse-kill-ring-no-duplicates'
is non-nil."
(if browse-kill-ring-no-duplicates
(setq kill-ring (delete (ad-get-arg 0) kill-ring)))
ad-do-it)

(defcustom browse-kill-ring-no-duplicates nil
"If non-nil, then the `b-k-r-no-kill-new-duplicates' advice will operate.
This means that duplicate entries won't be added to the `kill-ring'
when you call `kill-new'.
If you set this variable via customize, the advice will be activated
or deactivated automatically. Otherwise, to enable the advice, add
B (ad-enable-advice 'kill-new 'around 'browse-kill-ring-no-kill-new-duplicates)
(ad-activate 'kill-new)
to your init file."
:type 'boolean
:set (lambda (symbol value)
(set symbol value)
(if value
(ad-enable-advice 'kill-new 'around
'browse-kill-ring-no-kill-new-duplicates)
(ad-disable-advice 'kill-new 'around
'browse-kill-ring-no-kill-new-duplicates))
(ad-activate 'kill-new))
:group 'browse-kill-ring)

(defcustom browse-kill-ring-depropertize nil
"If non-nil, remove text properties from `kill-ring' items.
This only changes the items for display and insertion from
Expand Down

0 comments on commit 9ebb9ad

Please sign in to comment.