]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/my-lily-lexer.cc (start_main_input): define input-file-name
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 26 Aug 2003 10:12:14 +0000 (10:12 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 26 Aug 2003 10:12:14 +0000 (10:12 +0000)
as Scheme variable.

* scripts/convert-ly.py (conv): dashes rule.
Apply rule.

23 files changed:
ChangeLog
input/mutopia/R.Schumann/romanze-op28-2.ly
input/regression/apply-output.ly
input/regression/chord-name-exceptions.ly
input/regression/font-magnification.ly
input/regression/new-markup-syntax.ly
input/regression/output-property.ly
input/test/add-text-script.ly
input/test/boxed-molecule.ly
input/test/chord-names-jazz.ly
input/test/dynamic-extra.ly
input/test/move-specific-text.ly
input/test/trill.ly
lily/arpeggio.cc
lily/lexer.ll
lily/my-lily-lexer.cc
ly/chord-modifiers-init.ly
ly/engraver-init.ly
ly/init.ly
ly/property-init.ly
scm/define-grobs.scm
scm/font.scm
scripts/convert-ly.py

index cd66ccd1bd1d1487a5cf4ae140fa5ad476ff5908..d81224c8762be944aa494c51c42974919e2a5273 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,10 @@
 2003-08-26  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
+       * lily/my-lily-lexer.cc (start_main_input): define input-file-name
+       as Scheme variable.
+
        * scripts/convert-ly.py (conv): dashes rule.
+       Apply rule.
 
        * Documentation/user/lilypond-book.itely: syntax fixes. 
 
index c3239c8a09a99337cb4acec29d60cd5357ef5eb4..acff585107b0e1b82b5ce0c2f4f5369b92d88c09 100644 (file)
@@ -165,8 +165,8 @@ lefta = \notes \transpose c cis {
   es' des'4^1~ \stemDown  des'8.[ c'16] }
  }
  \transpose c' c, {
-  g4(-4 a8-3~a f-5 g-4 | a4-3 g8\markup { \finger "4-3" } ~g f-4 e-5 |
-   d4)\markup { \finger "4-5" }( g8-3~g es f-4 | g4-3 f8-4~f es d-4 |
+  g4(-4 a8-3~a f-5 g-4 | a4-3 g8-\markup { \finger "4-3" } ~g f-4 e-5 |
+   d4)-\markup { \finger "4-5" }( g8-3~g es f-4 | g4-3 f8-4~f es d-4 |
    c4) r8 f4-4( as8-5~ | as g-4  b)-5 as4-5( ces'8-4~ |
   ces' b des'-4  c'4)-5( <<es'-4 es''>>8 |
   \stemDown \tieDown  des'4.)_5~des'~ |
index 4077e2519c49d1c6747f48e0e43b7019b43a3cd0..cd4bf3728c03d712b8a108eb6dae1cd3704ba8e1 100644 (file)
@@ -20,16 +20,16 @@ position.
   (if (and (memq 'note-head-interface ifs)
           (memq sp '(-2 -3 -5)))
       (begin
-       (ly:set-grob-property! gr 'molecule-callback brew-new@\markup-molecule)
+       (ly:set-grob-property! gr 'molecule-callback brew-new-markup-molecule)
        (ly:set-grob-property! gr 'font-family 'roman)
        (ly:set-grob-property!
         gr 'text
-        (make-raise@\markup -0.5
+        (make-raise-markup -0.5
                            (case sp
-                             ((-5) (make-simple@\markup "m"))
-                             ((-3) (make-simple@\markup "c "))
-                             ((-2) (make-smaller@\markup (make-bold@\markup "2")))
-                             (else (make-simple@\markup "bla"))
+                             ((-5) (make-simple-markup "m"))
+                             ((-3) (make-simple-markup "c "))
+                             ((-2) (make-smaller-markup (make-bold-markup "2")))
+                             (else (make-simple-markup "bla"))
                              ))))
       )))
 
index d93ff544b7d75f4079dfdac32acfedd3a5ab2657..4655cbc9b01b2f9029285a6fb466ca02e2cc6562 100644 (file)
@@ -24,7 +24,7 @@ adds the new exceptions to the default ones, which are defined in
 
 % 7sus4 denoted with ^7 wahh
 chExceptionMusic = \notes {
-  <<c f g bes>>1\markup { \super "7" "wahh" }}
+  <<c f g bes>>1-\markup { \super "7" "wahh" }}
 
 % add to existing exceptions.
 chExceptions = #(append
index 678604505f6e9983d2a438b68caa9478919d2360..3e739b36f6056da6cf545f5d1cf639f2294bd86e 100644 (file)
@@ -12,7 +12,7 @@ c4
 
 c4-"normal"
   % why doesn't this  work?
-  c4\markup \bold \magnify #2.0 "foobar"
+  c4-\markup \bold \magnify #2.0 "foobar"
 
   \property Voice .NoteHead \set #'font-magnification = #1.2
   \property Voice.TextScript \set #'font-magnification = #2.0
index 7353ec2a490c1cb3a65c787b0b61f7dc9ef3c171..ec0eed659f98b790b4599a23cecf1e71a33b1daa 100644 (file)
@@ -8,7 +8,7 @@ texidoc = "New markup syntax."
 \score {
   \notes
    {
-    f'\markup {
+    f'-\markup {
                foo
                \raise #0.2 \hbracket \bold bar
                \override #'(baseline-skip . 4)
index 9efd4cfadc34336159a8ab14d3b7d50acbba5e8a..c21b5d8a301560217ed69757ff1ed6d47ce0768d 100644 (file)
@@ -20,7 +20,7 @@ possible to use @code{\override} would shift both texts.
   \notes\relative c''' {
     a^"two"^"m.d."
     \context Voice
-      \outputproperty #(make-text-checker (make-simple@\markup "m.d."))
+      \outputproperty #(make-text-checker (make-simple-markup "m.d."))
         #'extra-offset = #'(-4.0 . -3.5)
     a^"two"^"m.d."    
     a^"two"^"m.d."    
index 8ae76b9dba5685d84420dd621d16fb5264527b93..d1f6c661f35df9cdc353801f1eba804bab603e71 100644 (file)
@@ -13,7 +13,7 @@ create, then write a function that will build the structure for you.
 #(define (make-text-script x) 
    (let ((m (make-music-by-name 'TextScriptEvent)))
     (ly:set-mus-property! m 'direction DOWN) 
-     (ly:set-mus-property! m 'text (make-simple@\markup x))
+     (ly:set-mus-property! m 'text (make-simple-markup x))
      m))
      
 #(define (add-text-script m x)
index db880634c706dfef0c4311151712a69e81a7c381..fd873045d8d8d0404fa661511d4b55add6c58c96 100644 (file)
@@ -9,7 +9,7 @@ arbitrary grobs. " }
  \score { \notes \relative c''  {
 
  \property Voice.TextScript \override #'molecule-callback =
-   #(make-molecule-boxer 0.1 0.3 0.2 brew-new@\markup-molecule)
+   #(make-molecule-boxer 0.1 0.3 0.2 brew-new-markup-molecule)
 
    c'4^"foo"
 
@@ -17,7 +17,7 @@ arbitrary grobs. " }
    #(make-molecule-boxer 0.05 0.25 0.25 Stem::brew_molecule)
 
 \property Score.RehearsalMark \override #'molecule-callback =
-   #(make-molecule-boxer 0.15 0.3 0.3 brew-new@\markup-molecule)
+   #(make-molecule-boxer 0.15 0.3 0.3 brew-new-markup-molecule)
       c8
 \property Voice.Stem \revert #'molecule-callback
 
index ba9ad704015ad54d20a4e37b71f04b08e1f488f7..0fa2be4830520a547923ba9b009d0e30fa40fbe0 100644 (file)
@@ -67,29 +67,29 @@ chs = \notes \transpose c' c'
 
 efullmusicJazzAlt = \notes
 {
-    <<c e gis>>1\markup { "+" }
-    <<c e g b>>\markup { \normal-size-super
+    <<c e gis>>1-\markup { "+" }
+    <<c e g b>>-\markup { \normal-size-super
     %                    \override #'(font-family . math) "N" }
                          \override #'(font-family . math) "M" }
     %%c:3.5.7 = \markup { \override #'(font-family . math) "M" }
     %%c:3.5.7 = \markup { \normal-size-super "maj7" }
 
-   <<c es ges>>\markup { \super "o" } % should be $\circ$ ?
-   <<c es ges bes>>\markup { \super \combine "o" "/" }
-   <<c es ges beses>>\markup { \super  "o7" }
+   <<c es ges>>-\markup { \super "o" } % should be $\circ$ ?
+   <<c es ges bes>>-\markup { \super \combine "o" "/" }
+   <<c es ges beses>>-\markup { \super  "o7" }
 }
 
 efullJazzAlt = #(sequential-music-to-chord-exceptions efullmusicJazzAlt #f)
 
 epartialmusicJazzAlt = \notes{
-    <<c d>>1\markup { \normal-size-super "2" }
-    <<c es>>\markup { "m" }
-    <<c f>>\markup { \normal-size-super "sus4" }
-    <<c g>>\markup { \normal-size-super "5" }
+    <<c d>>1-\markup { \normal-size-super "2" }
+    <<c es>>-\markup { "m" }
+    <<c f>>-\markup { \normal-size-super "sus4" }
+    <<c g>>-\markup { \normal-size-super "5" }
     
     %% TODO, partial exceptions
-    <<c es f>>\markup { "m" }\markup { \normal-size-super "sus4" }
-    <<c d es>>\markup { "m" }\markup { \normal-size-super "sus2" }
+    <<c es f>>-\markup { "m" }-\markup { \normal-size-super "sus4" }
+    <<c d es>>-\markup { "m" }-\markup { \normal-size-super "sus2" }
 }
 
 epartialJazzAlt = #(sequential-music-to-chord-exceptions epartialmusicJazzAlt #f)
@@ -98,7 +98,7 @@ jazzAltProperties =
 
 \sequential { 
            \property ChordNames.majorSevenSymbol = #whiteTriangleMarkup
-           \property ChordNames.chordNameSeparator = #(make-simple@\markup  "/")
+           \property ChordNames.chordNameSeparator = #(make-simple-markup  "/")
            \property ChordNames.chordNameExceptionsFull = #efullJazzAlt
            \property ChordNames.chordNameExceptionsPartial = #epartialJazzAlt
            \property ChordNames.chordNameFunction = #jazz-chord-names
index 4814204ada005587d07c5c896f7fded349e23dee..86ee253f8c5f9060b46860efa51215646b56733f 100644 (file)
@@ -9,7 +9,7 @@ piuf =  \markup {  \italic "pi\\`u" \dynamic "f" }
 
 \score{
     \notes\relative c''{
-       c\piuf
+       c-\piuf
        c
        c2\< c2\!
        
index d3138d529f79f15d6e2501061aa5c963c2eb9392..662f108e515e1aa48d55d88c678624002b95f43c 100644 (file)
@@ -11,7 +11,7 @@ move text around. " }
 \score {
   \notes\relative c''' {
     \property Voice.Stem \set #'direction = #1
-    \outputproperty #(make-text-checker (make-simple@\markup "m.d."))
+    \outputproperty #(make-text-checker (make-simple-markup "m.d."))
       #'extra-offset = #'(-3.5 . -4.5)
     a^2^"m.d."
   }
index 9bfdd7052ed67af710ea6316171091850ceeea55..65845ebc8916b25c68598a7639019b11703c3dc4 100644 (file)
@@ -18,7 +18,7 @@ Show trill line type. "
     \property Voice.TextSpanner \set #'style = #'trill
     \property Voice.TextSpanner \set #'edge-height = #'(0 . 0)
     \property Voice.TextSpanner \set #'edge-text
-     = #(cons (make-musicglyph@\markup "scripts-trill")  "")
+     = #(cons (make-musicglyph-markup "scripts-trill")  "")
     a#(ly:export (make-span-event 'TextSpanEvent START)) b c a #(ly:export (make-span-event 'TextSpanEvent STOP))
   }
        \paper { raggedright = ##t} 
index bdeabba728c9d3d83541f711faa62eded1a82da1..08d9430544f0e53aa7909aa47a6d70c0831a7161 100644 (file)
@@ -56,10 +56,12 @@ Arpeggio::brew_molecule (SCM smob)
 
   if (heads.empty_b ())
     {
-      programming_error ("Huh? Dumb blonde encountered?");
       /*
-       Nee Valerie, jij bent _niet_ dom. 
+       Dumb blonde error
+
+       :-)
        */
+      programming_error ("Huh, no heads for arpeggio found.");
       return SCM_EOL;
     }
 
index baa1d6f0f0f7c5cff7ab98d961722ec742ab2f4c..a9163c51b61febca23749223b5797db94ceb1d8c 100644 (file)
@@ -179,7 +179,11 @@ HYPHEN             --
        s = s.left_string (s.index_last ('\"'));
 
        yy_pop_state();
-       this->here_input().source_file_->name_ = s; 
+       this->here_input().source_file_->name_ = s;
+       scm_module_define (gh_car (scopes_),
+                    ly_symbol2scm ("input-file-name"),
+                    scm_makfrom0str (s.to_str0()));
+
 }
 
 <version>.     {
index 5e4e92e5c8ab127dbbc0231cbc02d303d77ccd30..d84f6f4e52a520d5b5afc366765d589da5ef1dda 100644 (file)
@@ -156,6 +156,10 @@ My_lily_lexer::start_main_input ()
 {  
   new_input (main_input_string_, &global_input_file->sources_);
   allow_includes_b_ = allow_includes_b_ &&  ! (safe_global_b);
+
+  scm_module_define (gh_car (scopes_),
+                    ly_symbol2scm ("input-file-name"),
+                    scm_makfrom0str (main_input_string_.to_str0()));
 }
 
 void
index c12446db3d9dcee995a2b5489310a6fa98fb0012..a5c99754cc5910880389bf0bb2c140cfa14f4daf 100644 (file)
@@ -2,31 +2,31 @@
 
 \chordmodifiers #default-chord-modifier-list
 
-whiteTriangleMarkup = #(make-override@\markup
-                       '(font-family . math) (make-simple@\markup "M"))
+whiteTriangleMarkup = #(make-override-markup
+                       '(font-family . math) (make-simple-markup "M"))
 
-blackTriangleMarkup = #(make-override@\markup
-                       '(font-family . math) (make-simple@\markup "N"))
+blackTriangleMarkup = #(make-override-markup
+                       '(font-family . math) (make-simple-markup "N"))
 
 ignatzekExceptionMusic = \notes{
-       <<c e gis>>1\markup { "+" }
-       <<c es ges>>\markup { \super "o" } % should be $\circ$ ?
-       <<c es ges bes>>\markup { \super \combine "o" "/" }
-       <<c es ges beses>>\markup { \super  "o7" }
+       <<c e gis>>1-\markup { "+" }
+       <<c es ges>>-\markup { \super "o" } % should be $\circ$ ?
+       <<c es ges bes>>-\markup { \super \combine "o" "/" }
+       <<c es ges beses>>-\markup { \super  "o7" }
 }
 
 ignatzekExceptions = #(sequential-music-to-chord-exceptions
                       ignatzekExceptionMusic #t)
 
 partialJazzMusic = \notes{
-    <<c d>>1\markup { \normal-size-super "2" }
-    <<c es>>\markup { "m" }
-    <<c f>>\markup { \normal-size-super "sus4" }
-    <<c g>>\markup { \normal-size-super "5" }
+    <<c d>>1-\markup { \normal-size-super "2" }
+    <<c es>>-\markup { "m" }
+    <<c f>>-\markup { \normal-size-super "sus4" }
+    <<c g>>-\markup { \normal-size-super "5" }
     
     %% TODO, partial exceptions
-    <<c es f>>\markup { "m" }\markup { \normal-size-super "sus4" }
-    <<c d es>>\markup { "m" }\markup { \normal-size-super "sus2" }
+    <<c es f>>-\markup { "m" }-\markup { \normal-size-super "sus4" }
+    <<c d es>>-\markup { "m" }-\markup { \normal-size-super "sus2" }
 }
 
 %% TODO: compatibility ignatzek code
index 636e119dfd586dabcbb6ca8b69aeca8cb94bfc47..3598f76bcccc94a00cf94fdf8324b44c9e0ad1ae 100644 (file)
@@ -503,7 +503,7 @@ ScoreContext = \translator {
        %% chord names:
        chordNameFunction = #ignatzek-chord-names
        majorSevenSymbol = #whiteTriangleMarkup
-       chordNameSeparator = #(make-simple@\markup  "/")
+       chordNameSeparator = #(make-simple-markup  "/")
        chordNameExceptions = #ignatzekExceptions
        chordNoteNamer = #'()
        chordRootNamer = #note-name->markup
@@ -521,8 +521,8 @@ ScoreContext = \translator {
        tablatureFormat = #fret-number-tablature-format
 
        %%
-       bassFigureFormatFunction = #make-bass-figure@\markup
-       metronomeMarkFormatter = #make-metronome@\markup
+       bassFigureFormatFunction = #make-bass-figure-markup
+       metronomeMarkFormatter = #make-metronome-markup
 
        \grobdescriptions #all-grob-descriptions
 }
index bc66f5aaaf55960c7838828aba8d26f13f4ddd6e..ce58a26a4d3e301541b9653e60094a98921cd2c3 100644 (file)
@@ -16,4 +16,6 @@
 
 #(if (and (ly:get-option 'old-relative)
       (not (ly:get-option 'old-relative-used)))
-  (ly:warn "Old relative compatibility was not used."))
+  (ly:warn (string-append
+           "\n"
+           input-file-name ": old relative compatibility was not used.")))
index a5b3a1705f6b9dc39600d123be24e2a6afc6fd32..5ab7062c3d1738160027fc93df20cfd1c5248873 100644 (file)
@@ -255,10 +255,10 @@ unHideNotes =  \sequential {
 }
 
 germanChords = {
-    \property ChordNames. chordRootNamer = #(chord-name->german@\markup #t)
-    \property ChordNames. chordNoteNamer = #note-name->german@\markup
+    \property ChordNames. chordRootNamer = #(chord-name->german-markup #t)
+    \property ChordNames. chordNoteNamer = #note-name->german-markup
 }
 semiGermanChords = {
-    \property ChordNames. chordRootNamer = #(chord-name->german@\markup #f)
-    \property ChordNames. chordNoteNamer = #note-name->german@\markup
+    \property ChordNames. chordRootNamer = #(chord-name->german-markup #f)
+    \property ChordNames. chordNoteNamer = #note-name->german-markup
 }
index 8e6e40576b2a0f49ddcfd2e59e87d01d7c95e71d..697d3d19cef90cb4cb9d1294be4c965db2287585 100644 (file)
        (molecule-callback . ,Volta_bracket_interface::brew_molecule)
        (direction . 1)
        (padding . 1)
-       (font-style . volta)
+       (font-family . number)
        (Y-offset-callbacks . (,Side_position_interface::aligned_side))
        (thickness . 1.6)  ;  stafflinethickness
        (height . 2.0) ; staffspace;
index 2fdf3adb6e64b4907ea2cb62ebc5255ff6c6463a..025f8f99036cfc18fb478d13ad157ccd4684cf1e 100644 (file)
@@ -6,10 +6,6 @@
 ;;; (c)  2000--2003 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;;
 
-(define style-to-font-alist
-  `(
-))
-
 (define (font-field name font-descr)
       (list-ref
        font-descr
@@ -317,32 +313,6 @@ and warn if the selected font is not unique.
            (list (cons markup #t))))))
 
 
-; fixme, how's this supposed to work?
-; and why don't we import font-setting from elt?
-(define (style-to-font-name sheet style)
-  (let* ((entry (assoc style style-to-font-alist))
-        (qualifiers (if entry (cdr entry) '()))
-        (font (find-first-font qualifiers sheet))
-        (err (current-error-port))
-        )
-
-    (if (equal? font "")
-       (begin
-         (display "\ncouldn't find any font satisfying " err)
-         (write qualifiers err)
-         "cmr10"
-         )
-       font)   ; return the topmost.
-    ))
-
-(if #f (begin
-        (define (test-module)
-          (display (filter pair? '(1 2 (1 2) (1 .2)))
-                   (display (filter-field 'font-name 'cmbx paper20-style-sheet-alist))
-                   
-                   (display (style-to-font-name 'paper20 'large)))
-          )))
-
 ;;; ascii-script font init
 (define as-font-sheet-alist
   '((as5 . (((* * * braces *) . ("as-braces9"))
index efb0f20d09707d7babf82aeeeda3357fa68b69e6..dc9f1da69b82ba07172027399cb1cd280e06465f 100644 (file)
@@ -1405,18 +1405,19 @@ if 1:
        conversions.append (((1,9,0), conv, """New relative mode,
 Postfix articulations, new chord syntax."""))
 
-def conv (str):
-       str = re.sub ('-\\markup', '@\\markup', str)
-       str = re.sub (r'-\\', r'\\', str)
-       str = re.sub (r'-\)', ')', str)
-       str = re.sub (r'-\(', '(', str)
-       str = re.sub ('-\[', '[', str)
-       str = re.sub ('-\]', ']', str)
-       str = re.sub ('-~', '~', str)
-       str = re.sub ('@\\markup', r'-\\markup', str)
-       return str
-       
-conversions.append (((1,9,1), conv, """Remove - before articulation"""))
+if 1:
+       def conv (str):
+               str = re.sub (r'-\\markup', r'@\\markup', str)
+               str = re.sub (r'-\\', r'\\', str)
+               str = re.sub (r'-\)', ')', str)
+               str = re.sub (r'-\(', '(', str)
+               str = re.sub ('-\[', '[', str)
+               str = re.sub ('-\]', ']', str)
+               str = re.sub ('-~', '~', str)
+               str = re.sub (r'@\\markup', r'-\\markup', str)
+               return str
+
+       conversions.append (((1,9,1), conv, """Remove - before articulation"""))
 
 ################################
 #      END OF CONVERSIONS