]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/unfolded-repeat-iterator.cc (process): bugfix: use a
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 22 Jun 2003 22:05:00 +0000 (22:05 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 22 Jun 2003 22:05:00 +0000 (22:05 +0000)
"first" flag to decide whether to make a start-repeat

* input/regression/grace-volta-repeat-2.ly: new file.

ChangeLog
input/regression/grace-volta-repeat-2.ly [new file with mode: 0644]
lily/unfolded-repeat-iterator.cc
lilypond-indent.el

index 4f6f962f35aa3d9545f522cdafabde5be54654f8..e3f38b4a9b31c603fe01fa62ba461118612be2c2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2003-06-23  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * lily/unfolded-repeat-iterator.cc (process): bugfix: use a
+       "first" flag to decide whether to make a start-repeat
+
+       * input/regression/grace-volta-repeat-2.ly: new file.
+
+2003-06-22  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * lilypond-indent.el: rename generic functions to LilyPond-*
+
 2003-06-22  Graham Percival  <gperlist@shaw.ca>
 
        * input/test/thumb.ly: delete, merged into refman.
diff --git a/input/regression/grace-volta-repeat-2.ly b/input/regression/grace-volta-repeat-2.ly
new file mode 100644 (file)
index 0000000..b4a7b1e
--- /dev/null
@@ -0,0 +1,18 @@
+\version "1.7.22"
+
+\header {
+
+    texidoc = "Graces at combined with volta repeats: a repeat
+starting with a grace, following a repeat directly. The bars should be
+merged into one :||:."
+
+      }
+
+\score {\notes\relative c' {
+\repeat volta 2 {
+        c1 
+}
+\repeat volta 2 {
+        \grace {c8 } c4
+}
+}}
index 76739b4a220b5acae7549d5cac8548c6d6345d34..27141d0e27f5a4b56cdca686eb76919a9924c10a 100644 (file)
@@ -66,7 +66,8 @@ protected:
   virtual void next_element (bool);
   virtual void construct_children();
   virtual void process (Moment);
-  
+
+  bool first_time_;
   int alt_count_;
   int rep_count_;
   int done_count_;
@@ -76,6 +77,7 @@ protected:
 Volta_repeat_iterator::Volta_repeat_iterator()
 {
   done_count_ = alt_count_ = rep_count_= 0;
+  first_time_ = true;
 }
 
 SCM
@@ -159,9 +161,10 @@ Volta_repeat_iterator::next_element (bool side_effect)
 void
 Volta_repeat_iterator::process (Moment m)
 {
-  if (!m.to_bool ())
+  if (first_time_)
     {
       add_repeat_command (ly_symbol2scm ("start-repeat"));
+      first_time_ = false;
     }
   Sequential_iterator::process(m);
 }
index 7aa2e72e76f72c331f695580d1f25e631c0de668..50db7bb3433585674d7e03ccc634e190cec71613 100644 (file)
@@ -574,8 +574,12 @@ in XEmacs' paren-highlight."
 ;;; From Emacs' paren.el, with minimal changes (see "LilyPond"-lines)
 ;; Find the place to show, if there is one,
 ;; and show it until input arrives.
-(defun show-paren-function ()
-;;(defun LilyPond-show-paren-function () ; make show-paren-function local ??
+; (defun show-paren-function ()
+
+
+;;  don't redefine emacs functions. It breaks other modes.
+
+(defun LilyPond-show-paren-function () ; make show-paren-function local ??
   (if show-paren-mode
       (let (pos dir mismatch face (oldpos (point)))
        (cond ((eq (char-syntax (preceding-char)) ?\))
@@ -682,8 +686,8 @@ in XEmacs' paren-highlight."
 ;; and show it until input arrives.
 (if (string-match "XEmacs\\|Lucid" emacs-version)
     (paren-set-mode 'paren)) ; works if this is set here (, right place?)
-(defun paren-highlight ()
-;;(defun LilyPond-paren-highlight () ; make paren-highlight local ??
+;(defun paren-highlight ()
+(defun LilyPond-paren-highlight () ; make paren-highlight local ??
   "This highlights matching parentheses.
 
 See the variables: