From 2e78353fabe11c768627c50e48375de5693ce7ee Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Thu, 3 Mar 2016 19:03:16 -0300 Subject: [PATCH] * lisp/isearch.el (isearch-define-mode-toggle): Fix toggling logic --- lisp/isearch.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/isearch.el b/lisp/isearch.el index 2efa4c7e8e..c91ccfad27 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) -- 2.39.2