branch: elpa/isl
commit 1706daed674be756e3d71abd8433b1a1a8be58bf
Author: Thierry Volpiatto <[email protected]>
Commit: Thierry Volpiatto <[email protected]>

    Allow using simple search in kmacros
---
 isl.el | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/isl.el b/isl.el
index 38358a8573a..4f021b8fe5f 100644
--- a/isl.el
+++ b/isl.el
@@ -1005,13 +1005,21 @@ appended at end."
                 isl-current-buffer)
       (switch-to-buffer isl-current-buffer))))
 
+(defun isl--search-string ()
+  "Search next match forward from point and stop.
+This function is intended to be used in kmacros."
+  (let ((str (read-string "Search: ")))
+    (isl-multi-search-fwd str nil t)))
+
 ;;;###autoload
 (defun isl-search ()
   "Start incremental searching in current buffer."
   (interactive)
-  (setq isl--point-min nil
-        isl--point-max nil)
-  (isl-search-1))
+  (if executing-kbd-macro
+      (isl--search-string)
+    (setq isl--point-min nil
+          isl--point-max nil)
+    (isl-search-1)))
 
 ;;;###autoload
 (defun isl-resume (arg)

Reply via email to