Committed. Thanks.

- Nathan

Dima wrote:
> Updated.
>
> ===================================================================
> --- haml-mode.el      (revision 444)
> +++ haml-mode.el      (working copy)
> @@ -7,10 +7,10 @@
>  ;;; functions are similar to those in yaml-mode and python-mode.
>
>  ;;; To install, save this somewhere and add the following to your .emacs 
> file:
> -;;;
> +;;;
>  ;;; (add-to-list 'load-path "/path/to/haml-mode.el")
>  ;;; (require 'haml-mode nil 't)
> -;;;
> +;;;
>
>  ;;; Code:
>
> @@ -64,12 +64,14 @@
>  ;; Font lock
>  (defconst haml-font-lock-keywords-1
>    (list
> -   '("^ *%\\w+"        . font-lock-function-name-face)
> -   '("#\\w+"        . font-lock-keyword-face)
> +   '("^[ \t]*/.*"     . font-lock-comment-face)
> +   '("^ *%\\w+\/?"    . font-lock-function-name-face)
> +   '("#\\w+"          . font-lock-keyword-face)
>     '("\\.\\w+"        . font-lock-keyword-face)
> -   '("^ *=.*"         . font-lock-string-face)
> -   '("^ *-.*"   . font-lock-string-face)
> -   '("^!!!.*"          . font-lock-constant-face)))
> +   '(":\\w+"          . font-lock-constant-face)
> +   '("'[^']*'"        . font-lock-string-face)
> +   '("{[^}]*}"        . font-lock-variable-name-face)
> +   '("^!!!.*"         . font-lock-constant-face)))
>
>  ;; Constants
>
> @@ -107,6 +109,13 @@
>
>  ;; Mode setup
>
> +(defvar haml-mode-syntax-table nil
> +  "Syntax table in use in haml-mode buffers.")
> +(unless haml-mode-syntax-table
> +  (setq haml-mode-syntax-table (make-syntax-table))
> +  (modify-syntax-entry ?: "." haml-mode-syntax-table)
> +  (modify-syntax-entry ?_ "w" haml-mode-syntax-table))
> +
>  (defvar haml-mode-map ()
>    "Keymap used in `haml-mode' buffers.")
>  (if haml-mode-map
> @@ -120,12 +129,12 @@
>    "Simple mode to edit Haml.
>
>  \\{haml-mode-map}"
> +  (set-syntax-table haml-mode-syntax-table)
>    (set (make-local-variable 'indent-line-function) 'haml-indent-line)
> -  (make-local-variable 'font-lock-defaults)
> -  (setq font-lock-defaults
> -        '((haml-font-lock-keywords-1)
> -          nil
> -          t)))
> +  (set (make-local-variable 'font-lock-defaults)
> +       '((haml-font-lock-keywords-1)
> +         nil
> +         t)))
>
>  ;; Indentation and electric keys
>
> >
>
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to