From c2ce03b41a96aa7ecdb87862f490e93da3f4fbf4 Mon Sep 17 00:00:00 2001 From: Stas Boukarev Date: Tue, 5 Feb 2013 19:25:46 +0400 Subject: [PATCH] Fix (setf documentation) regression. When built with sb-doc enabled (the default), it crashes the build because it uses a not yet defined function, sb-impl::fun-name. Reported by Janis Dzerins. --- src/pcl/documentation.lisp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/pcl/documentation.lisp b/src/pcl/documentation.lisp index 7521653..65d9485 100644 --- a/src/pcl/documentation.lisp +++ b/src/pcl/documentation.lisp @@ -18,6 +18,14 @@ (setf (slot-value x '%documentation) new-value) (setf (%fun-doc x) new-value))) +;;; FIXME: There's already fun-name in code/describe.lisp, but it's +;;; loaded after PCL, so it cannot be used, because we set +;;; some documentation at the end of this file. +(defun fun-name (x) + (if (typep x 'generic-function) + (sb-pcl:generic-function-name x) + (%fun-name x))) + (defun real-function-name (name) ;; Resolve the actual name of the function named by NAME ;; e.g. (setf (name-function 'x) #'car) @@ -34,7 +42,7 @@ (eq (car name) 'macro-function) (cadr name)))) (t - (sb-impl::fun-name (fdefinition name))))) + (fun-name (fdefinition name))))) (defun set-function-name-documentation (name documentation) (cond ((not (legal-fun-name-p name)) -- 1.7.10.4