branch: elpa/rust-mode
commit ee564d555f53c94c7a36ab1ef1d9df2b7d6f3bf8
Merge: c0e3878 c49bb12
Author: Felix S Klock II <[email protected]>
Commit: Felix S Klock II <[email protected]>

    Merge pull request #85 from talchas/master
    
    Cache (regexp-opt rust-special-types 'symbols) in rust-is-lt-char-operator
---
 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)))
 

Reply via email to