Changeset 36

Show
Ignore:
Timestamp:
08/30/06 15:35:56 (2 years ago)
Author:
verbosus
Message:

Added support for keywords, comments, variables in Django syntax highlighting

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • hacks/trunk/django-mode.el

    r35 r36  
    1717(defconst django-font-lock-keywords-1 
    1818  (list 
    19    '("\\({{ ?[a-zA-Z0-9._\":|]+? ?}}\\)" . font-lock-variable-name-face) 
    20    '("\\({%\\|\\%}\\|{{\\|}}\\)" . font-lock-function-name-face) 
     19   '("{% ?comment ?%}\\(\n?.*?\\)+?{% ?endcomment ?%}" . font-lock-comment-face) 
     20   '("{% ?\\(\\(end\\)?\\(extends\\|for\\|cycle\\|filter\\|firstof\\|debug\\|if\\|ifchanged\\|ifequal\\|ifnotequal\\|include\\|load\\|now\\|regroup\\|spaceless\\|ssi\\|templatetag\\|widthratio\\|block\\)\\) ?.*? ?%}" . 1) 
     21   '("{{ ?\\(.*?\\) ?}}" . (1 font-lock-variable-name-face)) 
     22   '("{%\\|\\%}\\|{{\\|}}" . font-lock-builtin-face) 
    2123   "Minimal highlighting expressions for Django mode")) 
    2224