Permalink
Browse files

Fix bug where keyword at start of buffer isn't highlighted.

Fixes #115
  • Loading branch information...
1 parent 9f0cad6 commit 4ad6568393911d0cf182ece705661c7dea17d02e @jart jart committed Apr 14, 2013
Showing with 5 additions and 6 deletions.
  1. +5 −6 coffee-mode.el
View
@@ -436,12 +436,11 @@ called `coffee-compiled-buffer-name'."
;; Regular expression combining the above three lists.
(defvar coffee-keywords-regexp
;; keywords can be member names.
- (concat "[^.]"
- (regexp-opt (append coffee-js-reserved
- coffee-js-keywords
- coffee-cs-keywords
- iced-coffee-cs-keywords) 'words)))
-
+ (format "\\<%s\\>"
+ (regexp-opt (append coffee-js-reserved
+ coffee-js-keywords
+ coffee-cs-keywords
+ iced-coffee-cs-keywords) 'words)))
;; Create the list for font-lock. Each class of keyword is given a
;; particular face.

0 comments on commit 4ad6568

Please sign in to comment.