186 |
:type 'boolean |
:type 'boolean |
187 |
:group 'isearch) |
:group 'isearch) |
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 |
|
|
194 |
(defvar isearch-mode-hook nil |
(defvar isearch-mode-hook nil |
195 |
"Function(s) to call after starting up an incremental search.") |
"Function(s) to call after starting up an incremental search.") |
196 |
|
|
652 |
(setq disable-point-adjustment t)) |
(setq disable-point-adjustment t)) |
653 |
|
|
654 |
(defun isearch-done (&optional nopush edit) |
(defun isearch-done (&optional nopush edit) |
655 |
(let ((command `(isearch-resume ,isearch-string ,isearch-regexp |
(if isearch-resume-enabled |
656 |
,isearch-word ,isearch-forward |
(let ((command `(isearch-resume ,isearch-string ,isearch-regexp |
657 |
,isearch-message |
,isearch-word ,isearch-forward |
658 |
',isearch-case-fold-search))) |
,isearch-message |
659 |
(unless (equal (car command-history) command) |
',isearch-case-fold-search))) |
660 |
(setq command-history (cons command command-history)))) |
(unless (equal (car command-history) command) |
661 |
|
(setq command-history (cons command command-history))))) |
662 |
|
|
663 |
(remove-hook 'mouse-leave-buffer-hook 'isearch-done) |
(remove-hook 'mouse-leave-buffer-hook 'isearch-done) |
664 |
(remove-hook 'kbd-macro-termination-hook 'isearch-done) |
(remove-hook 'kbd-macro-termination-hook 'isearch-done) |