chiark
/
gitweb
/
~mdw
/
profile
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cf25528
)
el/dot-emacs.el: Fix fontification for Rust keywords and builtins.
author
Mark Wooding
<mdw@distorted.org.uk>
Sun, 23 Jul 2017 11:18:23 +0000
(12:18 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sun, 23 Jul 2017 12:47:10 +0000
(13:47 +0100)
el/dot-emacs.el
patch
|
blob
|
blame
|
history
diff --git
a/el/dot-emacs.el
b/el/dot-emacs.el
index 97c20cea1304712fa261fc0d9928a2a25ba1d762..f64da0b633e5017fd426d488dc78c07da2bd48d4 100644
(file)
--- a/
el/dot-emacs.el
+++ b/
el/dot-emacs.el
@@
-2427,13
+2427,13
@@
(defun mdw-fontify-rust ()
(list
;; Handle the keywords defined above.
(list
;; Handle the keywords defined above.
- (list (concat "\\
<\\(" rust-keywords "\\)\\
>")
+ (list (concat "\\
_<\\(" rust-keywords "\\)\\_
>")
'(0 font-lock-keyword-face))
'(0 font-lock-keyword-face))
- (list (concat "\\
<\\(" rust-builtins "\\)\\
>")
+ (list (concat "\\
_<\\(" rust-builtins "\\)\\_
>")
'(0 font-lock-variable-name-face))
;; Handle numbers too.
'(0 font-lock-variable-name-face))
;; Handle numbers too.
- (list (concat "\\<\\("
+ (list (concat "\\
_
<\\("
"[0-9][0-9_]*"
"\\(" "\\(\\.[0-9_]+\\)?[eE][-+]?[0-9_]+"
"\\|" "\\.[0-9_]+"
"[0-9][0-9_]*"
"\\(" "\\(\\.[0-9_]+\\)?[eE][-+]?[0-9_]+"
"\\|" "\\.[0-9_]+"
@@
-2445,7
+2445,7
@@
(defun mdw-fontify-rust ()
"\\|" "0b[01_]+"
"\\)"
"\\([ui]\\(8\\|16\\|32\\|64\\|s\\|size\\)\\)?"
"\\|" "0b[01_]+"
"\\)"
"\\([ui]\\(8\\|16\\|32\\|64\\|s\\|size\\)\\)?"
- "\\)\\>")
+ "\\)\\
_
>")
'(0 mdw-number-face))
;; And anything else is punctuation.
'(0 mdw-number-face))
;; And anything else is punctuation.