diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2022-04-21 15:11:25 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-04-21 15:11:33 +0200 |
commit | 935f400a33d6ff0f5d61fc7ade688a4378613882 (patch) | |
tree | e79e252f6b877a0c9958eb64bff0d3df23388d6c /lisp/emacs-lisp | |
parent | 6a50ce949b6d15a40bce44ea1bfd313b086130f8 (diff) | |
download | emacs-935f400a33d6ff0f5d61fc7ade688a4378613882.tar.gz emacs-935f400a33d6ff0f5d61fc7ade688a4378613882.tar.bz2 emacs-935f400a33d6ff0f5d61fc7ade688a4378613882.zip |
Clarify cl-incf/decf doc strings
* lisp/emacs-lisp/cl-lib.el (cl-incf):
(cl-decf): Clarify that nil isn't a valid value for X (bug#31715).
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/cl-lib.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el index 4e60a3c63d0..3f40ab07605 100644 --- a/lisp/emacs-lisp/cl-lib.el +++ b/lisp/emacs-lisp/cl-lib.el @@ -114,7 +114,10 @@ a future Emacs interpreter will be able to use it.") (defmacro cl-incf (place &optional x) "Increment PLACE by X (1 by default). PLACE may be a symbol, or any generalized variable allowed by `setf'. -The return value is the incremented value of PLACE." +The return value is the incremented value of PLACE. + +If X is specified, it should be an expression that should +evaluate to a number." (declare (debug (place &optional form))) (if (symbolp place) (list 'setq place (if x (list '+ place x) (list '1+ place))) @@ -123,7 +126,10 @@ The return value is the incremented value of PLACE." (defmacro cl-decf (place &optional x) "Decrement PLACE by X (1 by default). PLACE may be a symbol, or any generalized variable allowed by `setf'. -The return value is the decremented value of PLACE." +The return value is the decremented value of PLACE. + +If X is specified, it should be an expression that should +evaluate to a number." (declare (debug cl-incf)) (if (symbolp place) (list 'setq place (if x (list '- place x) (list '1- place))) |