lilypond-devel
[Top][All Lists]
Advanced

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

Re: [patch] clean up scheme rehearsal mark format code


From: Han-Wen Nienhuys
Subject: Re: [patch] clean up scheme rehearsal mark format code
Date: Mon, 15 Aug 2005 00:55:48 +0200
User-agent: Mozilla Thunderbird 1.0.6-1.1.fc4 (X11/20050720)

Nicolas Sceaux wrote:
Erlend Aasland <address@hidden> writes:


+(defmacro-public def-format-mark-command (type cmd)
+  (let* ((pfx "format-mark-")
+         (sfx (symbol->string type))
+         (ord-cmd (string->symbol (string-append pfx sfx)))
+         (box-cmd (string->symbol (string-append pfx (string-append "box-" 
sfx))))
+         (circle-cmd (string->symbol (string-append pfx (string-append 
"circle-" sfx)))))
+  `(begin
+    (define-public (,ord-cmd mark context) (make-bold-markup (,@cmd)))
+    (define-public (,box-cmd mark context) (make-bold-markup (make-box-markup 
(,@cmd))))
+    (define-public (,circle-cmd mark context) (make-bold-markup 
(make-circle-markup (,@cmd))))
+)))


It would be good if `def-format-mark-command' had a detailed
documentation string, especially as it creates symbols to name new
functions.

I actually think that this is not a clean up. The original, while lengthy, was perfectly easy to understand. I don't why you need to add (a public!) macro to condense it further. Maybe we should think of a better interface to the mark formatter. MAybe we could do something like

  markMarkup = \markup  {
    \circle \bold \fromproperty #'context:bar-number
  }

and drop the special markFormatter interface.

Any  takers / sponsors for a patch?

--
 Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen




reply via email to

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