From: David Kastrup Date: Fri, 6 Jul 2012 05:43:16 +0000 (+0200) Subject: Issue 2700: Change $ to # in docs where appropriate X-Git-Tag: release/2.15.42-1~15 X-Git-Url: https://git.donarmstrong.com/lilypond.git?a=commitdiff_plain;h=3c169262c8f580c0f42c09f3a61b9ae9f0d6261c;p=lilypond.git Issue 2700: Change $ to # in docs where appropriate This is a followup issue from issue 2637 --- diff --git a/Documentation/changes.tely b/Documentation/changes.tely index 6545c1dd69..912800a3a1 100644 --- a/Documentation/changes.tely +++ b/Documentation/changes.tely @@ -228,6 +228,11 @@ reduces the containing expression, greatly reducing the potential for premature evaluation. There are also @q{splicing} operators @code{$@@} and @code{#@@} for interpreting the members of a list individually. +@item +To reduce the necessity for using @code{$}, Scheme expressions written +with @code{#} are interpreted as music inside of music lists, and as +markups or markup lists inside of markups. + @item Support for jazz-like chords has been improved: Lydian and altered chords are recognised; separators between chord modifiers are now diff --git a/Documentation/extending/programming-interface.itely b/Documentation/extending/programming-interface.itely index 46d7fd512f..a861d57322 100644 --- a/Documentation/extending/programming-interface.itely +++ b/Documentation/extending/programming-interface.itely @@ -427,7 +427,7 @@ withAlt = \override Stem #'length = #(* 7.0 mag) \override NoteHead #'font-size = #(inexact->exact (* (/ 6.0 (log 2.0)) (log mag))) - $music + #music \revert Stem #'length \revert NoteHead #'font-size #}) @@ -756,7 +756,7 @@ padding. "Draw a double box around text." (interpret-markup layout props #@{\markup \override #'(box-padding . 0.4) \box - \override #'(box-padding . 0.6) \box @{ $text @}#@})) + \override #'(box-padding . 0.6) \box @{ #text @}#@})) @end lisp or, equivalently @@ -800,7 +800,7 @@ now as follows: (interpret-markup layout props #@{\markup \override #`(box-padding . ,inter-box-padding) \box \override #`(box-padding . ,box-padding) \box - @{ $text @} #@})) + @{ #text @} #@})) @end lisp Again, the equivalent version using the markup macro would be: @@ -836,7 +836,7 @@ customized: (interpret-markup layout props #{\markup \override #`(box-padding . ,inter-box-padding) \box \override #`(box-padding . ,box-padding) \box - { $text } #})) + { #text } #})) \markup \double-box A \markup \override #'(inter-box-padding . 0.8) \double-box A @@ -942,7 +942,7 @@ indented. The indent width is taken from the @code{props} argument. #(define-markup-list-command (paragraph layout props args) (markup-list?) #:properties ((par-indent 2)) (interpret-markup-list layout props - #@{\markuplist \justified-lines @{ \hspace #par-indent $args @} #@})) + #@{\markuplist \justified-lines @{ \hspace #par-indent #args @} #@})) @end example diff --git a/Documentation/extending/scheme-tutorial.itely b/Documentation/extending/scheme-tutorial.itely index 9b055dcba6..bf2abe38d7 100644 --- a/Documentation/extending/scheme-tutorial.itely +++ b/Documentation/extending/scheme-tutorial.itely @@ -667,8 +667,12 @@ without consulting the Scheme reader, and thus only variable names consistent with the current Lilypond mode are accepted. The immediate action of @code{$} can lead to surprises, @ref{Input -variables and Scheme}. Using @code{#} where the parser supports it is -usually preferable. +variables and Scheme}. Using @code{#} where the parser supports it +is usually preferable. Inside of music expressions, expressions +created using @code{#} @emph{are} interpreted as music. However, +they are @emph{not} copied before use. If they are part of some +structure that might still get used, you may need to use +@code{ly:music-deep-copy} explicitly. @funindex $@@ @funindex #@@ @@ -855,14 +859,14 @@ written as @example ... -@{ $@@newLa @} +@{ #@@newLa @} @end example Here, every element of the list stored in @code{newLa} is taken in sequence and inserted into the list, as if we had written @example -@{ $(first newLa) $(second newLa) @} +@{ #(first newLa) #(second newLa) @} @end example Now in all of these forms, the Scheme code is evaluated while the @@ -1102,7 +1106,7 @@ let Lilypond direct just this output to a file of its own: @example @{ - $(with-output-to-file "display.txt" + #(with-output-to-file "display.txt" (lambda () #@{ \displayMusic @{ c'4\f @} #@})) @} @end example @@ -1524,16 +1528,16 @@ We can use it to create new commands: @lilypond[quote,verbatim,ragged-right] tempoPadded = #(define-music-function (parser location padding tempotext) - (number? string?) + (number? markup?) #{ - \once \override Score.MetronomeMark #'padding = $padding + \once \override Score.MetronomeMark #'padding = #padding \tempo \markup { \bold #tempotext } #}) \relative c'' { \tempo \markup { "Low tempo" } c4 d e f g1 - \tempoPadded #4.0 #"High tempo" + \tempoPadded #4.0 "High tempo" g4 f e d c1 } @end lilypond @@ -1544,7 +1548,7 @@ Even music expressions can be passed in: @lilypond[quote,verbatim,ragged-right] pattern = #(define-music-function (parser location x y) (ly:music? ly:music?) #{ - $x e8 a b $y b a e + #x e8 a b #y b a e #}) \relative c''{ diff --git a/Documentation/learning/fundamental.itely b/Documentation/learning/fundamental.itely index a419121dca..22f1e277d6 100644 --- a/Documentation/learning/fundamental.itely +++ b/Documentation/learning/fundamental.itely @@ -3069,7 +3069,7 @@ padText = (parser location padding) (number?) #{ - \once \override TextScript #'padding = $padding + \once \override TextScript #'padding = #padding #}) \relative c''' { diff --git a/Documentation/ly-examples/cary-layout.ily b/Documentation/ly-examples/cary-layout.ily index 97030d53df..7b88676f1a 100644 --- a/Documentation/ly-examples/cary-layout.ily +++ b/Documentation/ly-examples/cary-layout.ily @@ -74,31 +74,31 @@ beam = #(define-music-function (parser location left right) (number? number?) ) fraction = #(define-music-function (parser location music) (ly:music?) - #{ \tweak #'text #tuplet-number::calc-fraction-text $music #}) + #{ \tweak #'text #tuplet-number::calc-fraction-text #music #}) triangle = #(define-music-function (parser location music) (ly:music?) - #{ \once \set shapeNoteStyles = #'#(do do do do do do do) $music #}) + #{ \once \set shapeNoteStyles = #'#(do do do do do do do) #music #}) semicircle = #(define-music-function (parser location music) (ly:music?) - #{ \once \set shapeNoteStyles = #'#(re re re re re re re) $music #}) + #{ \once \set shapeNoteStyles = #'#(re re re re re re re) #music #}) blackdiamond = #(define-music-function (parser location music) (ly:music?) - #{ \once \set shapeNoteStyles = #'#(mi mi mi mi mi mi mi) $music #}) + #{ \once \set shapeNoteStyles = #'#(mi mi mi mi mi mi mi) #music #}) tiltedtriangle = #(define-music-function (parser location music) (ly:music?) - #{ \once \set shapeNoteStyles = #'#(fa fa fa fa fa fa fa) $music #}) + #{ \once \set shapeNoteStyles = #'#(fa fa fa fa fa fa fa) #music #}) square = #(define-music-function (parser location music) (ly:music?) - #{ \once \set shapeNoteStyles = #'#(la la la la la la la) $music #}) + #{ \once \set shapeNoteStyles = #'#(la la la la la la la) #music #}) wedge = #(define-music-function (parser location music) (ly:music?) - #{ \once \set shapeNoteStyles = #'#(ti ti ti ti ti ti ti) $music #}) + #{ \once \set shapeNoteStyles = #'#(ti ti ti ti ti ti ti) #music #}) harmonic = #(define-music-function (parser location music) (ly:music?) - #{ \once \set shapeNoteStyles = #'#(harmonic harmonic harmonic harmonic harmonic harmonic harmonic) $music #}) + #{ \once \set shapeNoteStyles = #'#(harmonic harmonic harmonic harmonic harmonic harmonic harmonic) #music #}) cross = #(define-music-function (parser location music) (ly:music?) - #{ \once \set shapeNoteStyles = #'#(cross cross cross cross cross cross cross) $music #}) + #{ \once \set shapeNoteStyles = #'#(cross cross cross cross cross cross cross) #music #}) white = #(define-music-function (parser location music) (ly:music?) - #{ \once \override NoteHead #'duration-log = #1 $music #}) + #{ \once \override NoteHead #'duration-log = #1 #music #}) diff --git a/Documentation/notation/changing-defaults.itely b/Documentation/notation/changing-defaults.itely index ae59d06ee8..38b5edda31 100644 --- a/Documentation/notation/changing-defaults.itely +++ b/Documentation/notation/changing-defaults.itely @@ -4104,7 +4104,8 @@ must return @code{#t}. @item @code{@var{@dots{}music@dots{}}} @tab normal LilyPond input, using @code{$} (in places where only Lilypond constructs are allowed) or @code{#} (to use it as a Scheme -value or music function argument) to reference arguments +value or music function argument or music inside of music lists) to +reference arguments (eg. @samp{#arg1}). @end multitable @@ -4188,7 +4189,7 @@ custosNote = \tweak NoteHead #'text \markup \musicglyph #"custodes.mensural.u0" \tweak Stem #'stencil ##f - $note + #note #}) \relative c' { c4 d e f \custosNote g } diff --git a/Documentation/notation/pitches.itely b/Documentation/notation/pitches.itely index 42643abde9..99e8e0932b 100644 --- a/Documentation/notation/pitches.itely +++ b/Documentation/notation/pitches.itely @@ -2577,7 +2577,7 @@ the accidental style to @code{forget}: @lilypond[verbatim,quote] forget = #(define-music-function (parser location music) (ly:music?) #{ \accidentalStyle "forget" - $music + #music \accidentalStyle "modern" #}) { diff --git a/Documentation/notation/rhythms.itely b/Documentation/notation/rhythms.itely index ed9424c455..aeff800bc8 100644 --- a/Documentation/notation/rhythms.itely +++ b/Documentation/notation/rhythms.itely @@ -3361,9 +3361,9 @@ MyCadenza = \relative c' { \MyCadenza c'1 } \new Staff { - $(mmrest-of-length MyCadenza) + #(mmrest-of-length MyCadenza) c'1 - $(skip-of-length MyCadenza) + #(skip-of-length MyCadenza) c'1 } >>