[slime-cvs] CVS slime/contrib

CVS User sboukarev sboukarev at common-lisp.net
Tue Mar 9 23:26:23 UTC 2010


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

Modified Files:
	ChangeLog swank-arglists.lisp 
Log Message:
* swank-arglists.lisp (arglist-ref): Don't error if a &key name isn't
a :keyword symbol. And also handle non-:keyword keyword parameters.


--- /project/slime/cvsroot/slime/contrib/ChangeLog	2010/03/09 14:42:22	1.355
+++ /project/slime/cvsroot/slime/contrib/ChangeLog	2010/03/09 23:26:23	1.356
@@ -1,5 +1,10 @@
 2010-03-09  Stas Boukarev  <stassats at gmail.com>
 
+	* swank-arglists.lisp (arglist-ref): Don't error if a &key name isn't
+	a :keyword symbol. And also handle non-:keyword keyword parameters.
+
+2010-03-09  Stas Boukarev  <stassats at gmail.com>
+
 	* swank-presentations.lisp (inspect-presentation): Throw an error when
 	trying to access unrecorded object.
 	(lookup-presented-object-or-lose): Rename from `get-repl-result'.
--- /project/slime/cvsroot/slime/contrib/swank-arglists.lisp	2010/03/07 14:09:51	1.58
+++ /project/slime/cvsroot/slime/contrib/swank-arglists.lisp	2010/03/09 23:26:23	1.59
@@ -1396,8 +1396,10 @@
          (let* ((argument      (nth arg-index provided-arguments))
                 (provided-keys (subseq provided-arguments positional-args#)))
            (loop for (key value) on provided-keys by #'cddr
-                 when (eq value argument) 
-                 return key)))))))
+                 when (eq value argument)
+                 return (match key
+                            (('quote symbol) symbol)
+                            (_ key)))))))))
 
 (defun arglist-ref (arglist &rest indices)
   "Returns the parameter in ARGLIST along the INDICIES path. Numbers
@@ -1416,10 +1418,14 @@
                      do (decf index args#)
                    finally (return (or rest nil)))))
          (ref-keyword-arg (arglist keyword)
-           (assert (symbolp keyword) (keyword))
-           (do-decoded-arglist arglist
-             (&key (kw arg) (when (eq kw keyword)
-                              (return-from ref-keyword-arg arg))))
+           ;; keyword argument may be any symbol,
+           ;; not only from the KEYWORD package.
+           (let ((keyword (match keyword
+                            (('quote symbol) symbol)
+                            (_ keyword))))
+             (do-decoded-arglist arglist
+               (&key (kw arg) (when (eq kw keyword)
+                                (return-from ref-keyword-arg arg)))))
            nil))
     (dolist (index indices)
       (assert (arglist-p arglist))





More information about the slime-cvs mailing list