Carl Sorensen <c_soren...@byu.edu> writes: > On 6/9/10 7:34 AM, "James Lowe" <james.l...@datacore.com> wrote: > >> Hello, >> >> Going on from the 'curly quotes' problem that was resolved a couple of >> days back in our documentation, I noticed in the NR while scanning >> through another 'odd' single quote mark after the hash (#) character. >> >> \override #`(direction . ,UP) > > This has UP evaluated at the time the cons cell is made. >> >> instead of >> >> \override #'(direction . ,UP) > > This is incorrect. The alternative syntax would be > > \override #'(direction . UP) > > which would put the symbol UP in the cons cell.
A correct equivalent alternative would be \override #(cons 'direction UP) It is my personal opinion that it would be best to avoid making data structures that require the user to revert to backcomma as the only alternative for readable results. One way to get closer to that is to use (self-evaluating) keywords. Of course, \override #(cons #:direction UP) does not seem like an improvement at first glance. It does have the advantage that functions defined with define* and called with keyword/value pairs have a natural way of dealing with them. Also keywords make clear that 'direction (which is actually translated into (quote direction) by the reader, and into a symbol by the Lisp evaluator, and thus is a nuisance for macro expansion which sits in between) is not used for the purpose of delaying evaluation, but as a tag. > The back-quote means that any expression in the back-quoted list that > is preceded by a comma will be evaluated. And anything preceded by ,@ will be evaluated and folded into the surrounding list. > The regular single quote means that nothing in the list will be > evaluated; the list will just be assembled. It is instructive to see what happens to `(whatever ,whatever) inside of a '-quoted list. -- David Kastrup _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel