[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/lua-mode 9645322 124/468: lua-indent-line: add lua-indent-
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/lua-mode 9645322 124/468: lua-indent-line: add lua-indent-string-contents custom variable to enable indenting multiline strings if necessary (issue #6) |
Date: |
Thu, 5 Aug 2021 04:58:20 -0400 (EDT) |
branch: elpa/lua-mode
commit 964532223036b28ac4bed842d6a0fd4bae0b6fda
Author: immerrr <immerrr+lua@gmail.com>
Commit: immerrr <immerrr+lua@gmail.com>
lua-indent-line: add lua-indent-string-contents custom variable to enable
indenting multiline strings if necessary (issue #6)
---
lua-mode.el | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lua-mode.el b/lua-mode.el
index aa2939b..a7cc482 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -214,6 +214,12 @@ If the latter is nil, the keymap translates into
`lua-mode-map' verbatim.")
:type 'regexp
:group 'lua)
+(defcustom lua-indent-string-contents nil
+ "If non-nil, contents of multiline string will be indented.
+Otherwise leading amount of whitespace on each line is preserved."
+ :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
@@ -434,7 +440,7 @@ Return the amount the indentation changed by."
;; save point as a distance to eob - it's invariant w.r.t indentation
(pos (- (point-max) (point))))
(back-to-indentation)
- (if (lua-string-p) ;; don't indent if inside multiline string literal
+ (if (and (not lua-indent-string-contents) (lua-string-p))
(goto-char (- (point-max) pos)) ;; just restore point position
(setq indent (max 0 (- (lua-calculate-indentation nil)
- [nongnu] elpa/lua-mode 3c89a0a 054/468: Reorder customizations better., (continued)
- [nongnu] elpa/lua-mode 3c89a0a 054/468: Reorder customizations better., Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 158f267 058/468: Merge lua-goto-nonblank-* funcs into one, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode c5f37b0 088/468: lua-mark-all-multiline-literals: look for multiline ending beyond specified bounds to improve integrity, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 96658a0 089/468: Move actual marking of multiline construct into lua-mark-multiline-region, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode da22ef7 094/468: Rename lua-clear-multiline-delims -> lua-unmark-multiline-literals, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 5607327 096/468: Update TODO, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 2b91610 098/468: Bump contact information, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 5953970 101/468: Bump version, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode c044a1b 109/468: Fix emacs compilation warning in XEmacs-oriented code, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 3367502 121/468: Merge pull request #7 from rlph/master, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 9645322 124/468: lua-indent-line: add lua-indent-string-contents custom variable to enable indenting multiline strings if necessary (issue #6),
Philip Kaludercic <=
- [nongnu] elpa/lua-mode 99ef499 129/468: Make lua-automark variables buffer local, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 2ce253c 133/468: lua-automark: fix multiline comments recognition which was failing when there was a single-line comment previously, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 5a81583 140/468: Restore compatibility with Emacs22 and earlier that was broken when patching lua-mode-abbrev-table (should fix #11), Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode e498788 142/468: lua-calculate-indentation: add comments, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 1e61379 111/468: Fix most of compile-time warnings, add couple FIXMEs, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode d6232fe 119/468: lua-find-regexp: check if match-beginning should be ignored too, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode c23fb54 127/468: lua-automark: mark only those buffer parts that may have changed their syntactical meaning, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode dfdbd85 143/468: lua-cont-eol-regexp: add missing keywords "if", "until" and "elseif", Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 612b1e7 166/468: Fixed misplaced paranthesis., Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 4a203b9 172/468: add lua-send-defun (a lua-send-proc replacement), Philip Kaludercic, 2021/08/05