aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/isearch.el8
1 files changed, 3 insertions, 5 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 6ef4f72db2f..2efa4c7e8ef 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -1528,15 +1528,13 @@ The command then executes BODY and updates the isearch prompt."
1528 (if docstring (concat "\n" docstring) "")) 1528 (if docstring (concat "\n" docstring) ""))
1529 (interactive) 1529 (interactive)
1530 ,@(when function 1530 ,@(when function
1531 `((setq isearch-regexp-function 1531 `((setq isearch-regexp-function #',function)
1532 (unless (eq isearch-regexp-function #',function) 1532 (setq isearch-regexp nil)))
1533 #',function))
1534 (when isearch-regexp-function (setq isearch-regexp nil))))
1535 ,@body 1533 ,@body
1536 (setq isearch-success t isearch-adjusted t) 1534 (setq isearch-success t isearch-adjusted t)
1537 (isearch-update)) 1535 (isearch-update))
1538 (define-key isearch-mode-map ,key #',command-name) 1536 (define-key isearch-mode-map ,key #',command-name)
1539 ,@(when (symbolp function) 1537 ,@(when (and function (symbolp function))
1540 `((put ',function 'isearch-message-prefix ,(format "%s " mode)) 1538 `((put ',function 'isearch-message-prefix ,(format "%s " mode))
1541 (put ',function :advertised-binding ,key) 1539 (put ',function :advertised-binding ,key)
1542 (cl-callf (lambda (types) (cons 'choice 1540 (cl-callf (lambda (types) (cons 'choice