[slime-cvs] CVS slime/contrib
trittweiler
trittweiler at common-lisp.net
Sun Dec 30 11:31:55 UTC 2007
Update of /project/slime/cvsroot/slime/contrib
In directory clnet:/tmp/cvs-serv9098
Modified Files:
swank-arglists.lisp
Log Message:
* swank-arglists.lisp: Fix for `(cerror "FOO" 'type-error ...)'
(*arglist-dummy*): Removed.
(arglist-dummy): New structure. Wrapper around whatever could not
be reliably read. The clue is that its printing function does only
print the object this structure contains.
(read-conversatively-for-autodoc): Return such a structure if
conversative reading fails.
--- /project/slime/cvsroot/slime/contrib/swank-arglists.lisp 2007/11/29 12:38:01 1.15
+++ /project/slime/cvsroot/slime/contrib/swank-arglists.lisp 2007/12/30 11:31:55 1.16
@@ -72,7 +72,14 @@
(let ((op-rawspec (nth (1+ position) raw-specs)))
(first (parse-form-spec op-rawspec #'read-conversatively-for-autodoc))))
-(defvar *arglist-dummy* (cons :dummy nil))
+;; 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)))))
+ string-representation)
(defun read-conversatively-for-autodoc (string)
"Tries to find the symbol that's represented by STRING.
@@ -83,8 +90,8 @@
automatic arglist display stuff from Slime, interning freshly
symbols is a big no-no.
-In such a case (that no symbol could be found), the object
-*ARGLIST-DUMMY* is returned instead, which works as a placeholder
+In such a case (that no symbol could be found), an object of type
+ARGLIST-DUMMY is returned instead, which works as a placeholder
datum for subsequent logics to rely on."
(let* ((string (string-left-trim '(#\Space #\Tab #\Newline) string))
(quoted? (eql (aref string 0) #\')))
@@ -92,7 +99,7 @@
(parse-symbol (if quoted? (subseq string 1) string))
(if found?
(if quoted? `(quote ,symbol) symbol)
- *arglist-dummy*))))
+ (make-arglist-dummy :string-representation string)))))
(defun parse-form-spec (raw-spec &optional reader)
More information about the slime-cvs
mailing list