]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 2700: Change $ to # in docs where appropriate
authorDavid Kastrup <dak@gnu.org>
Fri, 6 Jul 2012 05:43:16 +0000 (07:43 +0200)
committerDavid Kastrup <dak@gnu.org>
Wed, 1 Aug 2012 02:34:33 +0000 (04:34 +0200)
This is a followup issue from issue 2637

Documentation/changes.tely
Documentation/extending/programming-interface.itely
Documentation/extending/scheme-tutorial.itely
Documentation/learning/fundamental.itely
Documentation/ly-examples/cary-layout.ily
Documentation/notation/changing-defaults.itely
Documentation/notation/pitches.itely
Documentation/notation/rhythms.itely

index 6545c1dd69c8de8ce1ce80753cfb22b054a1449b..912800a3a1578a0b38a466ccf47a85f72304dad9 100644 (file)
@@ -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
index 46d7fd512fa08490edcbfe5b993aa960a07c49ad..a861d573224cbc61d9354e7751d2787cf2e99357 100644 (file)
@@ -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
 
 
index 9b055dcba6475654ce457bc1fcaaf3860d04de01..bf2abe38d79c5c1305cd0aea12cac4574fd18db5 100644 (file)
@@ -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''{
index a419121dcab455f346f2cf6e2000a57b4f203897..22f1e277d63368c37a18624ebba894d23273261e 100644 (file)
@@ -3069,7 +3069,7 @@ padText =
      (parser location padding)
      (number?)
    #{
-     \once \override TextScript #'padding = $padding
+     \once \override TextScript #'padding = #padding
    #})
 
 \relative c''' {
index 97030d53df056ecc13a4ecd851f16702f09e683d..7b88676f1ad18062fdaa3534e6b44bde3e80b409 100644 (file)
@@ -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 #})
index ae59d06ee8214b17aedbf26f4cee78828b0a9e69..38b5edda3105471f57fd068f5f0d54dacba23046 100644 (file)
@@ -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 }
index 42643abde9a0112877cfb20a9d4923b47a745aad..99e8e0932b0936ebab737cf19ded2cb4663f9d99 100644 (file)
@@ -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"
 #})
 {
index ed9424c45550e97fe87711672944f980132d6615..aeff800bc8a3b8bbfd6019ef9d4e7c96089af8b3 100644 (file)
@@ -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
   }
 >>