Clearing doc of a variable returns wrong value
Bug #1937354 reported by
Olivier Certner
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
New
|
Undecided
|
Unassigned |
Bug Description
Execute the following:
> (defvar *test* nil "")
*TEST*
> (setf (documentation '*test* 'variable) nil)
T
The value returned by (SETF DOCUMENTATION) is T, but should be NIL.
This happens only for variables having documentation prior to the SETF. By contrast, clearing the documentation of a variable that does not have some, or of any function, works correctly.
Confirmed on 2.1.0 and development version 2.1.6.41-343f72115.
Fix attached.
To post a comment you must log in.
the new-value argument has to be a string. If they meant "string or nil" then they would not have separately defined "documentation" and "new-value" in the "Arguments and Values"
(setf documentation) new-value x doc-type => new-value.
Arguments and Values:
x---an object.
doc-type---a symbol.
documentation---a string, or nil.
new-value---a string.