Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a hook after vr/replace vr/query-replace #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion visual-regexp.el
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@ If nil, don't limit the number of matches shown in visual feedback."
(defvar vr/initialize-hook nil
"Hook called before vr/replace and vr/query-replace")

(defvar vr/end-hook nil
"Hook called after vr/replace and vr/query-replace")

;;; private variables

(defconst vr--match-faces '(vr/match-0 vr/match-1)
Expand Down Expand Up @@ -773,7 +776,8 @@ visible all the time in the minibuffer."
(unless (overlayp vr--minibuffer-message-overlay)
(delete-overlay vr--minibuffer-message-overlay))
(vr--delete-overlay-displays)
(vr--delete-overlays))))
(vr--delete-overlays)
(run-hooks 'vr/end-hook))))

(add-hook 'multiple-cursors-mode-enabled-hook
;; run vr/mc-mark once per cursor by default (do not ask the user)
Expand Down