]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/isearch.el (isearch-define-mode-toggle): Fix toggling logic
authorArtur Malabarba <bruce.connor.am@gmail.com>
Thu, 3 Mar 2016 22:03:16 +0000 (19:03 -0300)
committerArtur Malabarba <bruce.connor.am@gmail.com>
Thu, 3 Mar 2016 22:03:16 +0000 (19:03 -0300)
lisp/isearch.el

index 2efa4c7e8ef6b6b8b7038c23f887f16613c586f7..c91ccfad27dc05e85911d6d5ad356e97adf97232 100644 (file)
@@ -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)