* lisp/isearch.el: Ensure we still support `isearch-new-word'
authorArtur Malabarba <bruce.connor.am@gmail.com>
Fri, 27 Nov 2015 11:23:35 +0000 (11:23 +0000)
committerArtur Malabarba <bruce.connor.am@gmail.com>
Fri, 27 Nov 2015 11:25:57 +0000 (11:25 +0000)
(isearch-new-regexp-function): Define variable.
(isearch-new-word): Define as an obsolete alias. (Bug#22018)

lisp/isearch.el

index 0a6b925d03efb3ce980ea263c5e165046b2c8724..65f8d6fb92595b0d8d1f0afefa6b904462b54fec 100644 (file)
@@ -1213,6 +1213,14 @@ If MSG is non-nil, use variable `isearch-message', otherwise `isearch-string'."
          (length succ-msg)
        0))))
 
+(defvar isearch-new-regexp-function nil
+  "Holds the next `isearch-regexp-function' inside `with-isearch-suspended'.
+If this is set inside code wrapped by the macro
+`with-isearch-suspended', then the value set will be used as the
+`isearch-regexp-function' once isearch resumes.")
+(define-obsolete-variable-alias 'isearch-new-word
+  'isearch-new-regexp-function "25.1")
+
 (defmacro with-isearch-suspended (&rest body)
   "Exit Isearch mode, run BODY, and reinvoke the pending search.
 You can update the global isearch variables by setting new values to