]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/el-search/el-search.el
Fix el-search--ensure-sexp-start error at bob
[gnu-emacs-elpa] / packages / el-search / el-search.el
index c56c9d0f9723f0c558ca08550e4f98bafd1d6a76..de219de9a1ecc6294dd44c325f1d4d7737b6cf08 100644 (file)
@@ -356,9 +356,10 @@ and return it."
     (while not-done
       (let ((stop-here nil)
             (looking-at-from-back (lambda (regexp n)
-                                    (save-excursion
-                                      (backward-char n)
-                                      (looking-at regexp)))))
+                                    (and (> (point) n)
+                                         (save-excursion
+                                           (backward-char n)
+                                           (looking-at regexp))))))
         (while (not stop-here)
           (cond
            ((eobp) (signal 'end-of-buffer nil))
@@ -1112,7 +1113,8 @@ Hit any key to proceed."
 
 TO-EXPR is an Elisp expression that is evaluated repeatedly for
 each match with bindings created in FROM-PATTERN in effect to
-produce a replacement expression.
+produce a replacement expression.  Operate from point
+to (point-max).
 
 As each match is found, the user must type a character saying
 what to do with it.  For directions, type ? at that time."