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

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

[nongnu] elpa/devil c1f51dc2e7 1/2: Evaluate logging arguments iff loggi


From: ELPA Syncer
Subject: [nongnu] elpa/devil c1f51dc2e7 1/2: Evaluate logging arguments iff logging is enabled
Date: Mon, 5 Jun 2023 07:00:20 -0400 (EDT)

branch: elpa/devil
commit c1f51dc2e74e086e6f119d6e85b54645344d0ecf
Author: Susam Pal <susam@susam.net>
Commit: Susam Pal <susam@susam.net>

    Evaluate logging arguments iff logging is enabled
---
 devil.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/devil.el b/devil.el
index b98788f301..8244748344 100644
--- a/devil.el
+++ b/devil.el
@@ -69,10 +69,10 @@ activate Devil.")
   (setq devil-logging (not devil-logging))
   (message "Devil: Logging %s" (if devil-logging "enabled" "disabled")))
 
-(defun devil--log (format-string &rest args)
+(defmacro devil--log (format-string &rest args)
   "Write log message with the given FORMAT-STRING and ARGS."
-  (when devil-logging
-    (apply #'message (concat "Devil: " format-string) args)))
+  `(when devil-logging
+     (message (concat "Devil: " ,format-string) ,@args)))
 
 (defun devil--custom-devil-key (symbol value)
   "Set Devil key variable SYMBOL to the key sequence in given VALUE.



reply via email to

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