From 3ecaa32a306b25f95bc76a2e41b6c25da0cc6687 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Sun, 7 Mar 2010 00:06:02 -0800 Subject: use more semantic names for parts of syntax --- coffee-mode.el | 18 +++++++++--------- 1 file 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 -- cgit v1.2.1