>From cd43cd7c4c4e98d2b62af84a0729f82fb361c25f Mon Sep 17 00:00:00 2001 From: stardiviner Date: Thu, 18 Oct 2018 12:55:30 +0800 Subject: [PATCH] Set all lang-mode-hook to nil to speedup source blocks fontify. --- lisp/org-src.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/org-src.el b/lisp/org-src.el index 9c462b7e7..271ca82b9 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -585,7 +585,14 @@ as `org-src-fontify-natively' is non-nil." (erase-buffer) ;; Add string and a final space to ensure property change. (insert string " ")) - (unless (eq major-mode lang-mode) (funcall lang-mode)) + (unless (eq major-mode lang-mode) + (message "%s enabled in source block" lang-mode) + ;; (make-local-variable (intern (format "%s-hook" lang-mode))) + ;; (set (intern (format "%s-hook" lang-mode)) nil) + (message "%s is %s" + (intern (format "%s-hook" lang-mode)) + (symbol-value (intern (format "%s-hook" lang-mode)))) + (funcall lang-mode)) (org-font-lock-ensure) (let ((pos (point-min)) next) (while (setq next (next-property-change pos)) -- 2.19.1