"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 0807252d64230840faaa8687fee8399a08e3f8b4.

Co-authored-by: Leo Vivier <leo.vivier+dev@gmail.com>
master
N V 6 years ago committed by GitHub
parent 3efe315ff1
commit ad5fca5440
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      org-roam-macs.el

@ -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)

Loading…
Cancel
Save