[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/lua-mode 0b4ae97 184/468: Merge branch 'fix-36' of git://g
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/lua-mode 0b4ae97 184/468: Merge branch 'fix-36' of git://github.com/vhallac/lua-mode |
Date: |
Thu, 5 Aug 2021 04:58:32 -0400 (EDT) |
branch: elpa/lua-mode
commit 0b4ae975d7cd18825bd3ca62c1ed53423964f33b
Merge: 08ff6ea 086736c
Author: immerrr <immerrr+lua@gmail.com>
Commit: immerrr <immerrr+lua@gmail.com>
Merge branch 'fix-36' of git://github.com/vhallac/lua-mode
---
lua-mode.el | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/lua-mode.el b/lua-mode.el
index 54585bf..50d1bb0 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -924,6 +924,21 @@ previous one even though it looked like an
end-of-statement.")
;; the control inside this function
(re-search-forward lua-cont-bol-regexp line-end t))))
+(defconst lua-block-starter-regexp
+ (eval-when-compile
+ (concat
+ "\\(\\_<"
+ (regexp-opt '("do" "while" "repeat" "until" "if" "then"
+ "else" "elseif" "end" "for" "local") t)
+ "\\_>\\)")))
+
+(defun lua-first-token-starts-block-p ()
+ "Returns true if the first token on this line is a block starter token."
+ (let ((line-end (line-end-position)))
+ (save-excursion
+ (beginning-of-line)
+ (re-search-forward (concat "\\s *" lua-block-starter-regexp) line-end
t))))
+
(defun lua-is-continuing-statement-p (&optional parse-start)
"Return non-nil if the line continues a statement.
More specifically, return the point in the line that is continued.
@@ -938,6 +953,7 @@ The criteria for a continuing statement are:
(if parse-start (goto-char parse-start))
(save-excursion (setq prev-line (lua-forward-line-skip-blanks 'back)))
(and prev-line
+ (not (lua-first-token-starts-block-p))
(or (lua-first-token-continues-p)
(and (goto-char prev-line)
;; check last token of previous nonblank line
- [nongnu] elpa/lua-mode 3c8cfe6 160/468: Add credit, reformat new code to fit into 77 cols, (continued)
- [nongnu] elpa/lua-mode 3c8cfe6 160/468: Add credit, reformat new code to fit into 77 cols, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 6b48a94 165/468: Second part of the fix for #34, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 7a3a5f6 169/468: Add script to facilitate indentation testing, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 7f8e519 178/468: Add backward compatibility aliases for cl-assert & cl-labels functions, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode e6a46ee 182/468: Update README.md, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 4b407cc 203/468: Print 'Prefix key set to ...' only when setting via interactive function, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 88b0ec3 209/468: Fix indentation for blocks starting on continued lines, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 32b5639 210/468: Fix wrong imenu generic expression, add one more regexp to match 'x = function(...)' definitions, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 57d3e46 212/468: lua-mode.el: bump "Version:" field, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode c7c8d0c 179/468: Fix bug with lua-mode-syntax-table initialization, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 0b4ae97 184/468: Merge branch 'fix-36' of git://github.com/vhallac/lua-mode,
Philip Kaludercic <=
- [nongnu] elpa/lua-mode 562540e 073/468: Fix lua-calculate-indentation: indent to 0 when inside string literal, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 0f6048d 082/468: Implement lua-mark-all-multiline-literals function, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 96eba74 085/468: lua-(comment/string)-p: add optional pos parameter, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode aef55a6 091/468: Update contact info in README; bump version, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 8c28ed5 095/468: Add utility funcs lua-inside-multiline-p and lua-get-multiline-start, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 79ff5d0 110/468: lua-postprocess-output-buffer: replace save-excursion/set-buffer with with-current-buffer, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 9b929d4 115/468: Reorder operations in release target so that no pushing/sending is done if master differs from remotes/origin/master, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 9c94413 118/468: lua-comment/-string-p funcs: wrap into save-excursion because syntax-ppss alters point position, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode e470943 131/468: lua-mode-abbrev-table: mark abbreviations as :system so that they're not counted as user-defined and are not saved automatically (issue #8), Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode f4ab885 144/468: lua-cont-eol-regexp: add "return" keyword too, Philip Kaludercic, 2021/08/05