diff options
author | David Kastrup <dak@gnu.org> | 2012-12-13 10:55:28 +0100 |
---|---|---|
committer | David Kastrup <dak@gnu.org> | 2012-12-21 17:37:59 +0100 |
commit | 4d11b166f619770636a764ba629be107b8e0b81b (patch) | |
tree | e7d016ce077a717bfab14614e94b4cb84687c2b5 /elisp | |
parent | 314587c0714437b058c04173d81ad79db7452e73 (diff) |
Issue 3018: lilypond-mode.el: Replace use of obsoleted compile-internal
In Emacs 24, compile-internal is no longer defined. The respective
commit in the Emacs repository (from git mirror) shows:
commit 318ea0e29450b3c6e588287719e170e35a978cf7
Author: Chong Yidong <cyd@gnu.org>
Date: Mon Sep 24 20:23:25 2012 +0800
Remove several obsolete vars and functions unlikely to be still in use.
[...]
* lisp/progmodes/compile.el (compile-internal): Remove obsolete
function.
(compilation-parse-errors-function): Fix typo.
[...]
-;; This is a rough emulation of the old hack, until the transition to new
-;; compile is complete.
-(defun compile-internal (command error-message
- &optional _name-of-mode parser
- error-regexp-alist name-function
- _enter-regexp-alist _leave-regexp-alist
- file-regexp-alist _nomessage-regexp-alist
- _no-async highlight-regexp _local-map)
- (if parser
- (error "Compile now works very differently, see `compilation-error-regexp
- (let ((compilation-error-regexp-alist
- (append file-regexp-alist (or error-regexp-alist
- compilation-error-regexp-alist)))
- (compilation-error (replace-regexp-in-string "^No more \\(.+\\)s\\.?"
- "\\1" error-message)))
- (compilation-start command nil name-function highlight-regexp)))
-(make-obsolete 'compile-internal 'compilation-start "22.1")
-
I have for now omitted all optional arguments to compilation-start
since they are incompatible to previous usage:
compilation-start is an autoloaded compiled Lisp function in
`compile.el'.
(compilation-start COMMAND &optional MODE NAME-FUNCTION
HIGHLIGHT-REGEXP)
Run compilation command COMMAND (low level interface).
If COMMAND starts with a cd command, that becomes the `default-directory'.
The rest of the arguments are optional; for them, nil means use the default.
MODE is the major mode to set in the compilation buffer. Mode
may also be t meaning use `compilation-shell-minor-mode' under `comint-mode'.
If NAME-FUNCTION is non-nil, call it with one argument (the mode name)
to determine the buffer name. Otherwise, the default is to
reuses the current buffer if it has the proper major mode,
else use or create a buffer with name based on the major mode.
If HIGHLIGHT-REGEXP is non-nil, `next-error' will temporarily highlight
the matching section of the visited source line; the default is to use the
global value of `compilation-highlight-regexp'.
Returns the compilation buffer created.
Diffstat (limited to 'elisp')
-rw-r--r-- | elisp/lilypond-mode.el | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/elisp/lilypond-mode.el b/elisp/lilypond-mode.el index 934d1d6f0b..bab58f29ed 100644 --- a/elisp/lilypond-mode.el +++ b/elisp/lilypond-mode.el @@ -286,15 +286,14 @@ in LilyPond-include-path." (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)) + (concat "cd " (LilyPond-temp-directory) "; " command)))) -;; do we still need this, now that we're using compile-internal? +;; do we still need this, now that we're using compilation-start? (defun LilyPond-save-buffer () "Save buffer and set default command for compiling." (interactive) |