[slime-cvs] CVS slime

CVS User heller heller at common-lisp.net
Fri May 28 13:37:51 UTC 2010


Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv2911

Modified Files:
	ChangeLog slime.el 
Log Message:
* slime.el (define-slime-contrib): Use destructuring-bind.

--- /project/slime/cvsroot/slime/ChangeLog	2010/05/28 13:37:40	1.2103
+++ /project/slime/cvsroot/slime/ChangeLog	2010/05/28 13:37:50	1.2104
@@ -1,5 +1,9 @@
 2010-05-28  Helmut Eller  <heller at common-lisp.net>
 
+	* slime.el (define-slime-contrib): Use destructuring-bind.
+
+2010-05-28  Helmut Eller  <heller at common-lisp.net>
+
 	Move some var-defs before first use.
 
 	* slime.el (slime-show-xref-buffer, slime-read-connection)
--- /project/slime/cvsroot/slime/slime.el	2010/05/28 13:37:40	1.1324
+++ /project/slime/cvsroot/slime/slime.el	2010/05/28 13:37:51	1.1325
@@ -6866,26 +6866,20 @@
             (slime-eval `(swank:swank-require ',needed))))))
 
 (defmacro define-slime-contrib (name docstring &rest clauses)
-  (let ((slime-deps   '())
-        (swank-deps   '())
-        (load-forms   '())
-        (unload-forms '())
-        (gnu-only-p nil))
-    (dolist (clause clauses)
-      (destructure-case clause
-        ((:slime-dependencies . deps) (setq slime-deps deps))
-        ((:swank-dependencies . deps) (setq swank-deps deps))
-        ((:on-load   . forms)         (setq load-forms forms))
-        ((:on-unload . forms)         (setq unload-forms forms))
-        ((:gnu-emacs-only flag)       (setq gnu-only-p flag))
-        ((:authors . authors))
-        ((:license license))))
+  (destructuring-bind (&key slime-dependencies
+                            swank-dependencies
+                            on-load 
+                            on-unload
+                            gnu-emacs-only
+                            authors 
+                            license)
+      (loop for (key . value) in clauses append `(,key ,value))
     `(progn
        ,(when gnu-only-p
-         `(eval-and-compile
-            (assert (not (featurep 'xemacs)) ()
-                    ,(concat (symbol-name name)
-                             " does not work with XEmacs."))))
+          `(eval-and-compile
+             (assert (not (featurep 'xemacs)) ()
+                     ,(concat (symbol-name name)
+                              " does not work with XEmacs."))))
        ,@(mapcar #'(lambda (d) `(require ',d)) slime-deps)
        (defun ,(intern (concat (symbol-name name) "-init")) ()
          ,@(mapcar #'(lambda (d) `(slime-require ',d)) swank-deps)





More information about the slime-cvs mailing list