X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=emacs_el%2Fiedit.el;h=48d2122eb9c8e671c17c968cb2cde0e2d542da3f;hb=3d9e3a2d70d86fb98f5e72f1992a84e30ad3be03;hp=9eea9c81c503170b394294378ce619dc9f7d911a;hpb=423221d7dda497a5d4d6df2d667edc8e1c1b4ec7;p=lib.git diff --git a/emacs_el/iedit.el b/emacs_el/iedit.el index 9eea9c8..48d2122 100644 --- a/emacs_el/iedit.el +++ b/emacs_el/iedit.el @@ -2,7 +2,7 @@ ;; Copyright (C) 2010, 2011, 2012 Victor Ren -;; Time-stamp: <2012-09-12 15:22:33 Victor Ren> +;; Time-stamp: <2012-10-22 14:14:53 Victor Ren> ;; Author: Victor Ren ;; Keywords: occurrence region simultaneous refactoring ;; Version: 0.97 @@ -340,6 +340,7 @@ Keymap used within overlays: (setq iedit-only-complete-symbol-local complete-symbol) (setq mark-active nil) (run-hooks 'deactivate-mark-hook) + (setq iedit-initial-string-local occurrence) (iedit-start (iedit-regexp-quote occurrence) beg end)))) (defun iedit-mode-from-isearch (regexp) @@ -352,7 +353,12 @@ Keymap used within overlays: (isearch-regexp isearch-string) (t (regexp-quote isearch-string))))) (list regexp))) + (if (or isearch-regexp isearch-word) + nil + (setq iedit-initial-string-local isearch-string)) (isearch-exit) + (setq mark-active nil) + (run-hooks 'deactivate-mark-hook) (iedit-start regexp (point-min) (point-max)) ;; TODO: reconsider how to avoid the loop in iedit-same-length (if (iedit-same-length) @@ -363,7 +369,6 @@ Keymap used within overlays: (defun iedit-start (occurrence-regexp beg end) "Start Iedit mode for the `occurrence-regexp' in the current buffer." (setq iedit-unmatched-lines-invisible iedit-unmatched-lines-invisible-default) - (setq iedit-initial-string-local occurrence-regexp) (setq iedit-initial-region (list beg end)) (iedit-start2 occurrence-regexp beg end) (run-hooks 'iedit-mode-hook) @@ -401,6 +406,7 @@ the initial string globally." (iedit-cleanup) + (setq iedit-initial-string-local nil) (setq iedit-mode nil) (force-mode-line-update) (remove-hook 'kbd-macro-termination-hook 'iedit-done t)