[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: music functions and markups
From: |
Han-Wen Nienhuys |
Subject: |
Re: music functions and markups |
Date: |
Sat, 23 Oct 2004 13:16:08 +0200 |
address@hidden writes:
> Han-Wen Nienhuys <address@hidden> writes:
>
> > I think the embedded_scm_or_full_markup is inelegant. Why can't you
> > add a separate
> >
> > MUSIC_FUNCTION_SCM_MARKUP
> >
> > to do what you want? the typechecking will be more detailed, and it's
> > IMO less ugly.
>
> Ok.
> However, I must be missing something obvious, as this does not seem
> cleaner:
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 (. .))
--
Han-Wen Nienhuys | address@hidden | http://www.xs4all.nl/~hanwen