[slime-cvs] CVS update: slime/swank.lisp
Helmut Eller
heller at common-lisp.net
Sat Jun 12 12:21:14 UTC 2004
Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv10109
Modified Files:
swank.lisp
Log Message:
(parse-symbol, parse-package): Handle reader errors.
Date: Sat Jun 12 05:21:14 2004
Author: heller
Index: slime/swank.lisp
diff -u slime/swank.lisp:1.189 slime/swank.lisp:1.190
--- slime/swank.lisp:1.189 Thu Jun 10 10:51:33 2004
+++ slime/swank.lisp Sat Jun 12 05:21:13 2004
@@ -789,19 +789,22 @@
"Find the symbol named STRING.
Return the symbol and a flag indicate if the symbols was found."
(multiple-value-bind (sym pos) (let ((*package* *keyword-package*))
- (read-from-string string))
- (if (and (symbolp sym) (= (length string) pos))
+ (ignore-errors (read-from-string string)))
+ (if (and (symbolp sym) (eql (length string) pos))
(find-symbol (string sym))
(values nil nil))))
(defun parse-package (string)
"Find the package named STRING.
Return the package or nil."
- (multiple-value-bind (sym pos) (let ((*package* *keyword-package*))
- (read-from-string string))
+ (multiple-value-bind (sym pos)
+ (if (zerop (length string))
+ (values :|| 0)
+ (let ((*package* *keyword-package*))
+ (ignore-errors (read-from-string string))))
(if (and (keywordp sym) (= (length string) pos))
(find-package sym))))
-
+
(defun to-string (string)
"Write string in the *BUFFER-PACKAGE*."
(with-buffer-syntax ()
More information about the slime-cvs
mailing list