[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/lua-mode 16861a3 032/468: Fix bug #620 again: Wrong identa
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/lua-mode 16861a3 032/468: Fix bug #620 again: Wrong identation with tables |
Date: |
Thu, 5 Aug 2021 04:58:03 -0400 (EDT) |
branch: elpa/lua-mode
commit 16861a391d8045a08504a38b8fb601fc03033c7d
Author: juergen <juergen>
Commit: juergen <juergen>
Fix bug #620 again: Wrong identation with tables
---
lua-mode.el | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/lua-mode.el b/lua-mode.el
index 952611f..556aba4 100755
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -11,7 +11,7 @@
;; Paul Du Bois <pld-lua@gelatinous.com> and
;; Aaron Smith <aaron-lua@gelatinous.com>.
;; URL: http://lua-mode.luaforge.net/
-;; Version: 20070525
+;; Version: 20070607
;; This file is NOT part of Emacs.
;;
;; This program is free software; you can redistribute it and/or
@@ -29,7 +29,7 @@
;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
;; MA 02110-1301, USA.
-(defconst lua-version "20070525"
+(defconst lua-version "20070607"
"Lua Mode version number.")
;; Keywords: languages, processes, tools
@@ -740,6 +740,14 @@ use standalone."
(cons 'absolute (+ (save-excursion (goto-char found-pos)
(current-column))
1)))
+ ((string-equal found-token "{")
+ (save-excursion
+ ;; expression follows -> indent at start of next expression
+ (if (and (not (search-forward-regexp "[[:space:]]--"
(line-end-position) t))
+ (search-forward-regexp "[^[:space:]]" (line-end-position)
t))
+ (cons 'absolute (1- (current-column)))
+ (cons 'relative lua-indent-level))))
+ ;; closing tokens follow
((string-equal found-token "end")
(save-excursion
(lua-goto-matching-block-token nil found-pos)
@@ -749,7 +757,8 @@ use standalone."
(lua-calculate-indentation-block-modifier
nil (point))))
(cons 'relative (- lua-indent-level)))))
- ((string-equal found-token ")")
+ ((or (string-equal found-token ")")
+ (string-equal found-token "}"))
(save-excursion
(lua-goto-matching-block-token nil found-pos)
(cons 'absolute
- [nongnu] elpa/lua-mode c49fb68 023/468: Fixed lua-prompt-regex and handling of output without newline (bug #425), (continued)
- [nongnu] elpa/lua-mode c49fb68 023/468: Fixed lua-prompt-regex and handling of output without newline (bug #425), Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 99324a4 034/468: minor font-lock fix, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode c61bda2 040/468: Commit from Reuben:, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode cd5fa7d 010/468: lua-start-process: made program &optional argument (defaults to name), Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 13363db 017/468: Fixed typo (#470), Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 9730289 027/468: Insert Project page Link, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode bf0b902 033/468: New Release 20070708, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode ab9783f 041/468: Applied patch from Reuben Thomas:, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 2786823 043/468: Add example code to trigger lua-mode for hash-bang lines containing, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 4f4d3de 047/468: Add Makefile with dist and release targets, and ignore release zips., Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 16861a3 032/468: Fix bug #620 again: Wrong identation with tables,
Philip Kaludercic <=
- [nongnu] elpa/lua-mode e10183d 037/468: handle font-lock-variable-name-face (Reuben Thomas), Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode ab2d44c 038/468: Multiple changes by Reuben Thomas:, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode e057e22 044/468: Rename install.rst to README to help github and users., Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode b20ca34 051/468: Add note to send update to ELPA., Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode afdf074 053/468: Make defcustom declaration formats consistent., Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode ec1a0f2 063/468: Remove extraneous variable lua-indent-whitespace, use back-to-indentation instead, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 47ac4f3 056/468: Don't have the echo command printed itself., Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode a52e6b1 070/468: lua-left-shift-regexp: optimize and greatly reduce size, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 5fa9b81 077/468: lua-indent-line: don't change the indent if inside multiline string literal, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode aedf8a5 018/468: Documentation in restructured text, Philip Kaludercic, 2021/08/05