diff options
Diffstat (limited to 'lisp/progmodes/prog-mode.el')
-rw-r--r-- | lisp/progmodes/prog-mode.el | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el index edb32a2d5a4..79fe56aebbf 100644 --- a/lisp/progmodes/prog-mode.el +++ b/lisp/progmodes/prog-mode.el @@ -196,9 +196,6 @@ on the symbol." ;;;###autoload (define-minor-mode prettify-symbols-mode "Toggle Prettify Symbols mode. -With a prefix argument ARG, enable Prettify Symbols mode if ARG is -positive, and disable it otherwise. If called from Lisp, enable -the mode if ARG is omitted or nil. When Prettify Symbols mode and font-locking are enabled, symbols are prettified (displayed as composed characters) according to the rules @@ -214,6 +211,9 @@ You can enable this mode locally in desired buffers, or use `global-prettify-symbols-mode' to enable it for all modes that support it." :init-value nil + (when prettify-symbols--keywords + (font-lock-remove-keywords nil prettify-symbols--keywords) + (setq prettify-symbols--keywords nil)) (if prettify-symbols-mode ;; Turn on (when (setq prettify-symbols--keywords (prettify-symbols--make-keywords)) @@ -229,9 +229,6 @@ support it." (font-lock-flush)) ;; Turn off (remove-hook 'post-command-hook #'prettify-symbols--post-command-hook t) - (when prettify-symbols--keywords - (font-lock-remove-keywords nil prettify-symbols--keywords) - (setq prettify-symbols--keywords nil)) (when (memq 'composition font-lock-extra-managed-props) (setq font-lock-extra-managed-props (delq 'composition font-lock-extra-managed-props)) |