+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:
: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.")
(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)