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

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

[nongnu] elpa/lua-mode 6a837f7 458/468: with-lua-buffer: ensure font-loc


From: Philip Kaludercic
Subject: [nongnu] elpa/lua-mode 6a837f7 458/468: with-lua-buffer: ensure font-lock is activated
Date: Thu, 5 Aug 2021 04:59:29 -0400 (EDT)

branch: elpa/lua-mode
commit 6a837f79a3a462ef525b76712d529b9dff4f2345
Author: immerrr <immerrr+lua@gmail.com>
Commit: immerrr <immerrr+lua@gmail.com>

    with-lua-buffer: ensure font-lock is activated
---
 test/utils.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/test/utils.el b/test/utils.el
index 6fc7912..b8f26be 100644
--- a/test/utils.el
+++ b/test/utils.el
@@ -127,10 +127,15 @@ This is a mere typing/reading aid for lua-mode's 
font-lock tests."
 (defmacro with-lua-buffer (&rest body)
   (declare (debug (&rest form)))
   `(with-temp-buffer
-     (lua-mode)
+     ;; font-lock is not activated if buffer name is temporary (starts with a
+     ;; space) and if `noninteractive' is non-nil. Ensure tests that use
+     ;; font-lock still work.
+     (rename-buffer "temp-buffer.lua" t)
+     (let (noninteractive)
+       (lua-mode)
+       (font-lock-mode 1))
      (set (make-local-variable 'lua-process) nil)
      (set (make-local-variable 'lua-process-buffer) nil)
-     (font-lock-fontify-buffer)
      (pop-to-buffer (current-buffer))
      (unwind-protect
       (progn ,@body)



reply via email to

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