[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/lua-mode 70b9384 448/468: Don't evaluate lua-is-continuing
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/lua-mode 70b9384 448/468: Don't evaluate lua-is-continuing-statement-p-1 twice |
Date: |
Thu, 5 Aug 2021 04:59:27 -0400 (EDT) |
branch: elpa/lua-mode
commit 70b9384fd0f567878f4778bfa0ec5cc0397f38a9
Author: immerrr <immerrr+lua@gmail.com>
Commit: immerrr <immerrr+lua@gmail.com>
Don't evaluate lua-is-continuing-statement-p-1 twice
---
lua-mode.el | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/lua-mode.el b/lua-mode.el
index 48598e1..018184a 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -1470,11 +1470,15 @@ This true is when the line :
;; opener line, ") + long_function_name2({", which in its turn is decided
;; by the "long_function_name(" line, which is a continuation line
;; because the line before it ends with a binary operator.
- (while (and (lua--goto-line-beginning-rightmost-closer)
- (lua--backward-up-list-noerror)
- (lua-is-continuing-statement-p-1)))
- (lua-is-continuing-statement-p-1)))
-
+ (cl-loop
+ ;; Go to opener line
+ while (and (lua--goto-line-beginning-rightmost-closer)
+ (lua--backward-up-list-noerror))
+ ;; If opener line is continuing, repeat. If opener line is not
+ ;; continuing, return nil.
+ always (lua-is-continuing-statement-p-1)
+ ;; We get here if there was no opener to go to: check current line.
+ finally return (lua-is-continuing-statement-p-1))))
(defun lua-make-indentation-info-pair (found-token found-pos)
"Create a pair from FOUND-TOKEN and FOUND-POS for indentation calculation.
- [nongnu] elpa/lua-mode 5dfc5be 399/468: Merge pull request #168 from immerrr/index-requires-as-imenu-items, (continued)
- [nongnu] elpa/lua-mode 5dfc5be 399/468: Merge pull request #168 from immerrr/index-requires-as-imenu-items, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode a3a71b1 400/468: Merge pull request #151 from edam/indent-nested-blocks, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 35b6e4c 402/468: Merge pull request #169 from tarsiiformes/typos, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 724bfa5 409/468: Fix support for file-local vars in indentation tests, add tests for blocks, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 1365ba0 412/468: Enable XFAIL-ing tests for continuation in block intros, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 51a32ef 417/468: Merge pull request #176 from immerrr/improve-indentation-for-continuation-lines, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode b37710e 418/468: Enable fontification of variable names in "for" and function parameters, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 9c275cd 419/468: Add regression test for issue #157, fix lua-get-line-faces, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 5fe5f57 422/468: Fix wait-for-prompt to take lua-prompt-regexp into account, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 83ec53d 430/468: `lua-funcname-at-point': be more strict, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 70b9384 448/468: Don't evaluate lua-is-continuing-statement-p-1 twice,
Philip Kaludercic <=
- [nongnu] elpa/lua-mode 350acce 450/468: Don't do lua-backward-up-list calculation for overrides if not necessary, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 3e89784 454/468: Fix test suite names, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode af274e4 455/468: Merge pull request #184 from immerrr/fix-and-optimize-finding-matching-blocks, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode d81c700 466/468: Bump version tag, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode b9a476c 467/468: Merge pull request #194 from phikal/patch-1, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 28155ba 241/468: Update README.md, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 45a881d 243/468: lua-search-documentation: fix 'foo.bar' lookups broken when making '.' punctuation, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode f8a41b8 246/468: Fix cl-lib dependency for Emacs23 tests, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 9e200e8 247/468: Fix font-locking of functions with underscores (issue #63), Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode bbab5a6 253/468: Don't anchor arglist continuation to block openers, Philip Kaludercic, 2021/08/05