emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/lua-mode d6232fe 119/468: lua-find-regexp: check if match-


From: Philip Kaludercic
Subject: [nongnu] elpa/lua-mode d6232fe 119/468: lua-find-regexp: check if match-beginning should be ignored too
Date: Thu, 5 Aug 2021 04:58:19 -0400 (EDT)

branch: elpa/lua-mode
commit d6232fef51bfeccfefb3cbf89306f9449a238d28
Author: immerrr <immerrr+lua@gmail.com>
Commit: immerrr <immerrr+lua@gmail.com>

    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

[Prev in Thread] Current Thread [Next in Thread]