]> git.eshelyaron.com Git - emacs.git/commit
New macros incf and decf
authorStefan Kangas <stefankangas@gmail.com>
Sat, 22 Feb 2025 16:32:31 +0000 (17:32 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sun, 23 Feb 2025 08:18:58 +0000 (09:18 +0100)
commit6de6f8494f80dbf21ae762af6698e100cf37e4c5
treeaa88645c44804f9657f7644cc30d35224de9d9a3
parent26a2b97fa6a20b8c2ee9f178ebbbd4ef387524fe
New macros incf and decf

* lisp/emacs-lisp/cl-lib.el (cl-incf, cl-decf): Move macros from here...
* lisp/emacs-lisp/gv.el (incf, decf): ...to here.  Make old names into
aliases, documented as deprecated.
* lisp/obsolete/cl.el: Don't alias incf and decf.

* test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-test-incf)
(cl-lib-test-decf): Move tests from here...
* test/lisp/emacs-lisp/gv-tests.el (gv-incf, gv-decf): ...to here.

* doc/lispref/numbers.texi (Arithmetic Operations):
* lisp/emacs-lisp/shortdoc.el (number): Document incf and decf.

* doc/lispref/variables.texi (Multisession Variables):
* doc/misc/cl.texi (Organization, Modify Macros, Modify Macros)
(Modify Macros, Macro Bindings, For Clauses, Property Lists)
(Structures, Efficiency Concerns, Obsolete Setf Customization): Delete
cl-incf and cl-decf documentation, moving any relevant parts to lispref.
Delete some parts that seem to primarily regard implementation details
that do not warrant inclusion in lispref.  Update all examples to use
incf/decf.

(cherry picked from commit 95fee880e45184f4820e9704b75887ef2d91bd01)
doc/lispref/numbers.texi
doc/lispref/variables.texi
doc/misc/cl.texi
lisp/emacs-lisp/cl-lib.el
lisp/emacs-lisp/gv.el
lisp/emacs-lisp/shortdoc.el
lisp/obsolete/cl.el
test/lisp/emacs-lisp/cl-lib-tests.el
test/lisp/emacs-lisp/gv-tests.el