Skip to content
Browse files

Disable font lock if the keyword does not match the whole word. Fixes #6

.

Add \\> to anchor to end of keyword.
  • Loading branch information...
1 parent 0449553 commit 36c28f91e3c1f4bf39e423d362e086183f144946 @johnpaulett committed Jan 3, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 django-mode.el
View
4 django-mode.el
@@ -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"

0 comments on commit 36c28f9

Please sign in to comment.
Something went wrong with that request. Please try again.