[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/rust-mode c49bb12 184/486: Cache (regexp-opt rust-special-
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/rust-mode c49bb12 184/486: Cache (regexp-opt rust-special-types 'symbols) in rust-is-lt-char-operator |
Date: |
Sat, 7 Aug 2021 09:25:15 -0400 (EDT) |
branch: elpa/rust-mode
commit c49bb125fc9beb835ffee8d78625cbe7541dd262
Author: Ben Segall <talchas@talchas.net>
Commit: Ben Segall <talchas@talchas.net>
Cache (regexp-opt rust-special-types 'symbols) in rust-is-lt-char-operator
regexp-opt is generally intended to be cached, and the extra GC was
causing noticeable lag when typing sometimes.
---
rust-mode.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/rust-mode.el b/rust-mode.el
index 40a2492..e451dfa 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -378,6 +378,7 @@
;; newer Emacs versions, but will work on Emacs 23.)
(defun regexp-opt-symbols (words)
(concat "\\_<" (regexp-opt words t) "\\_>"))
+(defconst rust-re-special-types (regexp-opt-symbols rust-special-types))
(defvar rust-mode-font-lock-keywords
(append
@@ -851,7 +852,7 @@
(or
;; The special types can't take type param lists, so a < after one is
;; always an operator
- (looking-at (regexp-opt rust-special-types 'symbols))
+ (looking-at rust-re-special-types)
(rust-is-in-expression-context 'ident)))
- [nongnu] elpa/rust-mode ded5ef7 155/486: Pass explicit second argument to looking-back, (continued)
- [nongnu] elpa/rust-mode ded5ef7 155/486: Pass explicit second argument to looking-back, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 6d5b02e 153/486: Merge pull request #56 from pnkfelix/pr=fix-word-syntax, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 96f7f79 156/486: Fix free-variable warnings, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 8eb6029 165/486: handle case where blink-matching-paren-distance is nil, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 3798c7e 167/486: fix quoting in two doc strings, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 78e8b08 163/486: Merge pull request #62 from MicahChalmer/a-couple-of-readme-fixes, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 6e72f64 176/486: Fix bugs in raw strings and character literals, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 5937589 169/486: set :safe on two defcustoms, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 102ad5f 181/486: Merge pull request #67 from tromey/fix-two-docstrings, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 88ff62a 182/486: Remove unnecessary code with call to undefined function, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode c49bb12 184/486: Cache (regexp-opt rust-special-types 'symbols) in rust-is-lt-char-operator,
ELPA Syncer <=
- [nongnu] elpa/rust-mode ec3855f 188/486: Recognize runaway raw strings, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 99c5571 190/486: Merge pull request #68 from tromey/fix-issue-53, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 5f5a428 192/486: Merge pull request #88 from kw-udon/nested-comment, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 1ff1d75 193/486: Merge pull request #90 from Wilfred/fix_type_word_boundaries, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 30d1dac 198/486: Recognize compiler help and notes as "info" messages, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 61a35f6 202/486: Merge pull request #97 from syohex/update-url, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 0cf2bc3 255/486: Merge pull request #157 from fmdkdd/master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode c2a0c13 269/486: Add info to enable rustfmt, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode cd09a54 280/486: Merge pull request #189 from froydnj/minor-cleanups, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 19e6f60 291/486: Merge pull request #199 from tromey/open-paren-in-column-0, ELPA Syncer, 2021/08/07