diff options
author | 2009-07-30 13:03:13 +0000 | |
---|---|---|
committer | 2009-07-30 13:03:13 +0000 | |
commit | a67ee66f8d72bd3d61938f4b41bddac842c3633e (patch) | |
tree | 219cc6962b660b3dbb4fab35cbe85e3f44b566eb | |
parent | 3c39b98f2629ececd48b9c8fcb8b801b549ffd41 (diff) |
Fix so highlighting of real unicode characters setting is obeyed when mode toggled on/off.
-rw-r--r-- | lib/unicode-tokens.el | 9 |
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 |