 ;;
 ;; Define token classes and regular expressions
 ;;
-(defconst buzz-identifier-regexp "[[:alnum:]_]+"
-  "Regexp matching a Buzz identifier")
+(setq buzz-identifier-regexp "[[:alnum:]_]+")
 ;; Keywords
 (setq buzz-keywords '("var" "nil" "if" "else" "function" "return" "for" "while" "and" "or" "not"))
 (setq buzz-keywords-regexp (regexp-opt buzz-keywords 'words))

  "Major mode for editing Buzz scripts."
  :group 'buzz
  :syntax-table buzz-syntax-table
  ;; Set font lock
  (setq font-lock-defaults '((buzz-font-lock-list)))
  ;; Modify the keymap
  (define-key buzz-mode-map [remap comment-dwim] 'buzz-comment-dwim)
  ;;
  (setq indent-line-function 'buzz-indent-line) 
  ;; Clear memory
  (setq buzz-keywords-regexp nil)
  (setq buzz-functions-regexp nil)
  )

;;
;; Associate Buzz mode with .bzz files
;;
(add-to-list 'auto-mode-alist '("\\.bzz\\'" . buzz-mode))

(provide 'buzz-mode)

;;
;; Buzz syntax table
;;
(setq buzz-syntax-table
      (let ((synTable (make-syntax-table)))
        (modify-syntax-entry ?# "< b" synTable)
