branch: elpa/adoc-mode
commit b2b9fd5a6f6cfcd81d721713c32dc48bd77e362b
Author: Tobias Zawada <t...@esi-group.com>
Commit: TobiasZawada <i...@tn-home.de>

    Addresses #33. Restart search in `adoc-kwf-std` at last prevented match + 1
---
 adoc-mode.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/adoc-mode.el b/adoc-mode.el
index fa1fa11b2d..bd054b0a8c 100644
--- a/adoc-mode.el
+++ b/adoc-mode.el
@@ -1577,9 +1577,8 @@ MUST-FREE-GROUPS a list of regexp group numbers which may 
not
 match text that has an adoc-reserved text-property with a non-nil
 value. Likewise, groups in NO-BLOCK-DEL-GROUPS may not contain
 text having adoc-reserved set to symbol `block-del'."
-  (let ((found t) (prevented t) saved-point)
+  (let ((found t) (prevented t))
     (while (and found prevented (<= (point) end) (not (eobp)))
-      (setq saved-point (point))
       (setq found (adoc-kwf-search regexp end t))
       (setq prevented
             (and found
@@ -1597,7 +1596,7 @@ text having adoc-reserved set to symbol `block-del'."
                                                      'adoc-reserved 
'block-del)))
                            no-block-del-groups))))
       (when (and found prevented (<= (point) end))
-        (goto-char (1+ saved-point))))
+        (goto-char (1+ (match-beginning 0)))))
     (and found (not prevented))))
 
 (defun adoc-kwf-attribute-list (end)

Reply via email to