Skip to content

Commit

Permalink
Disable font lock if the keyword does not match the whole word. Fixes v…
Browse files Browse the repository at this point in the history
…alpackett#6.

Add \\> to anchor to end of keyword.
  • Loading branch information
johnpaulett committed Jan 3, 2012
1 parent 0449553 commit 36c28f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@
(add-hook 'django-mode-hook
(lambda ()
(font-lock-add-keywords nil
'(("\\<\\(django\\|models\\|forms\\|request\\)" 1 font-lock-type-face)
("\\<\\(get_list_or_404\\|get_object_or_404\\|redirect\\|render_to_response\\)" . font-lock-builtin-face))
'(("\\<\\(django\\|models\\|forms\\|request\\)\\>" 1 font-lock-type-face)
("\\<\\(get_list_or_404\\|get_object_or_404\\|redirect\\|render_to_response\\)\\>" . font-lock-builtin-face))
)))

(easy-menu-define django-menu django-mode-map "Django menu"
Expand Down

0 comments on commit 36c28f9

Please sign in to comment.