From 2283615a0843f138a5401e361ad89d083f904daf Mon Sep 17 00:00:00 2001 From: Tom May Date: Tue, 12 Jan 2016 08:24:24 -0800 Subject: [PATCH] Only call font-lock-refresh-defaults if font-lock-mode is non-nil. Otherwise font-lock-mode will be enabled even if the user has disabled it. --- markdown-mode.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/markdown-mode.el b/markdown-mode.el index e59c4c2d..c09036fd 100644 --- a/markdown-mode.el +++ b/markdown-mode.el @@ -5745,7 +5745,9 @@ This is an exact copy of `line-number-at-pos' for use in emacs21." '(markdown-mode-font-lock-keywords nil nil nil nil (font-lock-syntactic-face-function . markdown-syntactic-face))) - (when (fboundp 'font-lock-refresh-defaults) (font-lock-refresh-defaults)))) + (when (and font-lock-mode + (fboundp 'font-lock-refresh-defaults)) + (font-lock-refresh-defaults)))) (defun markdown-enable-math (&optional arg) "Toggle support for inline and display LaTeX math expressions.