[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/lua-mode d759699 335/468: Merge pull request #129 from imm
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/lua-mode d759699 335/468: Merge pull request #129 from immerrr/fix-global-variable-in-lua-interpreter |
Date: |
Thu, 5 Aug 2021 04:59:04 -0400 (EDT) |
branch: elpa/lua-mode
commit d7596990cdd197d3db682c4b2ca5410a4b522574
Merge: 5640afe adb1f3a
Author: dennis again <immerrr@gmail.com>
Commit: GitHub <noreply@github.com>
Merge pull request #129 from immerrr/fix-global-variable-in-lua-interpreter
Fix global variable in lua interpreter
---
lua-mode.el | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/lua-mode.el b/lua-mode.el
index 4db8dd5..8137619 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -904,10 +904,20 @@ If none can be found before reaching LIMIT, return nil."
(and (setq last-search-matched
(re-search-forward lua-ml-begin-regexp limit 'noerror))
+ ;; Handle triple-hyphen '---[[' situation in which the multiline
+ ;; opener should be skipped.
+ ;;
+ ;; In HYPHEN1-HYPHEN2-BRACKET1-BRACKET2 situation (match-beginning
+ ;; 0) points to HYPHEN1, but if there's another hyphen before
+ ;; HYPHEN1, standard syntax table will only detect comment-start
+ ;; at HYPHEN2.
+ ;;
+ ;; We could check for comment-start at HYPHEN2, but then we'd have
+ ;; to flush syntax-ppss cache to remove the result saying that at
+ ;; HYPHEN2 there's no comment or string, because under some
+ ;; circumstances that would hide the fact that we put a
+ ;; comment-start property at HYPHEN1.
(or (lua-comment-or-string-start-pos (match-beginning 0))
- ;; Handle triple-hyphen '---[[' situation: match-beginning is
- ;; BEFORE the second hyphen, but the comment would only starts
- ;; AFTER it.
(and (eq ?- (char-after (match-beginning 0)))
(eq ?- (char-before (match-beginning 0)))))))
@@ -1692,7 +1702,7 @@ This function just searches for a `end' at the beginning
of a line."
" str = string.rep('\\n', lineoffset - 1) .. str"
" end"
""
- " x, e = loadstring(str, '@'..displayname)"
+ " local x, e = loadstring(str, '@'..displayname)"
" if e then"
" error(e)"
" end"
- [nongnu] elpa/lua-mode cadc1ea 312/468: to-be-fontified-as: improve error messages, (continued)
- [nongnu] elpa/lua-mode cadc1ea 312/468: to-be-fontified-as: improve error messages, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 444ac2f 320/468: Merge 'stable' back into 'master', Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode cae5db6 322/468: Fix derived-mode-p test, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 6511687 323/468: Merge pull request #116 from immerrr/fix-derived-mode-p, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 563ac50 325/468: Merge pull request #115 from RobertCochran/escape-tabs, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 3019e75 327/468: Merge pull request #117 from immerrr/fix-string-parsing, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode a0d6744 331/468: travis.yml: add Emacs-25.1, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode dccda19 336/468: Wrap lua--fill-paragraph in save-excursion, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 7a97e1b 341/468: correct spelling mistake, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 0715340 337/468: Merge pull request #131 from jorams/fill-paragraph-save-excursion, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode d759699 335/468: Merge pull request #129 from immerrr/fix-global-variable-in-lua-interpreter,
Philip Kaludercic <=
- [nongnu] elpa/lua-mode 459e3b7 427/468: Fix FIXME: `lua-prefix-key' is always `boundp', Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode b793852 434/468: Add regression test, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 6a30c39 447/468: lua-is-continuing-statement-p: short-circuit to false for "breaker" kws, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode b043ca4 451/468: lua-is-continuing-statement-p-1: fix missing save-excursion on branch, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 6a837f7 458/468: with-lua-buffer: ensure font-lock is activated, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 08d83fc 443/468: Merge pull request #180 from nbfalcon/bugfix/lua-start-process-hangs, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 56af490 446/468: lua-find-regexp: escape string/comment after a match is ignored, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 93da584 449/468: Bump indentation tests, add missing function-call-arguments suite, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 0018e95 452/468: make-indentation-pair: don't calculate full indentation on every closer, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode d2ff304 456/468: Copy cl-signum into lua--signum for backward compat, Philip Kaludercic, 2021/08/05