]> git.donarmstrong.com Git - lib.git/blobdiff - emacs_el/iedit-lib.el
fix missing ) for org-mode
[lib.git] / emacs_el / iedit-lib.el
index 5af1785733ebd502140d5fd9ecbc4bbe7a208efb..636c0bb3bca37b443d122af220c99788e3c676fb 100644 (file)
@@ -3,7 +3,7 @@
 
 ;; Copyright (C) 2010, 2011, 2012 Victor Ren
 
-;; Time-stamp: <2012-09-07 16:28:18 Victor Ren>
+;; Time-stamp: <2012-10-17 08:48:28 Victor Ren>
 ;; Author: Victor Ren <victorhge@gmail.com>
 ;; Keywords: occurrence region simultaneous rectangle refactoring
 ;; Version: 0.97
@@ -376,15 +376,14 @@ occurrence, it will abort Iedit mode."
                         (iedit-move-conjoined-overlays another-occurrence)))
                   ;; deletion
                   (dolist (another-occurrence (remove occurrence iedit-occurrences-overlays))
-                    (let* ((beginning (+ (overlay-start another-occurrence) offset))
-                           (ending (+ beginning change)))
-                      (delete-region beginning ending)
+                    (let ((beginning (+ (overlay-start another-occurrence) offset)))
+                      (delete-region beginning (+ beginning change))
                       (unless (eq beg end) ;; replacement
                         (goto-char beginning)
                         (insert-and-inherit value))
                       (run-hook-with-args 'after-change-functions
                                           beginning
-                                          ending
+                                          (+ beginning (- beg end))
                                           change)))))))))))))
 
 (defun iedit-next-occurrence ()