[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/lua-mode 1a0e191 255/468: lua--rx-symbol: fix shy-grouping
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/lua-mode 1a0e191 255/468: lua--rx-symbol: fix shy-grouping |
Date: |
Thu, 5 Aug 2021 04:58:48 -0400 (EDT) |
branch: elpa/lua-mode
commit 1a0e191c9dcd34248d0cab85ff5ca37343714a3f
Author: immerrr <immerrr+lua@gmail.com>
Commit: immerrr <immerrr+lua@gmail.com>
lua--rx-symbol: fix shy-grouping
---
lua-mode.el | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/lua-mode.el b/lua-mode.el
index ca6230b..20c8d40 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -114,6 +114,7 @@
(eval-and-compile
(defvar lua-rx-constituents)
+ (defvar rx-parent)
(defun lua-rx-to-string (form &optional no-group)
"Lua-specific replacement for `rx-to-string'.
@@ -148,8 +149,15 @@ element is itself expanded with `lua-rx-to-string'. "
(push form lua-rx-constituents)))
(defun lua--rx-symbol (form)
- (rx-form `(seq symbol-start (or ,@(cdr form))
- symbol-end)))
+ ;; form is a list (symbol XXX ...)
+ ;; Skip initial 'symbol
+ (setq form (cdr form))
+ ;; If there's only one element, take it from the list, otherwise wrap the
+ ;; whole list into `(or XXX ...)' form.
+ (setq form (if (eq 1 (length form))
+ (car form)
+ (append '(or) form)))
+ (rx-form `(seq symbol-start ,form symbol-end) rx-parent))
(setq lua-rx-constituents (copy-sequence rx-constituents))
- [nongnu] elpa/lua-mode 3c9ec08 391/468: Depend on Emacs 24.3, (continued)
- [nongnu] elpa/lua-mode 3c9ec08 391/468: Depend on Emacs 24.3, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 478da4a 393/468: Fixed order of expected & actual in matcher's message, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode d15bdb1 395/468: Merge pull request #164 from sergeyklay/fix/buttercup-matcher-message, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode c1b6019 396/468: Fix reproducibility issue caused by %d pattern in export-subst, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode c9b9d47 401/468: Fix typo, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode d7eaa8e 403/468: Add lua-backward-up-list command, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode db8d474 408/468: Fix indentation of multiline while/for+do and if/elseif+then, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 099c130 240/468: Bump NEWS, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 7099b81 248/468: Bump tests: fix some, move expected failures to separate test cases, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 6a5fa6b 249/468: Remove unused tempfile functionality, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 1a0e191 255/468: lua--rx-symbol: fix shy-grouping,
Philip Kaludercic <=
- [nongnu] elpa/lua-mode 6f7800f 258/468: Merge (and squash) pull request #66 from rolpereira/master, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 3265552 263/468: indentation-test: add continuation tests for unary ops and ..., Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 9abad67 273/468: Merge remote-tracking branch 'upstream/master', Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode ec491dd 291/468: lua-process-init-code: use load when loadstring is not available, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode d7ccb88 294/468: Add new builtin functions and operators from Lua 5.3, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode c0d8c50 295/468: Merge pull request #86 from immerrr/if-loadstring-is-nil-use-load, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 3f7a032 300/468: Move .nosearch in test/, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode ca24f4c 302/468: Add `run-lua` alias, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 530aa9f 303/468: Merge pull request #97 from marsam/master, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 92d9729 307/468: Add init-tryout.el to persistent initialization code, Philip Kaludercic, 2021/08/05