From 04c66829ebaf9f60186bc22cc5a2f671e4233339 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 8 Jul 2018 13:43:18 +0200 Subject: [PATCH] Don't init prettify-symbols-mode in special modes Or eshell, term and comint modes. --- modules/ui/pretty-code/config.el | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/ui/pretty-code/config.el b/modules/ui/pretty-code/config.el index e0eb89e0d..6b474e6a6 100644 --- a/modules/ui/pretty-code/config.el +++ b/modules/ui/pretty-code/config.el @@ -14,13 +14,15 @@ besides what is listed.") (setq prettify-symbols-unprettify-at-point 'right-edge) (defun +pretty-code|init-pretty-symbols () - "Enabled `prettify-symbols-mode'. + "Enable `prettify-symbols-mode'. -If the current major mode is disabled in `+pretty-code-enabled-modes', this -function does nothing. Otherwise, it sets the value of -`prettify-code-symbols-alist' according to `+pretty-code-symbols-alist' for the -current major mode." - (unless (eq major-mode 'fundamental-mode) +If in fundamental-mode, or a mode derived from special, comint, eshell or term +modes, this function does nothing. + +Otherwise it builds `prettify-code-symbols-alist' according to +`+pretty-code-symbols-alist' for the current major-mode." + (unless (or (eq major-mode 'fundamental-mode) + (derived-mode-p 'special-mode 'comint-mode 'eshell-mode 'term-mode)) (when (or (eq +pretty-code-enabled-modes t) (if (eq (car +pretty-code-enabled-modes) 'not) (not (memq major-mode (cdr +pretty-code-enabled-modes)))