branch: elpa/forth-mode
commit 992bfb64b4a9019b9b92ce4ff9192410402644ae
Author: Lars Brinkhoff <[email protected]>
Commit: Lars Brinkhoff <[email protected]>
Fix warning about font-lock-fontify-buffer non-interactive use.
---
test/tests.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/test/tests.el b/test/tests.el
index 2f24b864cc..7087ecab0e 100644
--- a/test/tests.el
+++ b/test/tests.el
@@ -23,10 +23,15 @@
(forth-mode)
,@body))
+(unless (boundp 'font-lock-ensure)
+ ;; Emacs 24 doesn't have font-lock-ensure.
+ (defun font-lock-ensure ()
+ (font-lock-fontify-buffer)))
+
(defun forth-assert-face (content pos face)
(when (boundp 'syntax-propertize-function)
(forth-with-temp-buffer content
- (font-lock-fontify-buffer)
+ (font-lock-ensure)
(should (eq face (get-text-property pos 'face))))))
(defun forth-strip-| (string)