diff options
author | Kim F. Storm <storm@cua.dk> | 2001-12-02 01:13:55 +0000 |
---|---|---|
committer | Kim F. Storm <storm@cua.dk> | 2001-12-02 01:13:55 +0000 |
commit | 6848c9f166c48d065064a0fcb553ae2e434867ec (patch) | |
tree | 668ddfd0adf2864c0133beba64da90d30be7737d /lisp | |
parent | 08cf00d8f75359c839ae9811705dfaf297c63225 (diff) | |
download | emacs-6848c9f166c48d065064a0fcb553ae2e434867ec.tar.gz |
(isearch-resume-enabled): New variable.
(isearch-done): Use that variable.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/isearch.el | 18 |
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 @@ +2001-12-02 Kim F. Storm <storm@cua.dk> + + * isearch.el (isearch-resume-enabled): New variable. + (isearch-done): Use that variable. + 2001-12-01 Eli Zaretskii <eliz@is.elta.co.il> * 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." :type 'boolean :group 'isearch) +(defcustom isearch-resume-enabled t + "*If non-nil, `isearch-resume' commands are added to the command history." + :type 'boolean + :group 'isearch) + (defvar isearch-mode-hook nil "Function(s) to call after starting up an incremental search.") @@ -647,12 +652,13 @@ is treated as a regexp. See \\[isearch-forward] for more info." (setq disable-point-adjustment t)) (defun isearch-done (&optional nopush edit) - (let ((command `(isearch-resume ,isearch-string ,isearch-regexp - ,isearch-word ,isearch-forward - ,isearch-message - ',isearch-case-fold-search))) - (unless (equal (car command-history) command) - (setq command-history (cons command command-history)))) + (if isearch-resume-enabled + (let ((command `(isearch-resume ,isearch-string ,isearch-regexp + ,isearch-word ,isearch-forward + ,isearch-message + ',isearch-case-fold-search))) + (unless (equal (car command-history) command) + (setq command-history (cons command command-history))))) (remove-hook 'mouse-leave-buffer-hook 'isearch-done) (remove-hook 'kbd-macro-termination-hook 'isearch-done) |