|
55 | 55 | ;; - Var `lua-indent-nested-block-content-align':
|
56 | 56 | ;; set to `nil' to stop aligning the content of nested blocks with the
|
57 | 57 | ;; open parenthesis
|
| 58 | +;; - Var `lua-indent-close-paren-align': |
| 59 | +;; set to `t' to align close parenthesis with the open parenthesis, |
| 60 | +;; rather than with the beginning of the line |
58 | 61 | ;; - Var `lua-mode-hook':
|
59 | 62 | ;; list of functions to execute when lua-mode is initialized
|
60 | 63 | ;; - Var `lua-documentation-url':
|
@@ -369,6 +372,13 @@ just forward by `lua-indent-level'."
|
369 | 372 | :group 'lua
|
370 | 373 | :type 'boolean)
|
371 | 374 |
|
| 375 | +(defcustom lua-indent-close-paren-align t |
| 376 | + "If non-nil, close parenthesis are aligned with their open |
| 377 | +parenthesis. If nil, close parenthesis are aligned to the |
| 378 | +beginning of the line." |
| 379 | + :group 'lua |
| 380 | + :type 'boolean) |
| 381 | + |
372 | 382 | (defcustom lua-jump-on-traceback t
|
373 | 383 | "*Jump to innermost traceback location in *lua* buffer. When this
|
374 | 384 | variable is non-nil and a traceback occurs when running Lua code in a
|
@@ -1548,7 +1558,8 @@ If not, return nil."
|
1548 | 1558 | (when (lua-goto-matching-block-token block-token-pos 'backward)
|
1549 | 1559 | ;; Exception cases: when the start of the line is an assignment,
|
1550 | 1560 | ;; go to the start of the assignment instead of the matching item
|
1551 |
| - (if (lua-point-is-after-left-shifter-p) |
| 1561 | + (if (or (not lua-indent-close-paren-align) |
| 1562 | + (lua-point-is-after-left-shifter-p)) |
1552 | 1563 | (current-indentation)
|
1553 | 1564 | (current-column)))))))
|
1554 | 1565 |
|
|
0 commit comments