branch: elpa/iedit commit b4bffe2abbd021c6fd3f2e361ca89dd211080b1d Author: Victor Ren <victor...@gmail.com> Commit: Victor Ren <victor...@gmail.com>
Apply keyboard macro in sequence The side effect of keyboard macro might depend on the sequence --- iedit-lib.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/iedit-lib.el b/iedit-lib.el index 3f2dbc75136..3119634fd09 100644 --- a/iedit-lib.el +++ b/iedit-lib.el @@ -1036,12 +1036,12 @@ before calling the last keyboard macro." (let ((iedit-updating t)) (save-excursion (when iedit-buffering-overlay (iedit-move-conjoined-overlays iedit-buffering-overlay)) - (dolist (another-occurrence iedit-occurrences-overlays) - (when (not (eq another-occurrence iedit-buffering-overlay)) - (goto-char (+ (overlay-start another-occurrence) iedit-start-kmacro-offset)) - (kmacro-call-macro nil t) - (iedit-move-conjoined-overlays another-occurrence))) - ) + (iedit-apply-on-occurrences-in-seq + (lambda (ov _count) + (when (not (eq ov iedit-buffering-overlay)) + (save-excursion + (goto-char (+ (overlay-start ov) iedit-start-kmacro-offset)) + (kmacro-call-macro nil t)))))) (message "Keyboard macro applied to the occurrences."))) (defun iedit-case-pattern (beg end)