lilypond-devel
[Top][All Lists]
Advanced

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

Re: Allow (closed) scheme function calls as text scripts. (issue 6812088


From: dak
Subject: Re: Allow (closed) scheme function calls as text scripts. (issue 6812088)
Date: Mon, 05 Nov 2012 23:18:45 +0000

Reviewers: lemzwerg, thomasmorley65,

Message:
On 2012/11/05 22:45:06, thomasmorley65 wrote:
On 2012/11/05 22:40:36, lemzwerg wrote:
> Very nice!

Can't review the code.
But from description:
GREAT

It's actually more a fix of a shortcoming.  Scheme functions should have
worked in most places for strings and markups already, but apparently I
had some places not covered, text scripts being one of them.

Description:
Allow (closed) scheme function calls as text scripts.

This allows, for example, things like

arrow = #(define-scheme-function (parser location arg) (pair?)
  #{ \markup { \line { \draw-line #arg \arrow-head #X #RIGHT ##t  } }
  #})

\score {
  \new Staff {
     c4_\arrow #'(10 . 0)
  }
}

which, as contrasted to markup commands, is more compact to use.

Please review this at http://codereview.appspot.com/6812088/

Affected files:
  M lily/parser.yy


Index: lily/parser.yy
diff --git a/lily/parser.yy b/lily/parser.yy
index eb8f8cbcc9c57ec85166ab5ad73011152699b90c..4eb488a37f53fed2e4a34e3a944b629e3352c49f 100644
--- a/lily/parser.yy
+++ b/lily/parser.yy
@@ -2774,7 +2774,7 @@ gen_text_def:
                        make_simple_markup ($1));
                $$ = t->unprotect ();
        }
-       | embedded_scm_bare
+       | embedded_scm_closed
        {
                Music *m = unsmob_music ($1);
                if (m && m->is_mus_type ("post-event"))





reply via email to

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