[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Emacs 24, lilypond, compile-internal, compilation-start
From: |
Brett Presnell |
Subject: |
Emacs 24, lilypond, compile-internal, compilation-start |
Date: |
Mon, 10 Dec 2012 18:09:45 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
I am using a recent development snapshot of GNU Emacs (version 24.3.50.1) and
the lilypond-mode.el distributed with LilyPond version 2.16 and 2.17. The emacs
function compile-internal has been deprecated/obsolete for some time now, and it
has been removed entirely from Emacs 24.3. As a result, LilyPond-compile-file
does not work.
The recommended replacement for compile-internal seems to be compilation-start,
which I believe has been included in Emacs since verson 21.x (not sure exactly
when it was introduced). The following replacement for LilyPond-compile-file
works in Emacs 24.3.50.1, but at the moment I am unable to check it with any
older version of emacs. Because I only just started using LilyPond, I am also
unsure of how well this works with anything more complicated than a single .ly
file, so I hope that someone else will look it over and test it.
Here's the replacement code:
(defun LilyPond-compile-file (command name)
;; We maybe should know what we run here (Lily, lilypond, tex)
;; and adjust our error-matching regex ?
(compilation-start
(if (eq LilyPond-command-current 'LilyPond-command-master)
command
;; use temporary directory for Commands on Buffer/Region
;; hm.. the directory is set twice, first to default-dir
(concat "cd " (LilyPond-temp-directory) "; " command))
'LilyPond-mode #'(lambda (mode-name) "*LilyPond-compile*")))
And here's the patch for lilypond-mode.el:
--- lilypond-mode.el-orig 2012-12-03 07:27:32.061164026 -0500
+++ lilypond-mode.el 2012-12-10 13:08:07.046248289 -0500
@@ -286,13 +286,13 @@
(defun LilyPond-compile-file (command name)
;; We maybe should know what we run here (Lily, lilypond, tex)
;; and adjust our error-matching regex ?
- (compile-internal
+ (compilation-start
(if (eq LilyPond-command-current 'LilyPond-command-master)
command
;; use temporary directory for Commands on Buffer/Region
;; hm.. the directory is set twice, first to default-dir
(concat "cd " (LilyPond-temp-directory) "; " command))
- "No more errors" name))
+ 'LilyPond-mode #'(lambda (mode-name) "*LilyPond-compile*")))
;; do we still need this, now that we're using compile-internal?
(defun LilyPond-save-buffer ()
- Emacs 24, lilypond, compile-internal, compilation-start,
Brett Presnell <=