branch: elpa/lua-mode
commit d6232fef51bfeccfefb3cbf89306f9449a238d28
Author: immerrr <[email protected]>
Commit: immerrr <[email protected]>

    lua-find-regexp: check if match-beginning should be ignored too
    
    When matching ] that closes ML-string, (match-end 0) is not considered 
inside string, which causes indentation problems
---
 lua-mode.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lua-mode.el b/lua-mode.el
index c18f603..71bb5b0 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -455,7 +455,8 @@ ignored, nil otherwise."
         (case-fold-search nil))
     (catch 'found
       (while (funcall search-func regexp limit t)
-        (if (not (funcall ignore-func))
+        (if (and (not (funcall ignore-func (match-beginning 0)))
+                 (not (funcall ignore-func (match-end 0))))
             (throw 'found (point)))))))
 
 (defconst lua-block-regexp

Reply via email to