diff options
| author | Felix S Klock II <pnkfelix@pnkfx.org> | 2015-07-20 09:07:24 +0200 |
|---|---|---|
| committer | Felix S Klock II <pnkfelix@pnkfx.org> | 2015-07-20 09:07:24 +0200 |
| commit | ee564d555f53c94c7a36ab1ef1d9df2b7d6f3bf8 (patch) | |
| tree | bc2f2893ea99f89d2682b65f9c88007d86d07952 /rust-mode.el | |
| parent | c0e3878c6a0104196bc12d6e17cb249ee853a61e (diff) | |
| parent | c49bb125fc9beb835ffee8d78625cbe7541dd262 (diff) | |
| download | rust-mode-ee564d555f53c94c7a36ab1ef1d9df2b7d6f3bf8.tar.gz | |
Merge pull request #85 from talchas/master
Cache (regexp-opt rust-special-types 'symbols) in rust-is-lt-char-operator
Diffstat (limited to 'rust-mode.el')
| -rw-r--r-- | rust-mode.el | 3 |
1 files changed, 2 insertions, 1 deletions
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))) |
