From 87186848a2172aaf26b9ff433592ed8861e3cb61 Mon Sep 17 00:00:00 2001 From: hanwen Date: Sun, 22 Jun 2003 22:05:00 +0000 Subject: [PATCH] * 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. --- ChangeLog | 11 +++++++++++ input/regression/grace-volta-repeat-2.ly | 18 ++++++++++++++++++ lily/unfolded-repeat-iterator.cc | 7 +++++-- lilypond-indent.el | 12 ++++++++---- 4 files changed, 42 insertions(+), 6 deletions(-) create mode 100644 input/regression/grace-volta-repeat-2.ly diff --git a/ChangeLog b/ChangeLog index 4f6f962f35..e3f38b4a9b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2003-06-23 Han-Wen Nienhuys + + * 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 + + * lilypond-indent.el: rename generic functions to LilyPond-* + 2003-06-22 Graham Percival * 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 index 0000000000..b4a7b1e851 --- /dev/null +++ b/input/regression/grace-volta-repeat-2.ly @@ -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 +} +}} diff --git a/lily/unfolded-repeat-iterator.cc b/lily/unfolded-repeat-iterator.cc index 76739b4a22..27141d0e27 100644 --- a/lily/unfolded-repeat-iterator.cc +++ b/lily/unfolded-repeat-iterator.cc @@ -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); } diff --git a/lilypond-indent.el b/lilypond-indent.el index 7aa2e72e76..50db7bb343 100644 --- a/lilypond-indent.el +++ b/lilypond-indent.el @@ -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: -- 2.39.2