[slime-cvs] CVS slime
mkoeppe
mkoeppe at common-lisp.net
Sat Jul 15 07:06:29 UTC 2006
Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv23164
Modified Files:
slime.el
Log Message:
(slime-shared-lisp-mode-hook): New function, factored out from
slime-lisp-mode-hook.
(slime-lisp-mode-hook): Use it here.
(slime-scheme-mode-hook): New function, use
slime-shared-lisp-mode-hook.
(slime-setup): If scheme-mode is one of the slime-lisp-modes, install
our hook.
--- /project/slime/cvsroot/slime/slime.el 2006/06/25 08:41:57 1.632
+++ /project/slime/cvsroot/slime/slime.el 2006/07/15 07:06:29 1.633
@@ -72,21 +72,30 @@
(defun* slime-setup (&key autodoc typeout-frame highlight-edits)
"Setup Emacs so that lisp-mode buffers always use SLIME."
- (add-hook 'lisp-mode-hook 'slime-lisp-mode-hook)
+ (when (member 'lisp-mode slime-lisp-modes)
+ (add-hook 'lisp-mode-hook 'slime-lisp-mode-hook))
+ (when (member 'scheme-mode slime-lisp-modes)
+ (add-hook 'scheme-mode-hook 'slime-scheme-mode-hook))
(when typeout-frame
(add-hook 'slime-connected-hook 'slime-ensure-typeout-frame))
(setq slime-use-autodoc-mode autodoc)
(setq slime-use-highlight-edits-mode highlight-edits))
-(defun slime-lisp-mode-hook ()
+(defun slime-shared-lisp-mode-hook ()
(slime-mode 1)
- (set (make-local-variable 'lisp-indent-function)
- 'common-lisp-indent-function)
(when slime-use-autodoc-mode
(slime-autodoc-mode 1))
(when slime-use-highlight-edits-mode
(slime-highlight-edits-mode 1)))
+(defun slime-lisp-mode-hook ()
+ (slime-shared-lisp-mode-hook)
+ (set (make-local-variable 'lisp-indent-function)
+ 'common-lisp-indent-function))
+
+(defun slime-scheme-mode-hook ()
+ (slime-shared-lisp-mode-hook))
+
(eval-and-compile
(defvar slime-path
(let ((path (or (locate-library "slime") load-file-name)))
More information about the slime-cvs
mailing list