# HG changeset patch # User Kim F. Storm # Date 1007255635 0 # Node ID 3b56f11dd4b666433a160826db5c7b82aee59fc6 # Parent e78fbcf9b878dff44e18a4d4a33bc9706de8c815 (isearch-resume-enabled): New variable. (isearch-done): Use that variable. diff -r e78fbcf9b878 -r 3b56f11dd4b6 lisp/ChangeLog --- a/lisp/ChangeLog Sat Dec 01 22:04:12 2001 +0000 +++ b/lisp/ChangeLog Sun Dec 02 01:13:55 2001 +0000 @@ -1,3 +1,8 @@ +2001-12-02 Kim F. Storm + + * isearch.el (isearch-resume-enabled): New variable. + (isearch-done): Use that variable. + 2001-12-01 Eli Zaretskii * progmodes/idlwave.el, progmodes/idlw-rinfo.el: diff -r e78fbcf9b878 -r 3b56f11dd4b6 lisp/isearch.el --- a/lisp/isearch.el Sat Dec 01 22:04:12 2001 +0000 +++ b/lisp/isearch.el Sun Dec 02 01:13:55 2001 +0000 @@ -186,6 +186,11 @@ :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 @@ (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)