From 99376c78f2d68bd02d1d2186dec02b7e6c39ae11 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Mon, 24 Feb 2025 00:45:20 +0100 Subject: [PATCH] Use cl-with-gensyms in ert-with-message-capture * lisp/emacs-lisp/ert-x.el (ert-with-message-capture): Use cl-with-gensyms. (cherry picked from commit 45f5f718a07bb126bbd71952c5fbd1c5f126df7d) --- lisp/emacs-lisp/ert-x.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/ert-x.el b/lisp/emacs-lisp/ert-x.el index 3a58749b3b1..6a8e7b97f47 100644 --- a/lisp/emacs-lisp/ert-x.el +++ b/lisp/emacs-lisp/ert-x.el @@ -329,9 +329,7 @@ This is useful for separating the issuance of messages by the code under test from the behavior of the *Messages* buffer." (declare (debug (symbolp body)) (indent 1)) - (let ((g-message-advice (gensym)) - (g-print-advice (gensym)) - (g-collector (gensym))) + (cl-with-gensyms (g-message-advice g-print-advice g-collector) `(let* ((,var "") (,g-collector (lambda (msg) (setq ,var (concat ,var msg)))) (,g-message-advice (ert--make-message-advice ,g-collector)) -- 2.39.5