aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/unicode-tokens.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/unicode-tokens.el b/lib/unicode-tokens.el
index 8369de1c..68fd69c7 100644
--- a/lib/unicode-tokens.el
+++ b/lib/unicode-tokens.el
@@ -578,12 +578,15 @@ tokenised symbols."
(interactive)
(setq unicode-tokens-highlight-unicode
(not unicode-tokens-highlight-unicode))
+ (unicode-tokens-highlight-unicode-setkeywords)
+ (font-lock-fontify-buffer))
+
+(defun unicode-tokens-highlight-unicode-setkeywords ()
(if unicode-tokens-highlight-unicode
(font-lock-add-keywords
nil unicode-tokens-unicode-highlight-patterns)
(font-lock-remove-keywords
- nil unicode-tokens-unicode-highlight-patterns))
- (font-lock-fontify-buffer))
+ nil unicode-tokens-unicode-highlight-patterns)))
;;
;; Minor mode
@@ -640,6 +643,8 @@ representation. Commands available:
(lambda (p) (add-to-list 'font-lock-extra-managed-props p))
unicode-tokens-font-lock-extra-managed-props)
+ (unicode-tokens-highlight-unicode-setkeywords)
+
(font-lock-fontify-buffer)
(if unicode-tokens-use-shortcuts