[slime-cvs] CVS slime

heller heller at common-lisp.net
Sat Sep 15 15:15:27 UTC 2007


Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv15559

Modified Files:
	ChangeLog slime.el slime-autoloads.el 
Log Message:
Let slime-setup load contribs.

* slime.el (slime-setup): Take a list of contribs to load as
argument.

* slime-autoloads.el (slime-setup): Ditto, but delay the actual
loading until slime is loaded.
(slime-setup-contribs): New function.

Add the necessary hooks when loading some contribs, so that those
contribs can be easily loaded with slime-setup.

* slime-highlight-edits.el (slime-highlight-edits-mode-on): New
function.  Add this to slime-mode-hook by default.

* slime-autodoc.el (slime-use-autodoc-mode): Change default to t.



--- /project/slime/cvsroot/slime/ChangeLog	2007/09/15 14:24:31	1.1218
+++ /project/slime/cvsroot/slime/ChangeLog	2007/09/15 15:15:25	1.1219
@@ -1,3 +1,14 @@
+2007-09-15  Helmut Eller  <heller at common-lisp.net>
+
+	Let slime-setup load contribs.
+
+	* slime.el (slime-setup): Take a list of contribs to load as
+	argument.
+
+	* slime-autoloads.el (slime-setup): Ditto, but delay the actual
+	loading until slime is loaded.
+	(slime-setup-contribs): New function.
+
 2007-09-15  Tobias C. Rittweiler  <tcr at freebits.de>
 
 	* slime.el (slime-maybe-warn-for-different-source-root): Catch
--- /project/slime/cvsroot/slime/slime.el	2007/09/15 14:29:01	1.863
+++ /project/slime/cvsroot/slime/slime.el	2007/09/15 15:15:25	1.864
@@ -68,16 +68,14 @@
   "When non-nil highlight buffers with compilation notes, warnings and errors."
   )
 
-(defun* slime-setup (&key autodoc typeout-frame highlight-edits)
-  "Setup Emacs so that lisp-mode buffers always use SLIME."
+(defun slime-setup (&optional contribs)
+  "Setup Emacs so that lisp-mode buffers always use SLIME.
+CONTRIBS is a list of contrib packages to load."
   (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))
+  (mapc #'require contribs))
 
 (defun slime-shared-lisp-mode-hook ()
   (slime-mode 1))
@@ -6345,7 +6343,7 @@
   (remap 'undo '(lambda (&optional arg)
                  (interactive)
                  (let ((buffer-read-only nil))
-                   (when slime-use-highlight-edits-mode
+                   (when (fboundp 'slime-remove-edits)
                      (slime-remove-edits (point-min) (point-max)))
                    (undo arg)))))
 
@@ -6406,7 +6404,7 @@
        (lambda (expansion)
          (with-current-buffer buffer
            (let ((buffer-read-only nil))
-             (when slime-use-highlight-edits-mode
+             (when (fboundp 'slime-remove-edits)
                (slime-remove-edits (point-min) (point-max)))
              (goto-char start)
              (delete-region start end)
--- /project/slime/cvsroot/slime/slime-autoloads.el	2007/01/30 22:22:25	1.1
+++ /project/slime/cvsroot/slime/slime-autoloads.el	2007/09/15 15:15:26	1.2
@@ -28,20 +28,18 @@
 
 (defvar slime-lisp-modes '(lisp-mode))
 
-(defun slime-setup (&rest options)
+(defun slime-setup (&optional contribs)
   "Setup Emacs so that lisp-mode buffers always use SLIME.
-OPTIONS is a keyword list (&key AUTODOC TYPEOUT-FRAME HIGHLIGHT-EDITS):
-AUTODOC and HIGHLIGHT-EDITS enable `slime-autodoc-mode' resp.
-`slime-highlight-edits-mode'.
-If TYPEOUT-FRAME is true, the SLIME will use the typeout window."
+CONTRIBS is a list of contrib packages to load."
   (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 (plist-get options :typeout-frame)
-    (add-hook 'slime-connected-hook 'slime-ensure-typeout-frame))
-  (setq slime-use-autodoc-mode (plist-get options :autodoc))
-  (setq slime-use-highlight-edits-mode (plist-get options :highlight-edits)))
+  (setq slime-setup-contribs contribs)
+  (add-hook 'slime-load-hook 'slime-setup-contribs))
+
+(defvar slime-setup-contribs nil)
+(defun slime-setup-contribs () (mapc #'require slime-setup-contribs))
 
 (provide 'slime-autoloads)
 




More information about the slime-cvs mailing list