commit 916f63b80d8b89104566b1e100b6ef70aa6d07de
parent dcfafcb70ed823c21802a4273a86efcbff2bfd85
Author: Wilfred Hughes <me@wilfred.me.uk>
Date: Sun, 4 Jun 2017 11:09:25 +0100
font-lock-ensure does not exists in Emcs 24
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/helpful.el b/helpful.el
@@ -188,7 +188,10 @@ This allows us to distinguish strings from symbols."
(with-temp-buffer
(insert source)
(delay-mode-hooks (funcall major-mode))
- (font-lock-ensure)
+ (if (fboundp 'font-lock-ensure)
+ (font-lock-ensure)
+ (with-no-warnings
+ (font-lock-fontify-buffer)))
(buffer-string)))
;; TODO: allow RET to go the relevant line of code.