branch: externals/bufferlo
commit 1ab597c021ee33511fdaad942cc6dd5ac064f6ba
Author: Florian Rommel <[email protected]>
Commit: Flo Rommel <[email protected]>

    Fix temp buffer macro expansion
    
    Make 'bufferlo--with-temp-buffer' actually expand to code that creates
    and switches to the temporary buffer at runtime. Previously, the temp
    buffer logic ran at macro-expansion time, so the macro returned the
    body form without running it inside the expected temp buffer.
    
    * bufferlo.el (bufferlo--with-temp-buffer): Fix macro.
---
 bufferlo.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/bufferlo.el b/bufferlo.el
index 85820066a2..c8142c398d 100644
--- a/bufferlo.el
+++ b/bufferlo.el
@@ -1413,11 +1413,11 @@ Otherwise it is a list of conditions for which to 
prompt."
 ;; TODO: In Emacs 31, bind expose-hidden-buffer t to allow hidden buffers.
 (defmacro bufferlo--with-temp-buffer (&rest body)
   "Execute BODY with \"*bufferlo temp buffer*\" current buffer."
-  (let ((buff-name (generate-new-buffer-name "*bufferlo temp buffer*")))
-    (with-current-buffer (get-buffer-create buff-name t)
-      (unwind-protect
-          `(progn ,@body)
-        (kill-buffer buff-name)))))
+  `(let ((buff-name (generate-new-buffer-name "*bufferlo temp buffer*")))
+     (with-current-buffer (get-buffer-create buff-name t)
+       (unwind-protect
+           (progn ,@body)
+         (kill-buffer buff-name)))))
 
 (defun bufferlo--make-frame (&optional restore-geometry)
   "Make a new frame with `fullscreen' suppressed if RESTORE-GEOMETRY is non 
nil."

Reply via email to