diff options
author | Chris Wanstrath <chris@ozmm.org> | 2010-03-07 00:06:02 -0800 |
---|---|---|
committer | Chris Wanstrath <chris@ozmm.org> | 2010-03-07 00:06:02 -0800 |
commit | 3ecaa32a306b25f95bc76a2e41b6c25da0cc6687 (patch) | |
tree | 0a76a917594eca15a88accc8f7958be94fde221a | |
parent | ccdc4e231b7183ad1d176afcf6cd6f8dbf85bdfc (diff) | |
download | emacs-3ecaa32a306b25f95bc76a2e41b6c25da0cc6687.tar.gz |
use more semantic names for parts of syntax
-rw-r--r-- | coffee-mode.el | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/coffee-mode.el b/coffee-mode.el index db9c6065b7f..63c5d2a6096 100644 --- a/coffee-mode.el +++ b/coffee-mode.el @@ -100,16 +100,16 @@ print the compiled JavaScript.") ;; ;; Instance variables (implicit this) -(defvar coffee-constant-regexp "@\\w*\\|this") +(setq coffee-this-regexp "@\\w*\\|this") ;; Assignment -(defvar coffee-type-regexp "\\(\\w\\|\\.\\|_\\| \\|$\\)+?:") +(setq coffee-assign-regexp "\\(\\w\\|\\.\\|_\\| \\|$\\)+?:") ;; Booleans -(defvar coffee-functions-regexp "\\b\\(true\\|false\\|yes\\|no\\|on\\|off\\)\\b") +(setq coffee-boolean-regexp "\\b\\(true\\|false\\|yes\\|no\\|on\\|off\\)\\b") ;; Unused -(defvar coffee-event-regexp "") +(setq coffee-slash-regexp "\\/ ") ;; JavaScript Keywords (defvar coffee-js-keywords @@ -139,12 +139,12 @@ print the compiled JavaScript.") ;; Create the list for font-lock. ;; Each class of keyword is given a particular face -(defvar coffee-font-lock-keywords +(setq coffee-font-lock-keywords `( - (,coffee-constant-regexp . font-lock-variable-name-face) - (,coffee-type-regexp . font-lock-type-face) - (,coffee-event-regexp . font-lock-builtin-face) - (,coffee-functions-regexp . font-lock-constant-face) + (,coffee-this-regexp . font-lock-variable-name-face) + (,coffee-assign-regexp . font-lock-type-face) + (,coffee-slash-regexp . font-lock-builtin-face) + (,coffee-boolean-regexp . font-lock-constant-face) (,coffee-keywords-regexp . font-lock-keyword-face) ;; note: order above matters. `coffee-keywords-regexp' goes last because |