From 516e1a08ce36fca220a0eaead731d3fe2d3bb271 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 30 Oct 2012 00:54:17 -0700 Subject: [PATCH] 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. --- doc/lispref/ChangeLog | 4 ++++ doc/lispref/variables.texi | 8 ++++---- doc/misc/ChangeLog | 3 +++ doc/misc/cl.texi | 13 ++++++++----- 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 2309cde2998..eca39e54203 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,7 @@ +2012-10-30 Glenn Morris + + * variables.texi (Generalized Variables): Fix typo. + 2012-10-30 Chong Yidong * symbols.texi (Symbol Plists): Document function-get. diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index 1ffb1f7ffcb..580dd8258df 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -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. diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index b07db9d605f..fa58cd958db 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -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 diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi index f520144679e..4105ac349ec 100644 --- a/doc/misc/cl.texi +++ b/doc/misc/cl.texi @@ -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 -- 2.39.2