]> git.donarmstrong.com Git - lilypond.git/commit
Issue 5145/2: Allow $... to specify a markup command
authorDavid Kastrup <dak@gnu.org>
Mon, 12 Jun 2017 11:44:51 +0000 (13:44 +0200)
committerDavid Kastrup <dak@gnu.org>
Mon, 12 Jun 2017 15:17:45 +0000 (17:17 +0200)
commitc3b51542671a9af5647d4cbc63f7c8ae98c1c2bd
tree00be1f088f90ab6874c6958ed7e3018d22d993c6
parentda2cbdd4623e5ea51a2a99de4f2935b37195136e
Issue 5145/2: Allow $... to specify a markup command

This is a partial (though more flexible) substitute for \on-the-fly
since it allows to replace

\on-the-fly #(lambda (layout props args) ...)

with

$(let ((fun (lambda (layout props args) ...)))
   (set! (markup-command-signature fun) (list markup?))
   fun)

Namely: ad-hoc written functions (probably most useful when written
using macros) can be employed as markup commands when preceded with $
as long as they have a suitable markup command signature attached.
This feature is mainly added for consistency with music functions.
lily/include/lily-imports.hh
lily/lexer.ll
lily/lily-imports.cc