[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: music functions and markups
From: |
Nicolas Sceaux |
Subject: |
Re: music functions and markups |
Date: |
Mon, 25 Oct 2004 19:29:10 +0200 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
Han-Wen Nienhuys <address@hidden> writes:
> it is cleaner; it is a little bit longer, but it fits exactly within
> the existing patterns. I would use Text_interface::markup_p
> for
>
>> if (scm_car (s) == Music_type_p_proc)
>> str += "music";
>> - else if (ly_c_procedure_p (scm_car (s)))
>> - str += "scm";
>> + else if (ly_c_procedure_p (scm_car (s)))
>> + {
>> + if (ly_c_equal_p (scm_car (s), scm_primitive_eval (ly_symbol2scm
>> ("markup?"))))
>> + str += "markup";
>> + else
>> + str += "scm";
>> + }
>
> just add another
>
> else if
>
> before
>
> else if (ly_c_procedure_p (. .))
Do you mean:
if (scm_car (s) == Music_type_p_proc)
str += "music";
else if (Text_interface::markup_p (scm_car (s)))
str += "markup";
else if (ly_c_procedure_p (scm_car (s)))
str += "scm";
As `s' is just a list of predicates, eg '(markup? ly:music?),
Text_interface::markup_p (markup?) will always be false, no?
nicolas