[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with emacs mode
From: |
Milan Zamazal |
Subject: |
Re: Problem with emacs mode |
Date: |
Wed, 22 Feb 2006 16:47:54 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
>>>>> "CH" == Cameron Horsburgh <address@hidden> writes:
CH> Has anyone else been using the new Emacs with success?
Well, the patch I've sent here recently is incomplete. With the
following (Q&D) patch, LilyPond 2.7.32 seems to work with CVS Emacs.
--- lilypond-mode.el.orig 2006-02-12 15:58:09.000000000 +0100
+++ lilypond-mode.el 2006-02-22 16:44:23.000000000 +0100
@@ -391,10 +391,10 @@
(defun LilyPond-string-current-midi ()
"Check the midi file of the following midi-score in the current document."
(let ((fnameprefix (if (eq LilyPond-command-current 'LilyPond-command-master)
- (substring (LilyPond-get-master-file) 0 -3); suppose
".ly"
+ (substring (or (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 (string-to-number (count-midi-words)))
+ (count (string-to-number (count-midi-words-backwards))))
(concat fnameprefix
(if (and (> allcount 1) (> count 0)) ; not first score
(if (eq count allcount) ; last score
@@ -405,9 +405,9 @@
(defun LilyPond-string-all-midi ()
"Return the midi files of the current document in ascending order."
(let ((fnameprefix (if (eq LilyPond-command-current 'LilyPond-command-master)
- (substring (LilyPond-get-master-file) 0 -3); suppose
".ly"
+ (substring (or (LilyPond-get-master-file) " ") 0
-3); suppose ".ly"
LilyPond-region-file-prefix))
- (allcount (string-to-number (substring (count-midi-words) 0 -12))))
+ (allcount (string-to-number (count-midi-words))))
(concat (if (> allcount 0) ; at least one midi-score
(concat fnameprefix ".midi "))
(if (> allcount 1) ; more than one midi-score
Regards,
Milan Zamazal