From 5951caad8c14912c4dd859a49d2b240fa247b51d Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Tue, 21 Sep 2010 11:23:32 +0000 Subject: [PATCH] 1.0.42.49: fix (SETF DOCUMENTATION) for macros Fixes lp#643958. Patch Stas Boukarev, test-case by yours truly. Nice and simple, so going in mid-freeze. --- NEWS | 2 ++ src/pcl/documentation.lisp | 3 ++- tests/interface.impure.lisp | 9 +++++++++ version.lisp-expr | 2 +- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 653806a..feef931 100644 --- a/NEWS +++ b/NEWS @@ -57,6 +57,8 @@ changes relative to sbcl-1.0.42 in frames that do not have sufficient debug information. * bug fix: exceeding FD_SETSIZE limit now results in an sensible error (lp#316068) + * bug fix: (SETF DOCUMENTATION) of a macro works properly. (lp#643958, thanks + to Stas Boukarev) changes in sbcl-1.0.42 relative to sbcl-1.0.41 * build changes diff --git a/src/pcl/documentation.lisp b/src/pcl/documentation.lisp index d5d4eb2..7bc2e58 100644 --- a/src/pcl/documentation.lisp +++ b/src/pcl/documentation.lisp @@ -63,7 +63,8 @@ (defmethod (setf documentation) (new-value (x symbol) (doc-type (eql 'function))) (when (and (legal-fun-name-p x) (fboundp x)) - (setf (documentation (symbol-function x) t) new-value))) + (setf (documentation (or (macro-function x) (symbol-function x)) t) + new-value))) (defmethod (setf documentation) (new-value (x symbol) (doc-type (eql 'compiler-macro))) (awhen (compiler-macro-function x) diff --git a/tests/interface.impure.lisp b/tests/interface.impure.lisp index 6f697a5..3837060 100644 --- a/tests/interface.impure.lisp +++ b/tests/interface.impure.lisp @@ -247,5 +247,14 @@ (flet ((zoo () (gogo))) (defmethod gogo () nil) (describe 'gogo))) + +(defmacro bug-643958-test () + "foo" + :ding!) + +(with-test (:name :bug-643958) + (assert (equal "foo" (documentation 'bug-643958-test 'function))) + (setf (documentation 'bug-643958-test 'function) "bar") + (assert (equal "bar" (documentation 'bug-643958-test 'function)))) ;;;; success diff --git a/version.lisp-expr b/version.lisp-expr index 28d864a..5ec2273 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.42.48" +"1.0.42.49" -- 1.7.10.4