Using any forms other than these in the @var{place} argument to
@code{setf} will signal an error.
-Note that for @code{nthcdr} and @code{getf}, the list argument
-of the function must itself be a valid @var{place} form. For
-example, @code{(setf (nthcdr 0 foo) 7)} will set @code{foo} itself
-to 7.
+@c And for cl-lib's cl-getf.
+Note that for @code{nthcdr}, the list argument of the function must
+itself be a valid @var{place} form. For example, @code{(setf (nthcdr
+0 foo) 7)} will set @code{foo} itself to 7.
@c The use of @code{nthcdr} as a @var{place} form is an extension
@c to standard Common Lisp.
* cl.texi (Modify Macros): Update for cl-letf changes.
(Obsolete Lexical Macros): Say a little more about letf/cl-letf.
+ (Setf Extensions): Partially restore note about cl-getf,
+ mainly moved to lispref/variables.texi.
+ (Property Lists): Fix cl-getf typos.
2012-10-29 Glenn Morris <rgm@gnu.org>
cl-rest cl-get cl-getf cl-subseq
@end smallexample
+@noindent
+Note that for @code{cl-getf} (as for @code{nthcdr}), the list argument
+of the function must itself be a valid @var{place} form.
+
@item
General Emacs Lisp functions:
@smallexample
In particular,
@example
-(get sym prop) @equiv{} (cl-get (symbol-plist sym) prop)
+(get sym prop) @equiv{} (cl-getf (symbol-plist sym) prop)
@end example
-It is valid to use @code{getf} as a @code{setf} place, in which case
+It is valid to use @code{cl-getf} as a @code{setf} place, in which case
its @var{place} argument must itself be a valid @code{setf} place.
The @var{default} argument, if any, is ignored in this context.
The effect is to change (via @code{setcar}) the value cell in the
pair onto the list if the property is not yet present.
@example
-(put sym prop val) @equiv{} (setf (cl-get (symbol-plist sym) prop) val)
+(put sym prop val) @equiv{} (setf (cl-getf (symbol-plist sym) prop) val)
@end example
The @code{get} and @code{cl-get} functions are also @code{setf}-able.
Here, symbol @code{foo}'s @code{usage-count} property is incremented
if it exists, or set to 1 (an incremented 0) otherwise.
-@c FIXME cl-getf?
-When not used as a @code{setf} form, @code{getf} is just a regular
+When not used as a @code{setf} form, @code{cl-getf} is just a regular
function and its @var{place} argument can actually be any Lisp
expression.
@end defun