describe: Better description for complex setf-expanders.
authorAlastair Bridgewater <nyef_sbcl@lisphacker.com>
Fri, 1 Apr 2011 01:02:22 +0000 (21:02 -0400)
committerAlastair Bridgewater <nyef@virtdev-1.lisphacker.com>
Sat, 22 Oct 2011 00:21:18 +0000 (20:21 -0400)
  * Rather than simply reporting the documentation string (if any), also
report the lambda-list of the expansion function and the associated
source location.

NEWS
src/code/describe.lisp

diff --git a/NEWS b/NEWS
index 69987ff..5393949 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,8 @@ changes relative to sbcl-1.0.52:
     (signed-byte 63)) to 3 (fixnum = (signed-byte 61)) at build-time.
   * minor(?) incompatible(?) change: The default fixnum width on 64-bit
     targets is now 63 bits (up from 61).
+  * enhancement: DESCRIBE now reports a lambda-list and source location
+    for complext setf-expanders.
   * bug fix: PUSH, PUSHNEW, POP, REMF, INCF, DECF, DEFINE-MODIFY-MACRO,
     GETF, LOGBITP, LDB, and MASK-FIELD now arrange for non-primary values
     of multiple-valued places to be set to NIL, instead of signalling an
index 8c7802f..504cc66 100644 (file)
                  (format stream "~&~A has a complex setf-expansion:"
                          name)
                  (pprint-indent :block 2 stream)
-                 (describe-documentation name2 'setf stream t))
+                 (describe-lambda-list (%fun-lambda-list expander) stream)
+                 (describe-documentation name2 'setf stream t)
+                 (describe-function-source expander stream))
                (terpri stream)))))
     (when (symbolp name)
       (describe-function `(setf ,name) nil stream))))