branch: elpa/lua-mode
commit a1f6d28c5d4f392b9f180934804f57bbcb47c262
Author: edam <[email protected]>
Commit: edam <[email protected]>
added lua-indent-close-paren-align var
---
lua-mode.el | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/lua-mode.el b/lua-mode.el
index ed8484d..aecd35e 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -55,6 +55,9 @@
;; - Var `lua-indent-nested-block-content-align':
;; set to `nil' to stop aligning the content of nested blocks with the
;; open parenthesis
+;; - Var `lua-indent-close-paren-align':
+;; set to `t' to align close parenthesis with the open parenthesis,
+;; rather than with the beginning of the line
;; - Var `lua-mode-hook':
;; list of functions to execute when lua-mode is initialized
;; - Var `lua-documentation-url':
@@ -369,6 +372,13 @@ just forward by `lua-indent-level'."
:group 'lua
:type 'boolean)
+(defcustom lua-indent-close-paren-align t
+ "If non-nil, close parenthesis are aligned with their open
+parenthesis. If nil, close parenthesis are aligned to the
+beginning of the line."
+ :group 'lua
+ :type 'boolean)
+
(defcustom lua-jump-on-traceback t
"*Jump to innermost traceback location in *lua* buffer. When this
variable is non-nil and a traceback occurs when running Lua code in a
@@ -1548,7 +1558,8 @@ If not, return nil."
(when (lua-goto-matching-block-token block-token-pos 'backward)
;; Exception cases: when the start of the line is an assignment,
;; go to the start of the assignment instead of the matching item
- (if (lua-point-is-after-left-shifter-p)
+ (if (or (not lua-indent-close-paren-align)
+ (lua-point-is-after-left-shifter-p))
(current-indentation)
(current-column)))))))