From f43a5263c18258ab05d057881fa6b8795e65295a Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 30 Oct 2012 01:03:22 -0700 Subject: [PATCH] cl-mapc small fixes * lisp/emacs-lisp/cl-extra.el (cl-mapc): Add autoload cookie. Doc fix. * doc/misc/cl.texi (Mapping over Sequences): Mention cl-mapc naming oddity. --- doc/misc/ChangeLog | 1 + doc/misc/cl.texi | 8 ++++++-- lisp/ChangeLog | 2 ++ lisp/emacs-lisp/cl-extra.el | 3 ++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index fa58cd958db..941c430ce74 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -5,6 +5,7 @@ (Setf Extensions): Partially restore note about cl-getf, mainly moved to lispref/variables.texi. (Property Lists): Fix cl-getf typos. + (Mapping over Sequences): Mention cl-mapc naming oddity. 2012-10-29 Glenn Morris diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi index 4105ac349ec..8cee1cf9639 100644 --- a/doc/misc/cl.texi +++ b/doc/misc/cl.texi @@ -199,6 +199,8 @@ because they are replaced by other standard Emacs Lisp features. Finally, in a very few cases the old @file{cl.el} versions do not behave in exactly the same way as the @file{cl-lib.el} versions. @xref{Obsolete Features}. +@c There is also cl-mapc, which was called cl-mapc even before cl-lib.el. +@c But not autoloaded, so maybe not much used? Since the old @file{cl.el} does not use a clean namespace, Emacs has a policy that packages distributed with Emacs must not load @code{cl} at @@ -3309,13 +3311,15 @@ that it passes in the list pointers themselves rather than the @code{car}s of the advancing pointers. @end defun -@c FIXME does not exist? @defun cl-mapc function seq &rest more-seqs This function is like @code{cl-mapcar}, except that the values returned by @var{function} are ignored and thrown away rather than being collected into a list. The return value of @code{cl-mapc} is @var{seq}, the first sequence. This function is more general than the Emacs -primitive @code{mapc}. +primitive @code{mapc}. (Note that this function is called +@code{cl-mapc} even in @file{cl.el}, rather than @code{map*} as you +might expect.) +@c http://debbugs.gnu.org/6575 @end defun @defun cl-mapl function list &rest more-lists diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c5c3b93d195..bd535894cdf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2012-10-30 Glenn Morris + * emacs-lisp/cl-extra.el (cl-mapc): Add autoload cookie. Doc fix. + * emacs-lisp/cl.el (letf): Doc fix. (Bug#12760) 2012-10-29 Chong Yidong diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el index 913ebf2015f..c72e3342648 100644 --- a/lisp/emacs-lisp/cl-extra.el +++ b/lisp/emacs-lisp/cl-extra.el @@ -149,8 +149,9 @@ the elements themselves. (setq cl-list (cdr cl-list))) (nreverse cl-res)))) +;;;###autoload (defun cl-mapc (cl-func cl-seq &rest cl-rest) - "Like `mapcar', but does not accumulate values returned by the function. + "Like `cl-mapcar', but does not accumulate values returned by the function. \n(fn FUNCTION SEQUENCE...)" (if cl-rest (progn (apply 'cl-map nil cl-func cl-seq cl-rest) -- 2.39.2