[slime-cvs] CVS slime/contrib

CVS User trittweiler trittweiler at common-lisp.net
Mon Feb 2 18:55:36 UTC 2009


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

Modified Files:
	swank-arglists.lisp ChangeLog 
Log Message:

	* swank-arglists.lisp (arglist-for-echo-area): Bleh, can't use
	WITH-AVAILABLE-ARGLIST because we're supposed to return NIL, not
	:NOT-AVAILABLE, in the failure case.


--- /project/slime/cvsroot/slime/contrib/swank-arglists.lisp	2009/02/01 23:57:34	1.27
+++ /project/slime/cvsroot/slime/contrib/swank-arglists.lisp	2009/02/02 18:55:36	1.28
@@ -66,12 +66,6 @@
            (eq (first form) 'setf)
            (symbolp (second form)))))
 
-(defmacro with-available-arglist ((var) form &body body)
-  `(let ((,var ,form))
-     (if (eql ,var :not-available)
-         :not-available
-         (progn , at body))))
-
 ;;; A ``raw form spec'' can be either: 
 ;;; 
 ;;;   i)   a list of strings representing a Common Lisp form
@@ -127,31 +121,31 @@
             (parse-first-valid-form-spec raw-specs #'read-conversatively-for-autodoc)
           (when form-spec
             (unwind-protect
-                 (with-available-arglist (arglist)
-                     (arglist-from-form-spec form-spec :remove-args nil)
-                   (multiple-value-bind (type operator)
-                       (split-form-spec form-spec)
-                     (let* ((index (nth position arg-indices))
-                            (stringified-arglist
-                             (decoded-arglist-to-string
-                              arglist
-                              :operator operator
-                              :print-right-margin print-right-margin
-                              :print-lines print-lines
-                              ;; Do not highlight the operator:
-                              :highlight (and index (not (zerop index)) index))))
-                       ;; Post formatting:
-                       (case type
-                         (:type-specifier (format nil "[Typespec] ~A" stringified-arglist))
-                         (:declaration
-                          (locally (declare (special *arglist-pprint-bindings*))
-                            (with-bindings *arglist-pprint-bindings*
-                              ;; Try to print ``(declare (declspec))'' (or ``declaim'' etc.)
-                              (let ((op (%find-declaration-operator raw-specs position)))
-                                (if op
-                                    (format nil "(~A ~A)" op stringified-arglist)
-                                    (format nil "[Declaration] ~A" stringified-arglist))))))
-                         (t stringified-arglist)))))
+                 (let ((arglist (arglist-from-form-spec form-spec :remove-args nil)))
+                   (unless (eq arglist :not-available)
+                     (multiple-value-bind (type operator)
+                         (split-form-spec form-spec)
+                       (let* ((index (nth position arg-indices))
+                              (stringified-arglist
+                               (decoded-arglist-to-string
+                                arglist
+                                :operator operator
+                                :print-right-margin print-right-margin
+                                :print-lines print-lines
+                                ;; Do not highlight the operator:
+                                :highlight (and index (not (zerop index)) index))))
+                         ;; Post formatting:
+                         (case type
+                           (:type-specifier (format nil "[Typespec] ~A" stringified-arglist))
+                           (:declaration
+                            (locally (declare (special *arglist-pprint-bindings*))
+                              (with-bindings *arglist-pprint-bindings*
+                                ;; Try to print ``(declare (declspec))'' (or ``declaim'' etc.)
+                                (let ((op (%find-declaration-operator raw-specs position)))
+                                  (if op
+                                      (format nil "(~A ~A)" op stringified-arglist)
+                                      (format nil "[Declaration] ~A" stringified-arglist))))))
+                           (t stringified-arglist))))))
               (mapc #'unintern-in-home-package newly-interned-symbols)))))
     (error (cond)
       (format nil "ARGLIST (error): ~A" cond))
@@ -1100,6 +1094,13 @@
           (split-form-spec form-spec)
         (arglist-dispatch type operator arguments :remove-args remove-args))))
 
+
+(defmacro with-available-arglist ((var) form &body body)
+  `(let ((,var ,form))
+     (if (eql ,var :not-available)
+         :not-available
+         (progn , at body))))
+
 (defgeneric arglist-dispatch (operator-type operator arguments &key remove-args))
   
 (defmethod arglist-dispatch ((operator-type t) operator arguments &key (remove-args t))
--- /project/slime/cvsroot/slime/contrib/ChangeLog	2009/02/02 15:29:33	1.172
+++ /project/slime/cvsroot/slime/contrib/ChangeLog	2009/02/02 18:55:36	1.173
@@ -1,5 +1,11 @@
 2009-02-02  Tobias C. Rittweiler  <tcr at freebits.de>
 
+	* swank-arglists.lisp (arglist-for-echo-area): Bleh, can't use
+	WITH-AVAILABLE-ARGLIST because we're supposed to return NIL, not
+	:NOT-AVAILABLE, in the failure case.
+
+2009-02-02  Tobias C. Rittweiler  <tcr at freebits.de>
+
 	* slime-parse.el ([test] enclosing-form-specs.1): Fix test case.
 
 2009-02-01  Tobias C. Rittweiler  <tcr at freebits.de>





More information about the slime-cvs mailing list