branch: elpa/lua-mode
commit fb531909367f281dfb6c4ce8dcdfacdde2900844
Author: Vedat Hallac <[email protected]>
Commit: Vedat Hallac <[email protected]>
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