[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch: Make #{ ... #} wagonloads more useful

From: David Kastrup
Subject: Re: Patch: Make #{ ... #} wagonloads more useful
Date: Sun, 28 Aug 2011 21:13:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Kieren MacMillan <address@hidden> writes:

> Hi David,
>> #(define-markup-command (double-box layout props text) (markup?)
>>  "Draw a double box around text."
>>  (interpret-markup layout props
>>     #{\markup \override #'(box-padding . 0.4) \box \override #'(box-padding 
>> . 0.6) \box { $text } #}))
>> After all, that looks decidedly less obscure than the markup macro.
> This is fabulous — thanks for the very useful patch!

The actually funny thing is that the patch does not even touch any code
specific to \markup.  It's just fallout from me getting tired about
shift/reduce conflicts when trying to make #{ ... #} work for postevents
and maybe something else, and then decided to just hijack the already
conflict-free assignment syntax from the parser.  I found out about that
particular use only after getting completely baffled by the output of
something like

#(display #{ \markup {a b c} #})

(try it!) and then playing around with define-markup-command until
working code dropped out.

It's a nice step forward to making the programming interfaces of
Lilypond more straightforward to use.

David Kastrup

reply via email to

[Prev in Thread] Current Thread [Next in Thread]