[slime-devel] Patch for slime-compile-file

First of all, many thanks to all SLIME developers for creating this useful piece of software. I use SLIME with Allegro CL, where I mix CL code with Scheme code, using a home-grown Scheme translator. My Scheme code lives in Emacs buffers in scheme-mode. Most things work fine, but the command slime-compile-file complains if it is not called from a buffer in lisp-mode. I propose to apply the patch below, which introduces a new variable containing a list of modes where Slime commands make sense. (Then I can customize this variable to include scheme-mode too.) -- Matthias Koeppe -- http://www.math.uni-magdeburg.de/~mkoeppe Index: slime.el =================================================================== RCS file: /project/slime/cvsroot/slime/slime.el,v retrieving revision 1.440 diff -u -p -u -r1.440 slime.el --- slime.el 15 Dec 2004 07:11:47 -0000 1.440 +++ slime.el 15 Dec 2004 14:58:48 -0000 @@ -3283,12 +3283,14 @@ between compiler notes and to display th (interactive) (slime-compile-file t)) +(defvar slime-lisp-modes '(lisp-mode)) + (defun slime-compile-file (&optional load) "Compile current buffer's file and highlight resulting compiler notes. See `slime-compile-and-load-file' for further details." (interactive) - (unless (eq major-mode 'lisp-mode) + (unless (memq major-mode slime-lisp-modes) (error "Only valid in lisp-mode")) (unless buffer-file-name (error "Buffer %s is not associated with a file." (buffer-name)))

Matthias Koeppe <mkoeppe+slime@merkur.math.uni-magdeburg.de> writes:
I propose to apply the patch below, which introduces a new variable containing a list of modes where Slime commands make sense. (Then I can customize this variable to include scheme-mode too.)
Patch applied. A hook would be a little more general, but since you are probably the only one who needs this features a variable is good enough. Thank you for the patch. Helmut.
participants (2)
-
Helmut Eller
-
Matthias Koeppe