[slime-cvs] CVS update: slime/slime.el
Luke Gorrie
lgorrie at common-lisp.net
Fri Jul 16 16:12:59 UTC 2004
Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv23188
Modified Files:
slime.el
Log Message:
(slime-setup): New function for installing a lisp-mode-hook. You can
call this from ~/.emacs to setup SLIME. Takes a `autodoc' keyword
argument to enable slime-autodoc-mode. We can add more keywords in
future.
Date: Fri Jul 16 09:12:59 2004
Author: lgorrie
Index: slime/slime.el
diff -u slime/slime.el:1.363 slime/slime.el:1.364
--- slime/slime.el:1.363 Wed Jul 14 22:02:32 2004
+++ slime/slime.el Fri Jul 16 09:12:58 2004
@@ -1075,6 +1075,24 @@
(put 'slime-with-rigid-indentation 'lisp-indent-function 1)
+;;; Setup hooks
+
+(defvar slime-use-autodoc-mode nil
+ "When non-nil always enabled slime-autodoc-mode in slime-mode.")
+
+(defun* slime-setup (&key autodoc)
+ "Setup Emacs so that lisp-mode buffers always use SLIME."
+ (add-hook 'lisp-mode-hook 'slime-lisp-mode-hook)
+ (setq slime-use-autodoc-mode autodoc))
+
+(defun slime-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)))
+
+
;;; Inferior CL Setup: compiling and connecting to Swank
(defvar slime-connect-retry-timer nil
More information about the slime-cvs
mailing list