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

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

[nongnu] elpa/lua-mode fb53190 164/468: First part of the fix for #34


From: Philip Kaludercic
Subject: [nongnu] elpa/lua-mode fb53190 164/468: First part of the fix for #34
Date: Thu, 5 Aug 2021 04:58:28 -0400 (EDT)

branch: elpa/lua-mode
commit fb531909367f281dfb6c4ce8dcdfacdde2900844
Author: Vedat Hallac <vedathallac@gmail.com>
Commit: Vedat Hallac <vedathallac@gmail.com>

    First part of the fix for #34
    
    If current line follows a multi-line comment, indent it according to
    the line preceding the start of the comment instead of the comment
    itself.
---
 lua-mode.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lua-mode.el b/lua-mode.el
index 267277e..277f955 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -779,7 +779,8 @@ Returns final value of point as integer or nil if operation 
failed."
     (while t
       (unless (eql (forward-line (if back -1 1)) 0)    ;; 0 means success
         (throw 'found nil))
-      (unless (looking-at "\\s *\\(--.*\\)?$")       ;; blank lua line
+      (unless (or (looking-at "\\s *\\(--.*\\)?$")
+                  (lua-comment-or-string-p))
         (throw 'found (point))))))
 
 (eval-when-compile



reply via email to

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