diff options
Diffstat (limited to 'lisp/isearch.el')
-rw-r--r-- | lisp/isearch.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el index 2efa4c7e8ef..c91ccfad27d 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -1528,7 +1528,9 @@ The command then executes BODY and updates the isearch prompt." (if docstring (concat "\n" docstring) "")) (interactive) ,@(when function - `((setq isearch-regexp-function #',function) + `((setq isearch-regexp-function + (unless (eq isearch-regexp-function #',function) + #',function)) (setq isearch-regexp nil))) ,@body (setq isearch-success t isearch-adjusted t) |