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

This commit is contained in:
Artur Malabarba 2016-03-03 19:03:16 -03:00
parent 66d2717888
commit 2e78353fab

View file

@ -1528,7 +1528,9 @@ The command then executes BODY and updates the isearch prompt."
(if docstring (concat "\n" docstring) "")) (if docstring (concat "\n" docstring) ""))
(interactive) (interactive)
,@(when function ,@(when function
`((setq isearch-regexp-function #',function) `((setq isearch-regexp-function
(unless (eq isearch-regexp-function #',function)
#',function))
(setq isearch-regexp nil))) (setq isearch-regexp nil)))
,@body ,@body
(setq isearch-success t isearch-adjusted t) (setq isearch-success t isearch-adjusted t)