]> git.eshelyaron.com Git - emacs.git/commit
Prevent for consing in cl-mapc and cl-mapl
authorTino Calancha <tino.calancha@gmail.com>
Mon, 27 Feb 2017 07:32:10 +0000 (16:32 +0900)
committerTino Calancha <tino.calancha@gmail.com>
Mon, 27 Feb 2017 07:32:10 +0000 (16:32 +0900)
commit4daca38d5c673c5b6862e10cfade9559852cce12
treef50e54581adcb9d69f5d927dec55ba2e13ed63bc
parent841e3e377c97142cfe76b9d91467f439198f5e39
Prevent for consing in cl-mapc and cl-mapl

* lisp/emacs-lisp/cl-extra.el (cl--mapcar-many): Add optional arg ACC;
If non-nil, accumulate values in the result (Bug#25826).
(cl-mapc): Do computations inside function instead of call cl-map.
(cl-mapl): Do computations inside function instead of call cl-maplist.
* lisp/emacs-lisp/cl-lib.el (mapcar): Add autoload cookie.
Call cl--mapcar-many with non-nil 3rd argument.
* test/lisp/emacs-lisp/cl-extra-tests.el (cl-extra-test-map)
(cl-extra-test-mapc, cl-extra-test-mapcar, cl-extra-test-mapl)
(cl-extra-test-maplist): New tests.
lisp/emacs-lisp/cl-extra.el
lisp/emacs-lisp/cl-lib.el
test/lisp/emacs-lisp/cl-extra-tests.el