https://codereview.appspot.com/95710044/diff/20001/scm/documentation-lib.scm
File scm/documentation-lib.scm (right):

https://codereview.appspot.com/95710044/diff/20001/scm/documentation-lib.scm#newcode112
scm/documentation-lib.scm:112: (or (vector? val) ; vector is an ly-type
On 2014/05/30 08:38:23, dak wrote:
Comment makes no sense.

Would this pseudocode suffice?
  ; (ly-type? vector) => #t

The problem is that we need to make sure that most LilyPond internal
"datatypes" don't get displayed with @verbatim, since (pretty-print)
doesn't work on them, and they'll sail right past the page/screen
margin.  I'm not sure what else to call them; I'm referring to things
that look like #<Mom > or #<simple-closure > etc.

So this prevents that problem:
  (not (ly-type? val))

but causes another problem, namely that vectors would end up not getting
(pretty-print), which is the point after all.  Hence the conditional:
  (or (vector? val) ...

If the pseudocode I proposed above is still too abstruse, I welcome your
suggestions.

https://codereview.appspot.com/95710044/diff/20001/scm/documentation-lib.scm#newcode138
scm/documentation-lib.scm:138: (lambda (port) (pretty-print val port
#:display? #t))
On 2014/05/30 08:38:23, dak wrote:
Wouldn't #:display? #t show a partial value of "string" as string
without
quotes?  The examples in the issue report don't contain strings, so
it's hard to
guess.

That's correct, no quotes, hence the added quotes a few lines below:
  (string-append "\"" str "\"")

An example is in the BarLine node, which after processing looks like
this in internals.texi:
  @item @code{glyph} (string):
  @code{"|"}

https://codereview.appspot.com/95710044/diff/20001/scm/documentation-lib.scm#newcode144
scm/documentation-lib.scm:144: (string-regexp-substitute "\n " "\n  "
str)))
On 2014/05/30 08:38:23, dak wrote:
pretty-print has a key #:per-line-prefix.  Would that be easier to
use?

Yes, thank you.

https://codereview.appspot.com/95710044/

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to