[slime-cvs] CVS slime/contrib

CVS User trittweiler trittweiler at common-lisp.net
Tue Dec 30 17:12:11 UTC 2008


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

Modified Files:
	swank-arglists.lisp slime-parse.el ChangeLog 
Log Message:
	* swank-arglists.lisp (defstruct arglist-dummy): Remove
	:PRINT-OBJECT which made an arglist dummy look like a normal
	symbol. This is just confusing. If an ARGLIST-DUMMY appears in an
	arglist, the relevant code should deal with this explicitly.
	(with-availability): Renamed to WITH-AVAILABLE-ARGLIST.

	* slime-parse.el (slime-parse-extended-operator-name): Pass the
	fully qualified symbol (not just the name) to the parser function.
	(slime-make-extended-operator-parser/look-ahead): Do not take the
	operator name as first argument if point is located at the
	operator name.


--- /project/slime/cvsroot/slime/contrib/swank-arglists.lisp	2008/09/07 12:34:22	1.23
+++ /project/slime/cvsroot/slime/contrib/swank-arglists.lisp	2008/12/30 17:12:11	1.24
@@ -117,10 +117,7 @@
 ;; This is a wrapper object around anything that came from Slime and
 ;; could not reliably be read. 
 (defstruct (arglist-dummy
-	     (:conc-name #:arglist-dummy.)
-	     (:print-object (lambda (struct stream)
-			      (with-struct (arglist-dummy. string-representation) struct
-				(write-string string-representation stream)))))
+	     (:conc-name #:arglist-dummy.))
   string-representation)
 
 (defun read-conversatively-for-autodoc (string)
@@ -1095,7 +1092,7 @@
           (split-form-spec form-spec)
         (arglist-dispatch type operator arguments :remove-args remove-args))))
 
-(defmacro with-availability ((var) form &body body)
+(defmacro with-available-arglist ((var) form &body body)
   `(let ((,var ,form))
      (if (eql ,var :not-available)
          :not-available
@@ -1129,13 +1126,13 @@
                              arguments &key (remove-args t))
   (when (and (listp arguments)
 	     (not (null arguments)) ;have generic function name
-	     (notany #'listp (rest arguments))) ;don't have arglist yet 
+	     (notany #'listp (rest arguments))) ;don't have arglist yet
     (let* ((gf-name (first arguments))
 	   (gf (and (valid-function-name-p gf-name)
 		    (fboundp gf-name)
 		    (fdefinition gf-name))))
       (when (typep gf 'generic-function)
-        (with-availability (arglist) (arglist gf)
+        (with-available-arglist (arglist) (arglist gf)
           (return-from arglist-dispatch
             (values (make-arglist :provided-args (if remove-args
                                                      nil
@@ -1161,7 +1158,7 @@
 
 (defmethod arglist-dispatch ((operator-type (eql :declaration))
                              decl-identifier decl-args &key (remove-args t))
-  (with-availability (arglist)
+  (with-available-arglist (arglist)
       (declaration-arglist decl-identifier)
     (maybecall remove-args #'remove-actual-args
                (decode-arglist arglist) decl-args))
@@ -1171,7 +1168,7 @@
 
 (defmethod arglist-dispatch ((operator-type (eql :type-specifier))
                              type-specifier specifier-args &key (remove-args t))
-  (with-availability (arglist)
+  (with-available-arglist (arglist)
       (type-specifier-arglist type-specifier)
     (maybecall remove-args #'remove-actual-args
                (decode-arglist arglist) specifier-args))
--- /project/slime/cvsroot/slime/contrib/slime-parse.el	2008/09/13 10:39:02	1.12
+++ /project/slime/cvsroot/slime/contrib/slime-parse.el	2008/12/30 17:12:11	1.13
@@ -103,7 +103,9 @@
           (slime-forward-blanks))
         (when parser
           (multiple-value-setq (forms indices points)
-            (funcall parser op-name user-point forms indices points))))))
+            ;; We pass the fully qualified name (`current-op'), so it's the
+            ;; fully qualified name that will be sent to SWANK.
+            (funcall parser current-op user-point forms indices points))))))
   (values forms indices points))
 
 
@@ -127,10 +129,12 @@
 operator."
   (lexical-let ((n steps))
     #'(lambda (name user-point current-forms current-indices current-points)
-        (let ((old-forms (rest current-forms)))
-          (let* ((args (slime-ensure-list (slime-parse-sexp-at-point n)))
-                 (arg-specs (mapcar #'slime-make-form-spec-from-string args)))
-            (setq current-forms (cons `(,name , at arg-specs) old-forms))))
+        (let ((old-forms (rest current-forms))
+              (arg-idx   (first current-indices)))
+          (unless (zerop arg-idx)
+            (let* ((args (slime-ensure-list (slime-parse-sexp-at-point n)))
+                   (arg-specs (mapcar #'slime-make-form-spec-from-string args)))
+              (setq current-forms (cons `(,name , at arg-specs) old-forms)))))
         (values current-forms current-indices current-points)
         )))
 
--- /project/slime/cvsroot/slime/contrib/ChangeLog	2008/12/27 18:24:29	1.153
+++ /project/slime/cvsroot/slime/contrib/ChangeLog	2008/12/30 17:12:11	1.154
@@ -1,3 +1,17 @@
+2008-12-30  Tobias C. Rittweiler  <tcr at freebits.de>
+
+	* swank-arglists.lisp (defstruct arglist-dummy): Remove
+	:PRINT-OBJECT which made an arglist dummy look like a normal
+	symbol. This is just confusing. If an ARGLIST-DUMMY appears in an
+	arglist, the relevant code should deal with this explicitly.
+	(with-availability): Renamed to WITH-AVAILABLE-ARGLIST.
+
+	* slime-parse.el (slime-parse-extended-operator-name): Pass the
+	fully qualified symbol (not just the name) to the parser function.
+	(slime-make-extended-operator-parser/look-ahead): Do not take the
+	operator name as first argument if point is located at the
+	operator name.
+
 2008-12-27  Helmut Eller  <heller at common-lisp.net>
 
 	* slime-repl.el (slime-repl-event-hook-function): Handle





More information about the slime-cvs mailing list