[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/lua-mode 7605d2c 186/468: lua-font-lock-keywords: rewrite
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/lua-mode 7605d2c 186/468: lua-font-lock-keywords: rewrite poorly written regexp (issue #47) |
Date: |
Thu, 5 Aug 2021 04:58:33 -0400 (EDT) |
branch: elpa/lua-mode
commit 7605d2c3d9cd6df4c89870a54c14c2c119102a2e
Author: immerrr <immerrr+lua@gmail.com>
Commit: immerrr <immerrr+lua@gmail.com>
lua-font-lock-keywords: rewrite poorly written regexp (issue #47)
Said regexp caused O(4^N) match attempts on lines containing N
underscores, because underscore had 'word' syntax class.
---
lua-mode.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lua-mode.el b/lua-mode.el
index 8fd0b23..acd11be 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -432,8 +432,8 @@ index of respective Lua reference manuals.")
(1 font-lock-builtin-face) (2 font-lock-builtin-face nil noerror))
;; Handle function names in assignments
- '("\\(\\(\\sw:\\|\\sw\\.\\|\\sw_\\|\\sw\\)+\\)[ \t]*=[
\t]*\\(function\\)\\_>"
- (1 font-lock-function-name-face nil t) (3 font-lock-keyword-face))
+ '("\\([[:alnum:]_]+\\(?:[:.][[:alnum:]_]+\\)*\\)[ \t]*=[ \t]*function\\_>"
+ (1 font-lock-function-name-face))
;; octal numbers
'("\\_<0x[[:xdigit:]]+\\_>" . font-lock-constant-face)
- [nongnu] elpa/lua-mode 37f51cb 152/468: Fix multiline literal highlighting for long strings (#20), (continued)
- [nongnu] elpa/lua-mode 37f51cb 152/468: Fix multiline literal highlighting for long strings (#20), Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode b33f255 154/468: Make lua-mode-hook customizable., Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode ec26ea4 155/468: Fix: Single-line conditionals can confuse indenting (#22), Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode fa3470e 157/468: Merge pull request #28 from rrthomas/master, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode ced5226 161/468: lua-with-silent-modifications: fix old style backquotes in fallback implementation, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode bba7fc0 163/468: Fix byte-compilation, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode d128a74 170/468: Add initial version of test/indentation/README.md, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 4399254 177/468: Merge pull request #39, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 08ff6ea 183/468: Merge remote-tracking branch 'origin/master', Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 8aa98ae 185/468: Non-functional refactoring, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 7605d2c 186/468: lua-font-lock-keywords: rewrite poorly written regexp (issue #47),
Philip Kaludercic <=
- [nongnu] elpa/lua-mode c24f16e 188/468: Put Lua reference resources into TODO file, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 5d81110 196/468: Wrap symbols required during compilation into (eval-when compile ...), Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 040bc8f 213/468: Bump NEWS, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 1d8dc55 214/468: Rename lua--function-name-rx, use it in font-lock keywords init, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode d552910 218/468: Add a test for defun font-locking; add make check target to run it, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 4141c85 222/468: Make builtin font-locking more stable; enable it after ".." operator, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 1716660 223/468: Fix interaction with electric-pair-mode (issue #54), Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 4217513 230/468: Remove highlighting of numbers for consistency with other major-modes, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 248bea3 233/468: Remove syntax hacks for '.' & '_' characters, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode c5e9620 238/468: Fix stacktrace parsing in inferior process buffer, Philip Kaludercic, 2021/08/05