branch: elpa/devil
commit c1f51dc2e74e086e6f119d6e85b54645344d0ecf
Author: Susam Pal <[email protected]>
Commit: Susam Pal <[email protected]>
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.