lilypond-devel
[Top][All Lists]
Advanced

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

Re: Named book file suffixes -- regtest?


From: Carl D. Sorensen
Subject: Re: Named book file suffixes -- regtest?
Date: Sat, 28 Feb 2009 18:09:31 -0700

On 2/28/09 5:37 PM, "Marek Klein" <address@hidden> wrote:

> 
> My current solution is:
> (set! counter-alist (assoc-set! counter-alist output-suffix (1+
> output-count)))
> 
> Reinhold said, it would be better to use ly:parser-define! instead of set!
> But I don't understand how... NR says:
> Function: ly:parser-define! parser-smob  symbol  val
> 
> Bind symbol to val in parser-smobĀ¹s module.
> It's not clear enough for me... if I try for example:
> (ly:parser-define! parser counter-alist (assoc-set! counter-alist
> output-suffix (1+ output-count)))
> I get following error:
> 
> Parsing.../home/marek/lilypond/usr/share/lilypond/current/scm/lily-library.scm
> :152:5: In procedure ly:parser-define! in expression (ly:parser-define! parser
> counter-alist ...):
> /home/marek/lilypond/usr/share/lilypond/current/scm/lily-library.scm:152:5:
> Wrong type argument in position 2 (expecting symbol): ()

I think this error message says that it's expecting a symbol, and instead it
gets an empty list, which is the value of counter-alist right now.

So I think you should try

(ly:parser-define! parser 'counter-alist (assoc-set! counter-alist
output-suffix (1+ output-count)))

This puts the symbol as the argument, rather than the value of the symbol, I
think.

Carl





reply via email to

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