1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-17 10:06:13 +00:00

More small manual updates for cl.texi

* doc/misc/cl.texi (Setf Extensions): Partially restore note about cl-getf,
mainly moved to lispref/variables.texi.
(Property Lists): Fix cl-getf typos.

* doc/lispref/variables.texi (Generalized Variables): Fix typo.
This commit is contained in:
Glenn Morris 2012-10-30 00:54:17 -07:00
parent 4ddedf94c8
commit 516e1a08ce
4 changed files with 19 additions and 9 deletions

View File

@ -1,3 +1,7 @@
2012-10-30 Glenn Morris <rgm@gnu.org>
* variables.texi (Generalized Variables): Fix typo.
2012-10-30 Chong Yidong <cyd@gnu.org>
* symbols.texi (Symbol Plists): Document function-get.

View File

@ -2025,10 +2025,10 @@ process-filter
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.

View File

@ -2,6 +2,9 @@
* 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>

View File

@ -900,6 +900,10 @@ cl-caaar .. cl-cddddr cl-first .. cl-tenth
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
@ -2813,10 +2817,10 @@ is given).
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
@ -2824,7 +2828,7 @@ list that corresponds to @var{property}, or to cons a new property-value
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.
@ -2837,8 +2841,7 @@ The fact that @code{default} is ignored can sometimes be useful:
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