emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/forth-mode 992bfb64b4 103/153: Fix warning about font-lock


From: ELPA Syncer
Subject: [nongnu] elpa/forth-mode 992bfb64b4 103/153: Fix warning about font-lock-fontify-buffer non-interactive use.
Date: Sat, 29 Jan 2022 08:02:22 -0500 (EST)

branch: elpa/forth-mode
commit 992bfb64b4a9019b9b92ce4ff9192410402644ae
Author: Lars Brinkhoff <lars@nocrew.org>
Commit: Lars Brinkhoff <lars@nocrew.org>

    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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]