aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/isearch.el
diff options
context:
space:
mode:
authorJuri Linkov <[email protected]>2004-10-05 04:22:41 +0000
committerJuri Linkov <[email protected]>2004-10-05 04:22:41 +0000
commit071fdd66922f288844c3aa52edfdbd375179d866 (patch)
tree18b9e183ac52944b15942e3558862c728c1a30c0 /lisp/isearch.el
parent80a47b51e7bac79893de13eb5704371eddccee13 (diff)
(isearch-done): Set mark after running hook.
Suggested by Drew Adams <[email protected]>.
Diffstat (limited to 'lisp/isearch.el')
-rw-r--r--lisp/isearch.el21
1 files changed, 11 insertions, 10 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 117d1bfdc1..96a3e0e0ac 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -680,16 +680,7 @@ is treated as a regexp. See \\[isearch-forward] for more info."
(if isearch-small-window
(goto-char found-point)
;; Exiting the save-window-excursion clobbers window-start; restore it.
- (set-window-start (selected-window) found-start t))
-
- ;; If there was movement, mark the starting position.
- ;; Maybe should test difference between and set mark iff > threshold.
- (if (/= (point) isearch-opoint)
- (or (and transient-mark-mode mark-active)
- (progn
- (push-mark isearch-opoint t)
- (or executing-kbd-macro (> (minibuffer-depth) 0)
- (message "Mark saved where search started"))))))
+ (set-window-start (selected-window) found-start t)))
(setq isearch-mode nil)
(if isearch-input-method-local-p
@@ -714,6 +705,16 @@ is treated as a regexp. See \\[isearch-forward] for more info."
(isearch-update-ring isearch-string isearch-regexp))
(run-hooks 'isearch-mode-end-hook)
+
+ ;; If there was movement, mark the starting position.
+ ;; Maybe should test difference between and set mark iff > threshold.
+ (if (/= (point) isearch-opoint)
+ (or (and transient-mark-mode mark-active)
+ (progn
+ (push-mark isearch-opoint t)
+ (or executing-kbd-macro (> (minibuffer-depth) 0)
+ (message "Mark saved where search started")))))
+
(and (not edit) isearch-recursive-edit (exit-recursive-edit)))
(defun isearch-update-ring (string &optional regexp)