]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/music-functions.scm
Define define-void-function and \void
[lilypond.git] / scm / music-functions.scm
index be4d62e438de36c7a67aba984bfbbbf097eea357..bfec250992e5c9c7910e496a7f40823a48fadd6e 100644 (file)
@@ -850,6 +850,14 @@ parameter."
 
   `(define-syntax-function scheme? ,@rest))
 
+(defmacro-public define-void-function rest
+  "This defines a Scheme function like @code{define-scheme-function} with
+void return value (i.e., what most Guile functions with `unspecified'
+value return).  Use this when defining functions for executing actions
+rather than returning values, to keep Lilypond from trying to interpret
+the return value."
+  `(define-syntax-function void? ,@rest #f (begin)))
+
 (defmacro-public define-event-function rest
   "Defining macro returning event functions.
 Syntax: