[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp ChangeLog simple.el
From: |
Sam Steingold |
Subject: |
[Emacs-diffs] emacs/lisp ChangeLog simple.el |
Date: |
Thu, 27 Aug 2009 14:56:22 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Sam Steingold <sds> 09/08/27 14:56:21
Modified files:
lisp : ChangeLog simple.el
Log message:
(kill-do-not-save-duplicates): New user option.
(kill-new): When it is non-nil, and the new string is the same as
the latest kill, set replace to t to avoid duplicates in kill-ring.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.16027&r2=1.16028
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/simple.el?cvsroot=emacs&r1=1.1006&r2=1.1007
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.16027
retrieving revision 1.16028
diff -u -b -r1.16027 -r1.16028
--- ChangeLog 27 Aug 2009 13:50:59 -0000 1.16027
+++ ChangeLog 27 Aug 2009 14:56:17 -0000 1.16028
@@ -1,3 +1,9 @@
+2009-08-27 Sam Steingold <address@hidden>
+
+ * simple.el (kill-do-not-save-duplicates): New user option.
+ (kill-new): When it is non-nil, and the new string is the same as
+ the latest kill, set replace to t to avoid duplicates in kill-ring.
+
2009-08-19 Julian Scheid <address@hidden> (tiny change)
* net/tramp.el (tramp-handle-process-file): Do not flush all
Index: simple.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/simple.el,v
retrieving revision 1.1006
retrieving revision 1.1007
diff -u -b -r1.1006 -r1.1007
--- simple.el 26 Aug 2009 20:55:43 -0000 1.1006
+++ simple.el 27 Aug 2009 14:56:21 -0000 1.1007
@@ -2805,6 +2805,12 @@
:group 'killing
:version "23.2")
+(defcustom kill-do-not-save-duplicates nil
+ "Do not add a new string to `kill-ring' when it is the same as the last one."
+ :type 'boolean
+ :group 'killing
+ :version "23.2")
+
(defun kill-new (string &optional replace yank-handler)
"Make STRING the latest kill in the kill ring.
Set `kill-ring-yank-pointer' to point to it.
@@ -2832,6 +2838,9 @@
(if yank-handler
(signal 'args-out-of-range
(list string "yank-handler specified for empty string"))))
+ (when (and kill-do-not-save-duplicates
+ (equal string (car kill-ring)))
+ (setq replace t))
(if (fboundp 'menu-bar-update-yank-menu)
(menu-bar-update-yank-menu string (and replace (car kill-ring))))
(when save-interprogram-paste-before-kill