aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/isearch.el18
2 files changed, 17 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1f6354110a2..8df0e30abd0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12001-12-02 Kim F. Storm <storm@cua.dk>
2
3 * isearch.el (isearch-resume-enabled): New variable.
4 (isearch-done): Use that variable.
5
12001-12-01 Eli Zaretskii <eliz@is.elta.co.il> 62001-12-01 Eli Zaretskii <eliz@is.elta.co.il>
2 7
3 * progmodes/idlwave.el, progmodes/idlw-rinfo.el: 8 * progmodes/idlwave.el, progmodes/idlw-rinfo.el:
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 4777b49b629..e85f7bca954 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -186,6 +186,11 @@ Ordinarily the text becomes invisible again at the end of the search."
186 :type 'boolean 186 :type 'boolean
187 :group 'isearch) 187 :group 'isearch)
188 188
189(defcustom isearch-resume-enabled t
190 "*If non-nil, `isearch-resume' commands are added to the command history."
191 :type 'boolean
192 :group 'isearch)
193
189(defvar isearch-mode-hook nil 194(defvar isearch-mode-hook nil
190 "Function(s) to call after starting up an incremental search.") 195 "Function(s) to call after starting up an incremental search.")
191 196
@@ -647,12 +652,13 @@ is treated as a regexp. See \\[isearch-forward] for more info."
647 (setq disable-point-adjustment t)) 652 (setq disable-point-adjustment t))
648 653
649(defun isearch-done (&optional nopush edit) 654(defun isearch-done (&optional nopush edit)
650 (let ((command `(isearch-resume ,isearch-string ,isearch-regexp 655 (if isearch-resume-enabled
651 ,isearch-word ,isearch-forward 656 (let ((command `(isearch-resume ,isearch-string ,isearch-regexp
652 ,isearch-message 657 ,isearch-word ,isearch-forward
653 ',isearch-case-fold-search))) 658 ,isearch-message
654 (unless (equal (car command-history) command) 659 ',isearch-case-fold-search)))
655 (setq command-history (cons command command-history)))) 660 (unless (equal (car command-history) command)
661 (setq command-history (cons command command-history)))))
656 662
657 (remove-hook 'mouse-leave-buffer-hook 'isearch-done) 663 (remove-hook 'mouse-leave-buffer-hook 'isearch-done)
658 (remove-hook 'kbd-macro-termination-hook 'isearch-done) 664 (remove-hook 'kbd-macro-termination-hook 'isearch-done)