[slime-cvs] CVS slime
CVS User sboukarev
sboukarev at common-lisp.net
Wed Sep 16 15:46:27 UTC 2009
Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv22545
Modified Files:
ChangeLog slime.el swank.lisp
Log Message:
* swank.lisp (documentation-symbol): Return more readable information.
--- /project/slime/cvsroot/slime/ChangeLog 2009/09/14 05:51:51 1.1853
+++ /project/slime/cvsroot/slime/ChangeLog 2009/09/16 15:46:27 1.1854
@@ -1,3 +1,7 @@
+2009-09-16 Stas Boukarev <stassats at gmail.com>
+
+ * swank.lisp (documentation-symbol): Return more readable information.
+
2009-09-14 Mark Evenson <evenson at panix.com>
* swank-abcl.lisp (source-location): Fix typo.
--- /project/slime/cvsroot/slime/slime.el 2009/09/03 07:43:08 1.1220
+++ /project/slime/cvsroot/slime/slime.el 2009/09/16 15:46:27 1.1221
@@ -4696,7 +4696,7 @@
(when (not symbol-name)
(error "No symbol given"))
(slime-eval-describe
- `(swank:documentation-symbol ,symbol-name "(not documented)")))
+ `(swank:documentation-symbol ,symbol-name)))
(defun slime-describe-function (symbol-name)
(interactive (list (slime-read-symbol-name "Describe symbol: ")))
--- /project/slime/cvsroot/slime/swank.lisp 2009/08/27 20:19:26 1.659
+++ /project/slime/cvsroot/slime/swank.lisp 2009/09/16 15:46:27 1.660
@@ -3116,19 +3116,21 @@
(with-output-to-string (*standard-output*)
(describe-definition (parse-symbol-or-lose name) kind)))))
-(defslimefun documentation-symbol (symbol-name &optional default)
+(defslimefun documentation-symbol (symbol-name)
(with-buffer-syntax ()
(multiple-value-bind (sym foundp) (parse-symbol symbol-name)
(if foundp
(let ((vdoc (documentation sym 'variable))
(fdoc (documentation sym 'function)))
- (or (and (or vdoc fdoc)
- (concatenate 'string
- fdoc
- (and vdoc fdoc '(#\Newline #\Newline))
- vdoc))
- default))
- default))))
+ (with-output-to-string (string)
+ (format string "Documentation for the symbol ~a:~2%" sym)
+ (unless (or vdoc fdoc)
+ (format string "Not documented." ))
+ (when vdoc
+ (format string "Variable:~% ~a~2%" vdoc))
+ (when fdoc
+ (format string "Function:~% ~a" fdoc))))
+ (format nil "No such symbol, ~a." symbol-name)))))
;;;; Package Commands
More information about the slime-cvs
mailing list