Commit 2e78353f authored by Artur Malabarba's avatar Artur Malabarba

* lisp/isearch.el (isearch-define-mode-toggle): Fix toggling logic

parent 66d27178
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment