diff --git a/code/error.lisp b/code/error.lisp index dd5bc2c0834c0df4c8f34f98cf041657e7073f97..36f16e0c08b1d41517e13e5e5c2a8aeeb7257e5c 100644 --- a/code/error.lisp +++ b/code/error.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/error.lisp,v 1.73 2003/04/29 16:27:18 emarsden Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/error.lisp,v 1.74 2003/04/30 07:10:09 gerd Exp $") ;;; ;;; ********************************************************************** ;;; @@ -412,7 +412,10 @@ (allocation nil :type (member :instance :class nil)) ;; ;; If :class allocation, a cons whose car holds the value. - (cell nil :type (or cons null))) + (cell nil :type (or cons null)) + ;; + ;; Slot documentation. + (documentation nil :type (or null string))) (eval-when (compile load eval) (setf (condition-class-cpl (kernel::find-class 'condition)) @@ -735,7 +738,7 @@ (slot-name {slot-option value}*) where slot-option is one of :READER, :WRITER, :ACCESSOR, :ALLOCATION, - :INITARG, :INITFORM, and :TYPE. + :INITARG, :INITFORM, :DOCUMENTATION, and :TYPE. Each overall option is of the form @@ -768,6 +771,7 @@ (let* ((spec (if (consp spec) spec (list spec))) (slot-name (first spec)) (allocation :instance) + (documentation nil) (initform-p nil) initform) (collect ((initargs) @@ -794,6 +798,14 @@ (:initarg (initargs arg)) (:allocation (setq allocation arg)) + (:documentation + (when documentation + (simple-program-error + "More than one slot :DOCUMENTATION in~% ~s" spec)) + (unless (stringp arg) + (simple-program-error + "Slot :DOCUMENTATION is not a string in~% ~s" spec)) + (setq documentation arg)) (:type) (t (simple-program-error "Unknown slot option:~% ~S" @@ -808,6 +820,7 @@ :readers ',(readers) :writers ',(writers) :initform-p ',initform-p + :documentation ',documentation :initform ,(if (constantp initform) `',(eval initform) diff --git a/general-info/release-19a.txt b/general-info/release-19a.txt index 891b3fec95f76a3cc2a6ce32f70d75ffec31ec8b..0502b017faabcb4c1e3cc1e597ca31bc806608b8 100644 --- a/general-info/release-19a.txt +++ b/general-info/release-19a.txt @@ -52,12 +52,15 @@ New in this release: - Accessing arrays in compiled code with out-of-bounds indices now signals a TYPE-ERROR. - DECLARE no longer being a special operator. + - DEFINE-CONDITION accepts slot option :DOCUMENTATION. * Numerous bugfixes: - NSET-EXCLUSIVE-OR returns the same results as SET-EXCLUSIVE-OR wrt to duplicate elements. - Forms like (MULTIPLE-VALUE-BIND 'LIST) no longer trapping an internal compiler error when compiled. + - PARSE-INTEGER signaling PARSE-ERROR. + - Compiler eliminating some type checks in safe code. * Other changes: