lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lilypond emacs-mode


From: Nicolas Sceaux
Subject: Re: lilypond emacs-mode
Date: Sat, 26 Nov 2005 11:42:20 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin)

Daniel Oehry <address@hidden> writes:

> lilypond emacs-mode does not work with CVS version of emacs (22.0.50.1).

Using lilypond-mode from CVS, I apply the following patch for GNU Emacs
22:

Index: lilypond-mode.el
===================================================================
RCS file: /cvsroot/lilypond/lilypond/elisp/lilypond-mode.el,v
retrieving revision 1.18
diff -u -r1.18 lilypond-mode.el
--- lilypond-mode.el    12 Jun 2005 18:44:29 -0000      1.18
+++ lilypond-mode.el    15 Oct 2005 11:17:42 -0000
@@ -393,11 +393,11 @@
   (let ((fnameprefix (if (eq LilyPond-command-current 'LilyPond-command-master)
                         (substring (LilyPond-get-master-file) 0 -3); suppose 
".ly"
                       LilyPond-region-file-prefix))
-       (allcount (string-to-number (substring (count-midi-words) 0 -12)))
-       (count (string-to-number (substring (count-midi-words-backwards) 0 
-12))))
+       (allcount (count-midi-words))
+       (count (count-midi-words-backwards)))
     (concat  fnameprefix
             (if (and (> allcount 1) (> count 0)) ; not first score
-                (if (eq count allcount)          ; last score
+                (if (= count allcount)          ; last score
                     (concat "-" (number-to-string (+ count -1)))
                   (concat "-" (number-to-string count))))
             ".midi")))
@@ -407,7 +407,7 @@
   (let ((fnameprefix (if (eq LilyPond-command-current 'LilyPond-command-master)
                         (substring (LilyPond-get-master-file) 0 -3); suppose 
".ly"
                       LilyPond-region-file-prefix))
-       (allcount (string-to-number (substring (count-midi-words) 0 -12))))
+       (allcount (count-midi-words)))
     (concat (if (> allcount 0)  ; at least one midi-score
                (concat fnameprefix ".midi "))
            (if (> allcount 1)  ; more than one midi-score




reply via email to

[Prev in Thread] Current Thread [Next in Thread]