[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/lua-mode aee46da 367/468: added lua-indent-nested-block-co
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/lua-mode aee46da 367/468: added lua-indent-nested-block-content-align var |
Date: |
Thu, 5 Aug 2021 04:59:10 -0400 (EDT) |
branch: elpa/lua-mode
commit aee46da90413a3706fbafee5e5291f1415e65e32
Author: edam <tim@ed.am>
Commit: edam <tim@ed.am>
added lua-indent-nested-block-content-align var
---
README.md | 3 ++-
lua-mode.el | 13 ++++++++++++-
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index d2bcee5..536d482 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@ modules to your Emacs and keeping them up-to-date. Once you
have **el-get** set
and updating is no more than
<M-x> el-get-update "lua-mode"`
-
+
Please, consult with [el-get
documentation](https://github.com/dimitri/el-get/blob/master/README.md) for
further information.
### MANUAL INSTALLATION
@@ -53,6 +53,7 @@ The following variables are available for customization (see
more via `M-x custo
- Var `lua-indent-level` (default `3`): indentation offset in spaces
- Var `lua-indent-string-contents` (default `nil`): set to `t` if you like to
have contents of multiline strings to be indented like comments
+- Var `lua-indent-nested-block-content-align` (default `t`) set to `nil` to
stop aligning the content of nested blocks with the open parenthesis
- Var `lua-mode-hook`: list of functions to execute when lua-mode is
initialized
- Var `lua-documentation-url` (default
`"http://www.lua.org/manual/5.1/manual.html#pdf-"`): base URL for documentation
lookup
- Var `lua-documentation-function` (default `browse-url`): function used to
show documentation (`eww` is a viable alternative for Emacs 25)
diff --git a/lua-mode.el b/lua-mode.el
index af94a13..ed8484d 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -52,6 +52,9 @@
;; - Var `lua-indent-string-contents':
;; set to `t` if you like to have contents of multiline strings to be
;; indented like comments
+;; - Var `lua-indent-nested-block-content-align':
+;; set to `nil' to stop aligning the content of nested blocks with the
+;; open parenthesis
;; - Var `lua-mode-hook':
;; list of functions to execute when lua-mode is initialized
;; - Var `lua-documentation-url':
@@ -359,6 +362,13 @@ Otherwise leading amount of whitespace on each line is
preserved."
:group 'lua
:type 'boolean)
+(defcustom lua-indent-nested-block-content-align t
+ "If non-nil, the contents of nested blocks are indented to
+align with the column of the opening parenthesis, rather than
+just forward by `lua-indent-level'."
+ :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
@@ -1260,7 +1270,8 @@ use standalone."
(cons 'relative lua-indent-level))
;; block openers
- ((member found-token (list "{" "(" "["))
+ ((and lua-indent-nested-block-content-align
+ (member found-token (list "{" "(" "[")))
(save-excursion
(let ((found-bol (line-beginning-position)))
(forward-comment (point-max))
- [nongnu] elpa/lua-mode c53d071 344/468: travis: disable git-snapshot, (continued)
- [nongnu] elpa/lua-mode c53d071 344/468: travis: disable git-snapshot, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode cccb649 346/468: Cask: specify minimum version for buttercup, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode d5891c5 345/468: Merge pull request #140 from immerrr/fix-buttercup-matchers, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode b27edce 348/468: Minor simplification of lua-get-create-process, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 34e911b 358/468: travis: disable git-snapshot, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 4cb20c0 359/468: Cask: specify minimum version for buttercup, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode c850d2e 357/468: test-inferior-process: temporarily disable failing test, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode e68bc14 353/468: Remove compatibility for Emacs < 24, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 8b66d36 364/468: Merge branch 'master' into master, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 95c64bb 366/468: Add doc for lua-find-matching-token-word, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode aee46da 367/468: added lua-indent-nested-block-content-align var,
Philip Kaludercic <=
- [nongnu] elpa/lua-mode 8503e16 370/468: travis: specify language=minimal explicitly, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode c7c3aaa 377/468: Set comint-prompt-regexp locally in process buffer, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 52cc3e4 378/468: Merge pull request #154 from immerrr/set-comint-prompt-regexp-locally-in-process-buf, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 0f7f010 383/468: Fix typo, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 505896f 386/468: added tests for lua-indent-nested-block-content-align and lua-indent-close-paren-align, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 0cf8000 387/468: add lua-indent-close-paren-align to README.md, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 2a8b58b 390/468: Silence byte-compiler, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 1f596a9 392/468: Merge pull request #161 from tarsiiformes/lexical, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 0781d83 404/468: Merge pull request #175 from immerrr/add-lua-backward-up-list-command, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode d6dc6fb 406/468: Don't add "continuation line" indentation inside parentheses/brackets, Philip Kaludercic, 2021/08/05