[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/iedit afca4e6bbf 213/301: Rename hook functions
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/iedit afca4e6bbf 213/301: Rename hook functions |
Date: |
Mon, 10 Jan 2022 22:59:03 -0500 (EST) |
branch: elpa/iedit
commit afca4e6bbfb6f41e9c214ac453298d0c98a7125b
Author: Victor Ren <victorhge@gmail.com>
Commit: Victor Ren <victorhge@gmail.com>
Rename hook functions
---
iedit-lib.el | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/iedit-lib.el b/iedit-lib.el
index 60c43115cf..a95c03f247 100644
--- a/iedit-lib.el
+++ b/iedit-lib.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2010, 2011, 2012 Victor Ren
-;; Time-stamp: <2016-06-14 10:16:52 Victor Ren>
+;; Time-stamp: <2016-06-14 13:36:50 Victor Ren>
;; Author: Victor Ren <victorhge@gmail.com>
;; Keywords: occurrence region simultaneous rectangle refactoring
;; Version: 0.9.9
@@ -109,7 +109,7 @@ that is going to be changed.")
(defvar iedit-before-modification-undo-list nil
"This is buffer local variable which is the buffer undo list before
modification.")
-;; `iedit-occurrence-update-hook' gets called twice when change==0 and
+;; `iedit-update-occurrences' gets called twice when change==0 and
;; occurrence is zero-width (beg==end) -- for front and back insertion.
(defvar iedit-skip-modification-once t
"Variable used to skip first modification hook run when
@@ -123,7 +123,7 @@ insertion against a zero-width occurrence.")
(defvar iedit-post-undo-hook-installed nil
"This is buffer local variable which indicated if
-`iedit-post-undo-hook' is installed in `post-command-hook'.")
+`iedit-post-undo' is installed in `post-command-hook'.")
(defvar iedit-buffering nil
"This is buffer local variable which indicates iedit-mode is
@@ -304,9 +304,9 @@ occurrences if the user starts typing."
(overlay-put occurrence iedit-occurrence-overlay-name t)
(overlay-put occurrence 'face 'iedit-occurrence)
(overlay-put occurrence 'keymap iedit-occurrence-keymap)
- (overlay-put occurrence 'insert-in-front-hooks
'(iedit-occurrence-update-hook))
- (overlay-put occurrence 'insert-behind-hooks
'(iedit-occurrence-update-hook))
- (overlay-put occurrence 'modification-hooks
'(iedit-occurrence-update-hook))
+ (overlay-put occurrence 'insert-in-front-hooks '(iedit-update-occurrences))
+ (overlay-put occurrence 'insert-behind-hooks '(iedit-update-occurrences))
+ (overlay-put occurrence 'modification-hooks '(iedit-update-occurrences))
(overlay-put occurrence 'priority iedit-overlay-priority)
occurrence))
@@ -325,7 +325,7 @@ occurrences if the user starts typing."
;; (overlay-put unmatched-lines-overlay 'intangible t)
unmatched-lines-overlay))
-(defun iedit-post-undo-hook ()
+(defun iedit-post-undo ()
"Check if it is time to abort iedit after undo command is executed.
This is added to `post-command-hook' when undo command is executed
@@ -333,7 +333,7 @@ in occurrences."
(if (iedit-same-length)
nil
(run-hooks 'iedit-aborting-hook))
- (remove-hook 'post-command-hook 'iedit-post-undo-hook t)
+ (remove-hook 'post-command-hook 'iedit-post-undo t)
(setq iedit-post-undo-hook-installed nil))
(defun iedit-reset-aborting ()
@@ -341,7 +341,7 @@ in occurrences."
This is added to `post-command-hook' when aborting Iedit mode is
decided. `iedit-aborting-hook' is postponed after the current
-command is executed for avoiding `iedit-occurrence-update-hook'
+command is executed for avoiding `iedit-update-occurrences'
is called for a removed overlay."
(run-hooks 'iedit-aborting-hook)
(remove-hook 'post-command-hook 'iedit-reset-aborting t)
@@ -350,7 +350,7 @@ is called for a removed overlay."
;; There are two ways to update all occurrences. One is to redefine all key
;; stroke map for overlay, the other is to figure out three basic modification
;; in the modification hook. This function chooses the latter.
-(defun iedit-occurrence-update-hook (occurrence after beg end &optional change)
+(defun iedit-update-occurrences (occurrence after beg end &optional change)
"Update all occurrences.
This modification hook is triggered when a user edits any
occurrence and is responsible for updating all other
@@ -362,7 +362,7 @@ occurrence, it will abort Iedit mode."
;; If the "undo" change make occurrences different, it is going to mess
up
;; occurrences. So a check will be done after undo command is executed.
(when (not iedit-post-undo-hook-installed)
- (add-hook 'post-command-hook 'iedit-post-undo-hook nil t)
+ (add-hook 'post-command-hook 'iedit-post-undo nil t)
(setq iedit-post-undo-hook-installed t))
(when (not iedit-aborting)
;; before modification
@@ -388,9 +388,9 @@ occurrence, it will abort Iedit mode."
(eq beg end) ;; deletion
(not (string= iedit-before-modification-string
(buffer-substring-no-properties beg end))))
- (iedit-update-occurrences occurrence after beg end change))))))))
+ (iedit-update-occurrences-2 occurrence after beg end
change))))))))
-(defun iedit-update-occurrences (occurrence after beg end &optional change)
+(defun iedit-update-occurrences-2 (occurrence after beg end &optional change)
""
(let ((inhibit-modification-hooks t)
(offset (- beg (overlay-start occurrence)))
- [nongnu] elpa/iedit df2de42fa1 149/301: Remove test-util.el, (continued)
- [nongnu] elpa/iedit df2de42fa1 149/301: Remove test-util.el, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 83c037d678 156/301: Fix infinite loop problem in iedit-rect-mode, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit b95c35107a 176/301: Merge branch 'master' of github.com:victorhge/iedit, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 0d6193362d 144/301: Follow error convention, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit c2763baaf6 168/301: Do not enable iedit from a failing isearch, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 4e8b9453ac 261/301: Update occurrences in `post-command-hook', ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 3c305620ae 250/301: Optimize iedit-mode-from-isearch, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 85fad4a3b7 233/301: Merge pull request #73 from lionel-/feature-mode-line, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit a7f5ed7cf9 257/301: Turn off iedit-mode at running `iedit-mode-toggle-on-function` twice, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 5050b7e88e 260/301: Fix a failed test case when Emacs is compiled without GUI, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit afca4e6bbf 213/301: Rename hook functions,
ELPA Syncer <=
- [nongnu] elpa/iedit 7ab2509231 225/301: Expand iedit-regexp-quote with passthrough, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit efe98b2015 248/301: fix `iedit-mode-on-fuction problem, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 01fa1e5925 217/301: Fix error if sgml-electric-tag-pair-mode not bound, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit d7db0e5d19 279/301: Replace `iedit-lib-aborting-hook' with a callback function, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit dbf3f9a0e3 290/301: Add iedit-update-key-bindings, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 351bee5e0d 292/301: New iedit-record-changes, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 070775fb85 296/301: New feature: apply kmacro on occurrences, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 3c7159a107 298/301: Avoid calling `iedit-lib-cleanup` twice, ELPA Syncer, 2022/01/10