mirror of
https://github.com/org-roam/org-roam
synced 2025-08-01 12:17:21 -05:00
"Refactor org-roam-message as a function" (#595)
* Refactor org-roam-message as a function
Add to commentary that org-roam-macs may contain other utility
functions (similar to org-macs).
* Fix typos
* Try again
* Fix typo
* fix syntax error
* fix syntax error
* Apply args correctly
* Refactor with funcall
* Revert "Refactor with funcall"
This reverts commit 0807252d64
.
Co-authored-by: Leo Vivier <leo.vivier+dev@gmail.com>
This commit is contained in:
@ -27,7 +27,8 @@
|
||||
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; This library implements macros used throughout org-roam
|
||||
;; This library implements macros and utility functions used throughout
|
||||
;; org-roam.
|
||||
;;
|
||||
;;
|
||||
;;; Code:
|
||||
@ -58,11 +59,10 @@ to look.
|
||||
(error-message-string err)
|
||||
,templates))))
|
||||
|
||||
(defmacro org-roam-message (format-string &rest args)
|
||||
"Message MSG with ARGS when `org-roam-verbose' is true."
|
||||
(declare (indent 0) (debug t))
|
||||
`(when org-roam-verbose
|
||||
(message (concat "(org-roam) " ,format-string) ,@args)))
|
||||
(defun org-roam-message (format-string &rest args)
|
||||
"Pass FORMAT-STRING and ARGS to `message' when `org-roam-verbose' is t."
|
||||
(when org-roam-verbose
|
||||
(apply #'message `(,(concat "(org-roam) " format-string) ,@args))))
|
||||
|
||||
(provide 'org-roam-macs)
|
||||
|
||||
|
Reference in New Issue
Block a user