summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wanstrath <chris@ozmm.org>2010-03-07 00:06:02 -0800
committerChris Wanstrath <chris@ozmm.org>2010-03-07 00:06:02 -0800
commit3ecaa32a306b25f95bc76a2e41b6c25da0cc6687 (patch)
tree0a76a917594eca15a88accc8f7958be94fde221a
parentccdc4e231b7183ad1d176afcf6cd6f8dbf85bdfc (diff)
downloademacs-3ecaa32a306b25f95bc76a2e41b6c25da0cc6687.tar.gz
use more semantic names for parts of syntax
-rw-r--r--coffee-mode.el18
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