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

    Ignore last empty line at eob
---
 isl.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/isl.el b/isl.el
index 38e0e0f4dd4..7255d9d81e9 100644
--- a/isl.el
+++ b/isl.el
@@ -889,7 +889,9 @@ See `isl-requires-pattern'."
           (save-excursion
             (goto-char (point-min))
             (condition-case-unless-debug nil
-                (while (setq bounds (or go (isl-multi-search-fwd isl-pattern 
nil t)))
+                (while (and (setq bounds (or go (isl-multi-search-fwd
+                                                 isl-pattern nil t)))
+                            (not (eobp)))
                   (setq go nil)
                   (unless (and (not isl-search-invisible)
                                (invisible-p (cdr bounds)))
@@ -914,7 +916,7 @@ See `isl-requires-pattern'."
                     ;; empty line (re-search-forward instead would be
                     ;; stuck and infloop) so match it with looking-at
                     ;; and use GO value in next turn of the loop.
-                    (when (and (looking-at isl-pattern) (not (eobp)))
+                    (when (looking-at isl-pattern)
                       (setq go (cons (pos-bol) (pos-eol))))))
               (invalid-regexp (setq isl--invalid t) nil))
             (setq isl--item-overlays (reverse isl--item-overlays)))

Reply via email to