diff options
author | David Kastrup <dak@gnu.org> | 2014-12-28 21:30:56 +0100 |
---|---|---|
committer | David Kastrup <dak@gnu.org> | 2015-01-05 19:55:13 +0100 |
commit | 7639abf194db2ffb55a7caa2075d8b7820715ec5 (patch) | |
tree | 0dc1725291c53b0d79d9934af25d377966acec44 /elisp | |
parent | 716a2e4e4d20e34a01178d147b4ef6d9adad7d79 (diff) |
lilypond-what-beat.el: avoid global assignment to new-duration
Diffstat (limited to 'elisp')
-rw-r--r-- | elisp/lilypond-what-beat.el | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/elisp/lilypond-what-beat.el b/elisp/lilypond-what-beat.el index 7612138fec..7541a34e4a 100644 --- a/elisp/lilypond-what-beat.el +++ b/elisp/lilypond-what-beat.el @@ -199,11 +199,10 @@ If next note has no duration, returns t" (result '(0 1))) ; 0 in fraction form (if (= measure-start -1) (message "No | before point") - (progn - (goto-char (1+ measure-start)) - (goto-note-begin) - (while (< (point) end) - (setq new-duration (walk-note-duration)) + (goto-char (1+ measure-start)) + (goto-note-begin) + (while (< (point) end) + (let ((new-duration (walk-note-duration))) (if (null new-duration) (if (not (looking-at "\\\\times[ \t]*\\([1-9]*\\)/\\([1-9]*\\)[ \t\n]*{")) (skip-good-keywords) @@ -232,10 +231,9 @@ If next note has no duration, returns t" (if (not (eq new-duration t)) (setq duration new-duration)) (setq result (add-fractions result duration))) - (goto-note-begin)) + (goto-note-begin))) - result -)))))) + result))))) (defun LilyPond-what-beat () "Returns how much of a measure lies between last measaure '|' and point. |