From 4f3b6a074d07e434d1ff523d039e769a69b0389a Mon Sep 17 00:00:00 2001 From: Jason Blevins Date: Tue, 24 Oct 2017 13:03:34 -0400 Subject: [PATCH] Use math mode toggle function when enabling via file variables Also, we should reload extensions when _either_ local variable is present, rather than requiring both to be present. --- markdown-mode.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/markdown-mode.el b/markdown-mode.el index bb24700..881013c 100644 --- a/markdown-mode.el +++ b/markdown-mode.el @@ -8671,8 +8671,10 @@ or span." Checks to see if there is actually a ‘markdown-mode’ file local variable before regenerating font-lock rules for extensions." (when (and (boundp 'file-local-variables-alist) - (assoc 'markdown-enable-wiki-links file-local-variables-alist) - (assoc 'markdown-enable-math file-local-variables-alist)) + (or (assoc 'markdown-enable-wiki-links file-local-variables-alist) + (assoc 'markdown-enable-math file-local-variables-alist))) + (when (assoc 'markdown-enable-math file-local-variables-alist) + (markdown-toggle-math markdown-enable-math)) (markdown-reload-extensions))) -- 2.11.4.GIT