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

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

[nongnu] elpa/buttercup 3c6c88825d 06/10: Use &rest args in advice defin


From: ELPA Syncer
Subject: [nongnu] elpa/buttercup 3c6c88825d 06/10: Use &rest args in advice definition for display-warning
Date: Mon, 26 Feb 2024 18:59:16 -0500 (EST)

branch: elpa/buttercup
commit 3c6c88825dc191d1b1a8d1949e6d72790613f0fc
Author: Ola Nilsson <ola.nilsson@gmail.com>
Commit: Ola Nilsson <ola.nilsson@gmail.com>

    Use &rest args in advice definition for display-warning
    
    Authored-by: Stefan Monnier
---
 buttercup.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/buttercup.el b/buttercup.el
index c03aa60a05..2b4b9258ba 100644
--- a/buttercup.el
+++ b/buttercup.el
@@ -1957,7 +1957,7 @@ Colorize parts of the output if COLOR is non-nil."
 FMT and ARGS are passed to `format'."
   (send-string-to-terminal (apply #'format fmt args)))
 
-(defun buttercup--display-warning (fn type message &optional level buffer-name)
+(defun buttercup--display-warning (fn type message &optional level buffer-name 
&rest args)
   "Log all warnings to a special buffer while running buttercup specs.
 
 Emacs' normal display logic for warnings doesn't mix well with
@@ -1977,8 +1977,8 @@ finishes."
       (cl-letf
           ((warning-minimum-level :emergency)
            ((symbol-function 'message) 'ignore))
-        (funcall fn type message level buffer-name))
-    (funcall fn type message level buffer-name)))
+        (apply fn type message level buffer-name args))
+    (apply fn type message level buffer-name args)))
 
 (advice-add 'display-warning :around #'buttercup--display-warning)
 



reply via email to

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