]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge remote-tracking branch 'origin/release/unstable' into staging
authorDavid Kastrup <dak@gnu.org>
Wed, 22 Feb 2012 08:07:57 +0000 (09:07 +0100)
committerDavid Kastrup <dak@gnu.org>
Wed, 22 Feb 2012 08:07:57 +0000 (09:07 +0100)
24 files changed:
Documentation/notation/spacing.itely
Documentation/snippets/new/centering-markup-on-note-heads-automatically.ly
Documentation/snippets/new/defining-an-engraver-in-scheme-ambitus-engraver.ly
Documentation/snippets/new/numbers-as-easy-note-heads.ly
GNUmakefile.in
VERSION
configure.in
input/regression/extratoken.ly [new file with mode: 0644]
input/regression/scheme-engraver-instance.ly
input/regression/scheme-engraver.ly
input/regression/scheme-text-spanner.ly
lily/context-def.cc
lily/include/listener.hh
lily/lexer.ll
lily/parser.yy
lily/scheme-engraver.cc
ly/event-listener.ly
make/doc-i18n-root-vars.make
make/lilypond-book-rules.make
make/lilypond-book-vars.make
scm/translation-functions.scm
scripts/build/www_post.py
stepmake/aclocal.m4
stepmake/stepmake/texinfo-vars.make

index c1603fb22bf03baa99874500c8bbac1fa36e578a..840fca2c09838b3687a9173ee1f747b99f005307 100644 (file)
@@ -349,7 +349,7 @@ example orchestral scores.
 
 If set to false, systems will spread vertically down the last
 page.  Pieces that amply fill two pages or more should have this
-set to true.  It also affects the last page of book parts, i.e.
+set to false.  It also affects the last page of book parts, i.e.
 parts of a book created with @code{\bookpart} blocks.
 
 @end table
index 47169a559bd1c801a0e18a3336793f2869e5b813..2d1ec280efcac961a26279716ee1fe3f56d15da0 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.14.0"
+\version "2.15.31"
 
 \header {
   lsrtags = "text, tweaks-and-overrides, contexts-and-engravers"
@@ -17,29 +17,23 @@ been shifted via @code{force-hshift}.
 #(define (Text_align_engraver ctx)
   (let ((scripts '())
         (note-column #f))
-
-    `((acknowledgers
-       (note-column-interface
-        . ,(lambda (trans grob source)
-             ;; cache NoteColumn in this Voice context
-             (set! note-column grob)))
-
-       (text-script-interface
-        . ,(lambda (trans grob source)
-             ;; whenever a TextScript is acknowledged,
-             ;; add it to `scripts' list
-             (set! scripts (cons grob scripts)))))
-
-      (stop-translation-timestep
-       . ,(lambda (trans)
-            ;; if any TextScript grobs exist,
-            ;; set NoteColumn as X-parent
-            (and (pair? scripts)
-                 (for-each (lambda (script)
-                             (set! (ly:grob-parent script X) note-column))
-                           scripts))
-            ;; clear scripts ready for next timestep
-            (set! scripts '()))))))
+    (make-engraver
+     (acknowledgers
+      ((note-column-interface trans grob source)
+       ;; cache NoteColumn in this Voice context
+       (set! note-column grob))
+      ((text-script-interface trans grob source)
+       ;; whenever a TextScript is acknowledged,
+       ;; add it to `scripts' list
+       (set! scripts (cons grob scripts))))
+     ((stop-translation-timestep trans)
+      ;; if any TextScript grobs exist,
+      ;; set NoteColumn as X-parent
+      (for-each (lambda (script)
+                 (set! (ly:grob-parent script X) note-column))
+               scripts)
+      ;; clear scripts ready for next timestep
+      (set! scripts '())))))
 
 \layout {
   \context {
index 379dc69147c3e608845aabccf44041bd0aff84c1..8958cd9e128f9f56a1261983465966afd98253be 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.14.0"
+\version "2.15.31"
 
 \header {
 
 %%% Grob utilities
 %%%
 %%% These are literal rewrites of some C++ methods used by the ambitus engraver.
-#(define (ly:event::in-event-class event class-name)
-   "Check if @var{event} the given class.
-Rewrite of @code{Stream_event::internal_in_event_class} from @file{lily/stream-event.cc}."
-   (memq class-name (ly:make-event-class (ly:event-property event 'class))))
 
 #(define (ly:separation-item::add-conditional-item grob grob-item)
    "Add @var{grob-item} to the array of conditional elements of @var{grob}.
@@ -188,7 +184,7 @@ position of middle C and key signature from @var{translator}'s context."
    ;; Get the event that caused the note-grob creation
    ;; and check that it is a note-event.
    (let ((note-event (ly:grob-property note-grob 'cause)))
-     (if (ly:event::in-event-class note-event 'note-event)
+     (if (ly:in-event-class? note-event 'note-event)
          ;; get the pitch from the note event
          (let ((pitch (ly:event-property note-event 'pitch)))
            ;; if this pitch is lower than the current ambitus lower
@@ -292,23 +288,24 @@ position of middle C and key signature from @var{translator}'s context."
    (lambda (context)
      (let ((ambitus #f))
        ;; when music is processed: make the ambitus object, if not already built
-       `((process-music . ,(lambda (translator)
-                             (if (not ambitus)
-                                 (set! ambitus (make-ambitus translator)))))
-         ;; set the ambitus clef and key signature state
-         (stop-translation-timestep . ,(lambda (translator)
-                                         (if ambitus
-                                             (initialize-ambitus-state ambitus translator))))
-         ;; when a note-head grob is built, update the ambitus notes
-         (acknowledgers
-          (note-head-interface . ,(lambda (engraver grob source-engraver)
-                                    (if ambitus
-                                        (update-ambitus-notes ambitus grob)))))
-         ;; finally, typeset the ambitus according to its upper and lower notes
-         ;; (if any).
-         (finalize . ,(lambda (translator)
-                        (if ambitus
-                            (typeset-ambitus ambitus translator))))))))
+       (make-engraver
+       ((process-music translator)
+        (if (not ambitus)
+            (set! ambitus (make-ambitus translator))))
+       ;; set the ambitus clef and key signature state
+       ((stop-translation-timestep translator)
+        (if ambitus
+            (initialize-ambitus-state ambitus translator)))
+       ;; when a note-head grob is built, update the ambitus notes
+       (acknowledgers
+          ((note-head-interface engraver grob source-engraver)
+          (if ambitus
+              (update-ambitus-notes ambitus grob))))
+       ;; finally, typeset the ambitus according to its upper and lower notes
+       ;; (if any).
+       ((finalize translator)
+        (if ambitus
+            (typeset-ambitus ambitus translator)))))))
 
 %%%
 %%% Example
index 03e0578af27e012b19d97a9fa3ef3036eca76bd1..2b86eb9f1aa2ae13654fc17e472ec1da1ad06992 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.14.0"
+\version "2.15.31"
 
 \header {
   lsrtags = "pitches"
@@ -15,21 +15,19 @@ object it sees.
 }
 
 #(define Ez_numbers_engraver
-   (list
-    (cons 'acknowledgers
-          (list
-           (cons 'note-head-interface
-                 (lambda (engraver grob source-engraver)
-                   (let* ((context (ly:translator-context engraver))
-                          (tonic-pitch (ly:context-property context 'tonic))
-                          (tonic-name (ly:pitch-notename tonic-pitch))
-                          (grob-pitch
-                           (ly:event-property (event-cause grob) 'pitch))
-                          (grob-name (ly:pitch-notename grob-pitch))
-                          (delta (modulo (- grob-name tonic-name) 7))
-                          (note-names
-                           (make-vector 7 (number->string (1+ delta)))))
-                     (ly:grob-set-property! grob 'note-names note-names))))))))
+   (make-engraver
+    (acknowledgers
+     ((note-head-interface engraver grob source-engraver)
+      (let* ((context (ly:translator-context engraver))
+            (tonic-pitch (ly:context-property context 'tonic))
+            (tonic-name (ly:pitch-notename tonic-pitch))
+            (grob-pitch
+             (ly:event-property (event-cause grob) 'pitch))
+            (grob-name (ly:pitch-notename grob-pitch))
+            (delta (modulo (- grob-name tonic-name) 7))
+            (note-names
+             (make-vector 7 (number->string (1+ delta)))))
+       (ly:grob-set-property! grob 'note-names note-names))))))
 
 #(set-global-staff-size 26)
 
index 2cd9723edc0191ab2f90c469be18b1c1d8148f8f..bd2d0ce5a37156b2e4dfef095a64d15f9683ece1 100644 (file)
@@ -128,6 +128,8 @@ WEB_TRACKED_FILES = $(filter-out $(outdir)/index.html, \
                     $(shell bash -O nullglob -c "echo $(outdir)/*.{midi,html,pdf,png,jpg,jpeg,txt,ly,ily,signature,css,zip,js,idx,php}")) \
                     $(shell bash -O nullglob -c "echo input/$(outdir)/*.{midi,html,pdf,png,jpg,jpeg,txt,ly,ily,signature,css,zip,js,idx,php}") \
                     $(shell bash -O nullglob -c "echo input/*/$(outdir)/*.{midi,html,pdf,png,jpg,jpeg,txt,ly,ily,signature,css,zip,js,idx,php}") \
+                    $(shell bash -O nullglob -c "echo input/*/*/$(outdir)/*.{midi,html,pdf,png,jpg,jpeg,txt,ly,ily,signature,css,zip,js,idx,php}") \
+                    $(shell bash -O nullglob -c "echo input/regression/lilypond-book/$(outdir)/*.{info,tex}") \
                     $(shell bash -O nullglob -c "echo Documentation/$(outdir)/*.{midi,html,pdf,png,jpg,jpeg,txt,ly,ily,signature,css,zip,js,idx,php}") \
                     $(shell bash -O nullglob -c "echo Documentation/$(outdir)/*/*.{midi,html,pdf,png,jpg,jpeg,txt,ly,ily,signature,css,zip,js,idx,php}")
 
diff --git a/VERSION b/VERSION
index 0f2688971592a1013f3b4c4815d581c1cf5bccff..533839d81a7d155290d776936cba0fc4e6db266f 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,7 +1,7 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=2
 MINOR_VERSION=15
-PATCH_LEVEL=30
+PATCH_LEVEL=31
 MY_PATCH_LEVEL=
 VERSION_STABLE=2.14.2
-VERSION_DEVEL=2.15.29
+VERSION_DEVEL=2.15.30
index b2fc7f4be7cfa6b7e845e56e8e901cef327d4155..0189be15b2aedb767832d777eccd8c6955dde845 100644 (file)
@@ -210,7 +210,7 @@ STEPMAKE_PERL(OPTIONAL)
 
 STEPMAKE_PROGS(MAKEINFO, makeinfo, REQUIRED, 4.11)
 STEPMAKE_PROGS(TEXI2HTML, texi2html, OPTIONAL, 1.82)
-STEPMAKE_PROGS(DBLATEX, dblatex, OPTIONAL)
+STEPMAKE_PROGS(DBLATEX, dblatex, OPTIONAL, 0.1.4)
 STEPMAKE_PROGS(PDFLATEX, pdflatex, OPTIONAL)
 STEPMAKE_PROGS(NETPBM, pngtopnm, OPTIONAL)
 STEPMAKE_PROGS(IMAGEMAGICK, convert, OPTIONAL)
diff --git a/input/regression/extratoken.ly b/input/regression/extratoken.ly
new file mode 100644 (file)
index 0000000..754b1f5
--- /dev/null
@@ -0,0 +1,20 @@
+\header {
+  texidoc = "A mode switching command like @code{\\lyricsto} will
+`pop state' when seeing the lookahead token @code{\\time}, a music
+function, after its non-delimited argument.  This must not cause the
+extra token parsing state for the music function to disappear."
+}
+
+\paper {
+  ragged-right = ##t
+}
+
+\version "2.15.31"
+
+x=\lyrics { oh }
+
+<< 
+  \new Voice = m { c'4 r r }
+  \lyricsto "m" \x
+  \time 3/4
+>>
index d78e85a5db27cfe4bedbaa6526b90db66c0e3149..fa32f95200fe176a32b7822cfa8cce475a823cb9 100644 (file)
@@ -8,7 +8,7 @@
 
 }
 
-\version "2.14.0"
+\version "2.15.31"
 
 \layout {
   \context {
          (set! instance-counter (1+ instance-counter))
          (let ((instance-id instance-counter)
                (private-note-counter 0))
-           `((listeners
-              (note-event
-               . ,(lambda (engraver event)
-                    (set! private-note-counter (1+ private-note-counter))
-                    (let ((text (ly:engraver-make-grob engraver 'TextScript event)))
-                      (ly:grob-set-property! text 'text
-                                             (format #f "~a.~a" instance-id
-                                                     private-note-counter))))))))))
+          (make-engraver
+           (listeners
+              ((note-event engraver event)
+              (set! private-note-counter (1+ private-note-counter))
+              (let ((text (ly:engraver-make-grob engraver 'TextScript event)))
+                (ly:grob-set-property! text 'text
+                                       (format #f "~a.~a" instance-id
+                                               private-note-counter)))))))))
   }
 }
 
index 115429f90cc4a5fb98c534dc5cfbeb421c82a223..0be6f0d94719f2064eb8f28793a6e129ce79ba04 100644 (file)
@@ -5,68 +5,49 @@
 
 }
 
-\version "2.14.0"
+\version "2.15.31"
 
 \layout {
   \context {
     \Voice
     \consists
-    #(list
-      (cons 'initialize
-       (lambda (trans)
-       (display (list "initialize"
-                 (ly:context-current-moment
-                  (ly:translator-context trans)) "\n") (current-error-port))))
-      (cons 'start-translation-timestep
-       (lambda (trans)
-       (display (list "start-trans"
-                 (ly:context-current-moment
-                  (ly:translator-context trans)) "\n") (current-error-port))))
-      (cons 'listeners
-       (list
-       (cons 'rest-event (lambda (engraver event)
-                          (let*
-                           ((x (ly:engraver-make-grob engraver 'TextScript event)))
-                           (display (list "caught event" event "\ncreate:\n" x "\n") (current-error-port))
-                           (ly:grob-set-property! x 'text "hi"))
-                          ))
-       ))
-      (cons 'acknowledgers
-       (list
-       (cons 'note-head-interface
-        (lambda (engraver grob source-engraver)
-         (display (list "saw head: " grob " coming from " source-engraver) (current-error-port))
-         ))
-       ))
-      (cons 'end-acknowledgers
-       (list
-       (cons 'beam-interface
-        (lambda (engraver grob source-engraver)
-         (display (list "saw end of beam: " grob " coming from " source-engraver) (current-error-port))
-         ))
-       ))
-      (cons 'process-music
-       (lambda (trans)
-       (display (list "process-music"
-                 (ly:context-current-moment
-                  (ly:translator-context trans)) "\n") (current-error-port))))
-      (cons 'process-acknowledged
-       (lambda (trans)
-       (display (list "process-acknowledged"
-                 (ly:context-current-moment
-                  (ly:translator-context trans)) "\n") (current-error-port))))
-      (cons 'stop-translation-timestep
-       (lambda (trans)
-       (display (list "stop-trans"
-                 (ly:context-current-moment
-                  (ly:translator-context trans)) "\n") (current-error-port))))
-      (cons 'finalize
-       (lambda (trans)
-       (display (list "finalize"
-                 (ly:context-current-moment
-                  (ly:translator-context trans)) "\n") (current-error-port))))
-    )
-
+    #(make-engraver
+      ((initialize trans)
+       (display (list "initialize"
+                     (ly:context-current-moment
+                      (ly:translator-context trans)) "\n") (current-error-port)))
+      ((start-translation-timestep trans)
+       (display (list "start-trans"
+                     (ly:context-current-moment
+                      (ly:translator-context trans)) "\n") (current-error-port)))
+      (listeners
+       ((rest-event engraver event)
+       (let*
+           ((x (ly:engraver-make-grob engraver 'TextScript event)))
+         (display (list "caught event" event "\ncreate:\n" x "\n") (current-error-port))
+         (ly:grob-set-property! x 'text "hi"))))
+      (acknowledgers
+       ((note-head-interface engraver grob source-engraver)
+       (display (list "saw head: " grob " coming from " source-engraver) (current-error-port))))
+      (end-acknowledgers
+       ((beam-interface engraver grob source-engraver)
+       (display (list "saw end of beam: " grob " coming from " source-engraver) (current-error-port))))
+      ((process-music trans)
+       (display (list "process-music"
+                     (ly:context-current-moment
+                      (ly:translator-context trans)) "\n") (current-error-port)))
+      ((process-acknowledged trans)
+       (display (list "process-acknowledged"
+                     (ly:context-current-moment
+                      (ly:translator-context trans)) "\n") (current-error-port)))
+      ((stop-translation-timestep trans)
+       (display (list "stop-trans"
+                     (ly:context-current-moment
+                      (ly:translator-context trans)) "\n") (current-error-port)))
+      ((finalize trans)
+       (display (list "finalize"
+                     (ly:context-current-moment
+                      (ly:translator-context trans)) "\n") (current-error-port))))
                }}
 
 
index 6541f05a3463941d0e0b7d8cc350dbb4c4061227..c0204d55c71865f3c35ae69d28387916725b9adf 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.14.0"
+\version "2.15.31"
 
 \header {
   texidoc = "Use @code{define-event-class}, scheme engraver methods,
@@ -119,64 +119,58 @@ schemeTextSpannerEngraver =
          (finished '())
          (current-event '())
          (event-drul '(() . ())))
-     (list (cons 'listeners
-                 (list (cons 'scheme-text-span-event
-                             (lambda (engraver event)
-                               (if (= START (ly:event-property event 'span-direction))
-                                   (set-car! event-drul event)
-                                   (set-cdr! event-drul event))))))
-           (cons 'acknowledgers
-                 (list (cons 'note-column-interface
-                             (lambda (engraver grob source-engraver)
-                               (if (ly:spanner? span)
-                                   (begin
-                                     (ly:pointer-group-interface::add-grob span 'note-columns grob)
-                                     (add-bound-item span grob)))
-                               (if (ly:spanner? finished)
-                                   (begin
-                                     (ly:pointer-group-interface::add-grob finished 'note-columns grob)
-                                     (add-bound-item finished grob)))))))
-           (cons 'process-music
-                 (lambda (trans)
-                   (if (ly:stream-event? (cdr event-drul))
-                       (if (null? span)
-                           (ly:warning "You're trying to end a scheme text spanner but you haven't started one.")
-                           (begin (set! finished span)
-                                  (ly:engraver-announce-end-grob trans finished current-event)
-                                  (set! span '())
-                                  (set! current-event '())
-                                  (set-cdr! event-drul '()))))
-                   (if (ly:stream-event? (car event-drul))
-                       (begin (set! current-event (car event-drul))
-                              (set! span (ly:engraver-make-grob trans 'SchemeTextSpanner current-event))
-                              (set-axis! span Y)
-                              (set-car! event-drul '())))))
-           (cons 'stop-translation-timestep
-                 (lambda (trans)
-                   (if (and (ly:spanner? span)
-                            (null? (ly:spanner-bound span LEFT)))
-                       (set! (ly:spanner-bound span LEFT)
-                             (ly:context-property context 'currentMusicalColumn)))
-                   (if (ly:spanner? finished)
-                       (begin
-                         (if (null? (ly:spanner-bound finished RIGHT))
-                             (set! (ly:spanner-bound finished RIGHT)
-                                   (ly:context-property context 'currentMusicalColumn)))
-                         (set! finished '())
-                         (set! event-drul '(() . ()))))))
-           (cons 'finalize
-                 (lambda (trans)
-                   (if (ly:spanner? finished)
-                       (begin
-                         (if (null? (ly:spanner-bound finished RIGHT))
-                             (set! (ly:spanner-bound finished RIGHT)
-                                   (ly:context-property context 'currentMusicalColumn)))
-                         (set! finished '())))
-                   (if (ly:spanner? span)
-                       (begin
-                         (ly:warning "I think there's a dangling scheme text spanner :-(")
-                         (ly:grob-suicide! span)
-                         (set! span '()))))))))
+     (make-engraver
+      (listeners ((scheme-text-span-event engraver event)
+                 (if (= START (ly:event-property event 'span-direction))
+                     (set-car! event-drul event)
+                     (set-cdr! event-drul event))))
+      (acknowledgers ((note-column-interface engraver grob source-engraver)
+                     (if (ly:spanner? span)
+                         (begin
+                           (ly:pointer-group-interface::add-grob span 'note-columns grob)
+                           (add-bound-item span grob)))
+                     (if (ly:spanner? finished)
+                         (begin
+                           (ly:pointer-group-interface::add-grob finished 'note-columns grob)
+                           (add-bound-item finished grob)))))
+      ((process-music trans)
+       (if (ly:stream-event? (cdr event-drul))
+          (if (null? span)
+              (ly:warning "You're trying to end a scheme text spanner but you haven't started one.")
+              (begin (set! finished span)
+                     (ly:engraver-announce-end-grob trans finished current-event)
+                     (set! span '())
+                     (set! current-event '())
+                     (set-cdr! event-drul '()))))
+       (if (ly:stream-event? (car event-drul))
+          (begin (set! current-event (car event-drul))
+                 (set! span (ly:engraver-make-grob trans 'SchemeTextSpanner current-event))
+                 (set-axis! span Y)
+                 (set-car! event-drul '()))))
+      ((stop-translation-timestep trans)
+       (if (and (ly:spanner? span)
+               (null? (ly:spanner-bound span LEFT)))
+          (set! (ly:spanner-bound span LEFT)
+                (ly:context-property context 'currentMusicalColumn)))
+       (if (ly:spanner? finished)
+          (begin
+            (if (null? (ly:spanner-bound finished RIGHT))
+                (set! (ly:spanner-bound finished RIGHT)
+                      (ly:context-property context 'currentMusicalColumn)))
+            (set! finished '())
+            (set! event-drul '(() . ())))))
+      ((finalize trans)
+       (if (ly:spanner? finished)
+          (begin
+            (if (null? (ly:spanner-bound finished RIGHT))
+                (set! (ly:spanner-bound finished RIGHT)
+                      (ly:context-property context 'currentMusicalColumn)))
+            (set! finished '())))
+       (if (ly:spanner? span)
+          (begin
+            (ly:warning "I think there's a dangling scheme text spanner :-(")
+            (ly:grob-suicide! span)
+            (set! span '())))))))
 
 schemeTextSpannerStart =
 #(make-span-event 'SchemeTextSpanEvent START)
index df866c2472a62d7d476b0798ce73ff5270bfe05c..00b10f9616904e6e42e14f92e5af62fffefc064f 100644 (file)
@@ -292,7 +292,9 @@ Context_def::get_translator_names (SCM user_mod) const
       if (ly_symbol2scm ("consists") == tag)
         l1 = scm_cons (arg, l1);
       else if (ly_symbol2scm ("remove") == tag
-               && get_translator (arg))
+               && (scm_is_pair (arg)
+                  || ly_is_procedure (arg)
+                  || get_translator (arg)))
         l1 = scm_delete_x (arg, l1);
     }
 
index 0bc937f2b3b7559e212dd14950aad9d7baf7b121..fb69922493ff6877c5c0388e8491346cac56d493 100644 (file)
@@ -67,6 +67,7 @@ typedef struct
 {
   void (*listen_callback) (void *, SCM);
   void (*mark_callback) (void *);
+  bool (*equal_callback) (void *, void *);
 } Listener_function_table;
 
 class Listener
@@ -81,7 +82,9 @@ public:
   void listen (SCM ev) const;
 
   bool operator == (Listener const &other) const
-  { return target_ == other.target_ && type_ == other.type_; }
+  { return type_ == other.type_
+      && (*type_->equal_callback)((void *) target_, (void *) other.target_ );
+  }
 
   DECLARE_SIMPLE_SMOBS (Listener);
 };
@@ -100,12 +103,18 @@ cl :: method ## _mark (void *self)                      \
   cl *s = (cl *)self;                                   \
   scm_gc_mark (s->self_scm ());                         \
 }                                                       \
+bool                                                    \
+cl :: method ## _is_equal (void *a, void *b)            \
+{                                                       \
+  return a == b;                                        \
+}                                                       \
 Listener                                                \
 cl :: method ## _listener () const                      \
 {                                                       \
   static Listener_function_table callbacks;             \
   callbacks.listen_callback = &cl::method ## _callback; \
   callbacks.mark_callback = &cl::method ## _mark;       \
+  callbacks.equal_callback = &cl::method ## _is_equal;  \
   return Listener (this, &callbacks);                   \
 }
 
@@ -115,6 +124,7 @@ cl :: method ## _listener () const                      \
   inline void name (SCM);                               \
   static void name ## _callback (void *self, SCM ev);   \
   static void name ## _mark (void *self);               \
+  static bool name ## _is_equal (void *a, void *b);    \
   Listener name ## _listener () const
 
 #endif /* LISTENER_HH */
index 8c016f6405da0c1227162d3ccbe5d53484d6645f..c2d8b6baeff1273520aa7a68eb32492ad286ec3e 100644 (file)
@@ -834,10 +834,20 @@ Lily_lexer::push_note_state (SCM tab)
 void
 Lily_lexer::pop_state ()
 {
+       bool extra = (YYSTATE == extratoken);
+
+       if (extra)
+               yy_pop_state ();
+
        if (YYSTATE == notes || YYSTATE == chords)
                pitchname_tab_stack_ = scm_cdr (pitchname_tab_stack_);
 
        yy_pop_state ();
+
+       if (extra) {
+               hidden_state_ = YYSTATE;
+               yy_push_state (extratoken);
+       }
 }
 
 int
index d830cb4c57db08c9acf4e32aafbf03b234d4b587..29f4f2a1e0fddabd54aebd9cc6e257d014aafd14 100644 (file)
@@ -1952,16 +1952,19 @@ context_mod:
        | context_def_mod STRING {
                $$ = scm_list_2 ($1, $2);
        }
-       | context_def_mod embedded_scm {
-          if (ly_symbol2scm ("consists") != $1)
-          {
-            $$ = SCM_EOL;
-             parser->parser_error (@1, _ ("only \\consists takes non-string argument."));
-          }
-          else
-          {
-            $$ = scm_list_2 ($1, $2);
-          }
+       | context_def_mod embedded_scm
+       {
+               if (!scm_is_string ($2)
+                   && ly_symbol2scm ("consists") != $1
+                   && ly_symbol2scm ("remove") != $1)
+               {
+                       $$ = SCM_EOL;
+                       parser->parser_error (@1, _ ("only \\consists and \\remove take non-string argument."));
+               }
+               else
+               {
+                       $$ = scm_list_2 ($1, $2);
+               }
        }
        ;
 
index cde829a60788bec5b140942dad26a6fd75168184..1b1aad924ac1efd10e3bb2c19148646572ca70c2 100644 (file)
@@ -186,10 +186,19 @@ void mark_listen_closure (void *target)
   scm_gc_mark ((SCM)target);
 }
 
+static
+bool equal_listen_closure (void *a, void *b)
+{
+  SCM target_a = (SCM) a;
+  SCM target_b = (SCM) b;
+
+  return ly_is_equal (target_a, target_b);
+}
+
 Listener_function_table listen_closure
 =
 {
-  call_listen_closure, mark_listen_closure
+  call_listen_closure, mark_listen_closure, equal_listen_closure
 };
 
 /* static */
index 71d560b0751070b1b36814d876d7071a77e10578..20615e8c2ae48bc65fd9047ce927264fba313c69 100644 (file)
@@ -32,7 +32,7 @@
 
 
 
-\version "2.15.0"
+\version "2.15.31"
 
 %%%% Helper functions
 
@@ -205,21 +205,19 @@ optionally outputs to the console as well."
 \layout {
   \context {
   \Voice
-  \consists #(list
-              (cons 'listeners
-                    (list
-                     (cons 'tempo-change-event format-tempo)
-                     (cons 'rest-event format-rest)
-                     (cons 'note-event format-note)
-                     (cons 'articulation-event format-articulation)
-                     (cons 'text-script-event format-text)
-                     (cons 'slur-event format-slur)
-                     (cons 'breathing-event format-breathe)
-                     (cons 'dynamic-event format-dynamic)
-                     (cons 'crescendo-event format-cresc)
-                     (cons 'decrescendo-event format-decresc)
-                     (cons 'text-span-event format-textspan)
-                     (cons 'tie-event format-tie)
-                     )))
+  \consists #(make-engraver
+              (listeners
+              (tempo-change-event . format-tempo)
+              (rest-event . format-rest)
+              (note-event . format-note)
+              (articulation-event . format-articulation)
+              (text-script-event . format-text)
+              (slur-event . format-slur)
+              (breathing-event . format-breathe)
+              (dynamic-event . format-dynamic)
+              (crescendo-event . format-cresc)
+              (decrescendo-event . format-decresc)
+              (text-span-event . format-textspan)
+              (tie-event . format-tie)))
   }
 }
index 8f6f11e97f110388b6314e622863b6136b2c7fbf..06822444e3434e26d40186e1f47f160cff01b4a2 100644 (file)
@@ -31,7 +31,7 @@ DOCUMENTATION_INCLUDES = \
   -I $(top-build-dir)/Documentation/$(outdir)
 
 LILYPOND_BOOK_INCLUDES += $(DOCUMENTATION_INCLUDES)
-MAKEINFO_FLAGS += --force --enable-encoding $(DOCUMENTATION_INCLUDES)
+MAKEINFO_FLAGS += --enable-encoding $(DOCUMENTATION_INCLUDES)
 MAKEINFO = LANG= $(MAKEINFO_PROGRAM) $(MAKEINFO_FLAGS)
 
 # texi2html xref map files
index e5a03790b4ae37d9fee09a56aae7fa5303d8a122..b0cf7663b158b43c687b6749c9b0988c1bd9c223 100644 (file)
@@ -23,7 +23,7 @@ $(outdir)/%.tex:  %.tex
 $(outdir)/%.tex:  %.latex
        $(LILYPOND_BOOK_COMMAND) --pdf -o $(outdir) $<
 
-# Add the tex => pdf rule only if we have dblatex
+# Add the tex => pdf rule only if we have pdflatex
 ifeq (,$(findstring pdflatex,$(MISSING_OPTIONAL)))
 $(outdir)/%.pdf:  $(outdir)/%.tex
        cd $(outdir) && $(PDFLATEX) $(notdir $<)
index 910cadc1200f6c3ab663dd0faf3ae4ab0911253e..fdf025bf6cf585acab99ca8133316fe443f04a63 100644 (file)
@@ -21,7 +21,7 @@ OUT_HTML_FILES = ${HTML_FILES:%.html=$(outdir)/%.html}
 OUT_HTMLY_FILES = ${HTMLY_FILES:%.htmly=$(outdir)/%.html}
 OUT_XML_FILES = ${XML_FILES:%.xml=$(outdir)/%.html}
 # If we have pdflatex, create the pdf, otherwise only the .tex file!
-ifeq (,$(findstring dblatex,$(MISSING_OPTIONAL)))
+ifeq (,$(findstring pdflatex,$(MISSING_OPTIONAL)))
 OUT_LYTEX_FILES = ${LYTEX_FILES:%.lytex=$(outdir)/%.pdf}
 OUT_LATEX_FILES = ${LATEX_FILES:%.latex=$(outdir)/%.pdf}
 OUT_TEX_FILES = ${TEX_FILES:%.tex=$(outdir)/%.pdf}
index d373da0eebcc0079c2e0c8d0e76a747ceba38742..cc94b67acfbeb2aae9c3364d577e937b4d89d5c5 100644 (file)
@@ -658,3 +658,39 @@ only ~a fret labels provided")
   (= 0 (modulo count n)))
 
 (define-public (all-repeat-counts-visible count context) #t)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; make-engraver helper macro
+
+(defmacro-public make-engraver forms
+  "Helper macro for creating Scheme engravers.
+
+The usual form for an engraver is an association list (or alist)
+mapping symbols to either anonymous functions or to another such
+alist.
+
+@code{make-engraver} accepts forms where the first element is either
+an argument list starting with the respective symbol, followed by the
+function body (comparable to the way @code{define} is used for
+defining functions), or a single symbol followed by subordinate forms
+in the same manner.  You can also just make an alist pair
+literally (the @samp{car} is quoted automatically) as long as the
+unevaluated @samp{cdr} is not a pair.  This is useful if you already
+have defined your engraver functions separately.
+
+Symbols mapping to a function would be @code{initialize},
+@code{start-translation-timestep}, @code{process-music},
+@code{process-acknowledged}, @code{stop-translation-timestep}, and
+@code{finalize}.  Symbols mapping to another alist specified in the
+same manner are @code{listeners} with the subordinate symbols being
+event classes, and @code{acknowledgers} and @code{end-acknowledgers}
+with the subordinate symbols being interfaces."
+  (let loop ((forms forms))
+    (if (cheap-list? forms)
+       `(list
+         ,@(map (lambda (form)
+                  (if (pair? (car form))
+                      `(cons ',(caar form) (lambda ,(cdar form) ,@(cdr form)))
+                      `(cons ',(car form) ,(loop (cdr form)))))
+                forms))
+       forms)))
index 784a978f20dafc9ffbaa22488caaf1b7451fbf2f..c62e02145a10001ce095d73b851be94d7f5e6a7d 100644 (file)
@@ -43,6 +43,14 @@ dirs, symlinks, files = mirrortree.walk_tree (
         '|'.join ([l.code for l in langdefs.LANGUAGES]) + '))(/|$)',
     find_files = r'.*?\.(?:midi|html|pdf|png|jpe?g|txt|i?ly|signature|css|zip|js|..\.idx|php)$|VERSION',
     exclude_files = r'lily-[0-9a-f]+.*\.(pdf|txt)')
+# extra files: info and tex output from lilypond-book regtests
+extra_files = mirrortree.walk_tree (
+    tree_roots = ['input/regression/lilypond-book'],
+    process_dirs = outdir,
+    exclude_dirs = r'(^|/)(out|out-test)(/|$)',
+    find_files = r'.+\.(info|tex)$',
+    exclude_files = r'lily-[0-9a-f]+.*\.tex')[2]
+files.extend(extra_files)
 
 # actual mirrorring stuff
 html_files = []
index c60521ead3a3923f53e06d39d878957dc3f16c8d..c8e62a95591dc542dc1e4d3354718e3739655f63 100644 (file)
@@ -535,7 +535,7 @@ AC_DEFUN(STEPMAKE_GETTEXT, [
 
 
 AC_DEFUN(STEPMAKE_GUILE, [
-    STEPMAKE_PATH_PROG(GUILE, guile, $1)
+    STEPMAKE_PATH_PROG(GUILE, guile guile1, $1)
 ])
 
 
@@ -577,7 +577,7 @@ AC_DEFUN(STEPMAKE_GUILE_DEVEL, [
     test -n "$target_alias" && target_guile_config=$target_alias-guile-config
     test -n "$host_alias" && host_guile_config=$host_alias-guile-config
     AC_MSG_CHECKING([for guile-config])
-    for guile_config in $GUILE_CONFIG $target_guile_config $host_guile_config $build_guile_config guile-config; do
+    for guile_config in $GUILE_CONFIG $target_guile_config $host_guile_config $build_guile_config guile-config guile1-config; do
        AC_MSG_RESULT([$guile_config])
        if ! $guile_config --version > /dev/null 2>&1 ; then
            AC_MSG_WARN([cannot execute $guile_config])
@@ -590,7 +590,7 @@ AC_DEFUN(STEPMAKE_GUILE_DEVEL, [
     done
     STEPMAKE_OPTIONAL_REQUIRED(GUILE_CONFIG, $guile_config, $1)
     if test $? -ne 0; then
-        STEPMAKE_ADD_ENTRY($1, 'guile-config (guile-devel, guile-dev or libguile-dev package)')
+        STEPMAKE_ADD_ENTRY($1, 'guile-config (guile-devel, guile-dev or libguile-dev package) or guile1-config (guile1-devel package)')
     fi 
 
     STEPMAKE_CHECK_SEARCH_RESULT(GUILE_CONFIG)
index 28a48b94aa2b2a74af345f5046b7ce6b111eba8e..b98b1ccbdaf1f1e3cd344c09c2de335947231ec9 100644 (file)
@@ -33,7 +33,7 @@ TEXINFO_PAPERSIZE_OPTION= $(if $(findstring $(PAPERSIZE),a4),,-t @afourpaper)
 
 DOCUMENTATION_INCLUDES += -I $(top-src-dir)/Documentation
 
-MAKEINFO_FLAGS += --enable-encoding $(DOCUMENTATION_INCLUDES)
+MAKEINFO_FLAGS += --enable-encoding --error-limit=0 $(DOCUMENTATION_INCLUDES)
 MAKEINFO = LANG= $(MAKEINFO_PROGRAM) $(MAKEINFO_FLAGS)
 
 # texi2html xref map files
@@ -53,7 +53,7 @@ TEXI2HTML_INIT = --init-file=$(top-src-dir)/Documentation/lilypond-texi2html.ini
 TEXI2HTML_SPLIT = --prefix=index --split=section
 
 TEXI2HTML_INCLUDES += --I=$(src-dir) --I=$(outdir) $(DOCUMENTATION_INCLUDES) --I=$(XREF_MAPS_DIR)
-TEXI2HTML_FLAGS += $(TEXI2HTML_INCLUDES) $(TEXI2HTML_INIT) $(TEXI2HTML_LANG)
+TEXI2HTML_FLAGS += --error-limit=0 $(TEXI2HTML_INCLUDES) $(TEXI2HTML_INIT) $(TEXI2HTML_LANG)
 TEXI2HTML = TOP_SRC_DIR=$(top-src-dir) PERL_UNICODE=SD $(TEXI2HTML_PROGRAM)
 ###########