emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/iedit 88101571fe 288/301: Make it an option to save occurr


From: ELPA Syncer
Subject: [nongnu] elpa/iedit 88101571fe 288/301: Make it an option to save occurrence in the kill ring
Date: Mon, 10 Jan 2022 22:59:11 -0500 (EST)

branch: elpa/iedit
commit 88101571fef0dbe8bd6a8e2f9399acd8072ba86c
Author: Victor <victorhge@gmail.com>
Commit: Victor <victorhge@gmail.com>

    Make it an option to save occurrence in the kill ring
    
    Some people think it is annoying.
    https://github.com/victorhge/iedit/issues/128#issue-891005221
    
    Th default value is still true.
---
 iedit.el | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/iedit.el b/iedit.el
old mode 100644
new mode 100755
index b9db552037..1ff33d7cc6
--- a/iedit.el
+++ b/iedit.el
@@ -1,6 +1,6 @@
 ;;; iedit.el --- Edit multiple regions in the same way simultaneously.
 
-;; Copyright (C) 2010 - 2019, 2020 Victor Ren
+;; Copyright (C) 2010 - 2019, 2020, 2021 Victor Ren
 
 ;; Time-stamp: <2021-01-16 13:48:39 Victor Ren>
 ;; Author: Victor Ren <victorhge@gmail.com>
@@ -122,6 +122,12 @@ is enabled on current defun."
   :type 'boolean
   :group 'iedit)
 
+(defcustom iedit-auto-save-occurrence-in-kill-ring t
+  "If no-nil, save the occurrence in the kill ring when exiting
+from iedit mode."
+  :type 'boolean
+  :group 'iedit)
+
 (defvar iedit-is-narrowed nil
   "This is buffer local variable which indicates if the buffer is
   narrowed by iedit temporarily.")
@@ -569,7 +575,7 @@ the initial string globally."
   (setq iedit-occurrence-type-global iedit-occurrence-type-local)
   (setq iedit-last-occurrence-global iedit-last-occurrence-local)
   (setq iedit-last-initial-string-global iedit-initial-string-local)
-  (if iedit-last-occurrence-local
+  (if (and iedit-auto-save-occurrence-in-kill-ring  
iedit-last-occurrence-local)
       (kill-new iedit-last-occurrence-local)) ; Make occurrence the latest 
kill in the kill ring.
   (setq iedit-num-lines-to-expand-up 0)
   (setq iedit-num-lines-to-expand-down 0)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]