[slime-cvs] CVS slime
CVS User trittweiler
trittweiler at common-lisp.net
Sat Oct 31 20:47:13 UTC 2009
Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv13084
Modified Files:
swank.lisp ChangeLog
Log Message:
* swank.lisp (find-symbol-with-status): New.
(parse-symbol): Use it to correctly parse symbols where only one
colon is given. Consequences: Autodoc won't display an arglist on
`(foo:bar |' if BAR is not exported from FOO.
--- /project/slime/cvsroot/slime/swank.lisp 2009/10/31 08:54:46 1.667
+++ /project/slime/cvsroot/slime/swank.lisp 2009/10/31 20:47:13 1.668
@@ -2048,15 +2048,26 @@
(char-downcase char)
(char-upcase char)))))
+
+(defun find-symbol-with-status (symbol-name status &optional (package *package*))
+ (multiple-value-bind (symbol flag) (find-symbol symbol-name package)
+ (if (and flag (eq flag status))
+ (values symbol flag)
+ (values nil nil))))
+
(defun parse-symbol (string &optional (package *package*))
"Find the symbol named STRING.
Return the symbol and a flag indicating whether the symbols was found."
- (multiple-value-bind (sname pname) (tokenize-symbol-thoroughly string)
+ (multiple-value-bind (sname pname internalp)
+ (tokenize-symbol-thoroughly string)
(let ((package (cond ((string= pname "") keyword-package)
(pname (find-package pname))
(t package))))
(if package
- (multiple-value-bind (symbol flag) (find-symbol sname package)
+ (multiple-value-bind (symbol flag)
+ (if internalp
+ (find-symbol sname package)
+ (find-symbol-with-status sname ':external package))
(values symbol flag sname package))
(values nil nil nil nil)))))
--- /project/slime/cvsroot/slime/ChangeLog 2009/10/31 08:54:45 1.1900
+++ /project/slime/cvsroot/slime/ChangeLog 2009/10/31 20:47:13 1.1901
@@ -1,3 +1,10 @@
+2009-10-31 Tobias C. Rittweiler <tcr at freebits.de>
+
+ * swank.lisp (find-symbol-with-status): New.
+ (parse-symbol): Use it to correctly parse symbols where only one
+ colon is given. Consequences: Autodoc won't display an arglist on
+ `(foo:bar |' if BAR is not exported from FOO.
+
2009-10-31 Helmut Eller <heller at common-lisp.net>
* swank.lisp (list-threads): Remove thread-description. Wasn't
More information about the slime-cvs
mailing list