Function: cl-decf
cl-decf is a macro defined in cl-lib.el.gz.
Signature
(cl-decf PLACE &optional X)
Documentation
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.
If X is specified, it should be an expression that should evaluate to a number.
Aliases
decf (obsolete since 27.1)
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/cl-lib.el.gz
(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.
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)))
(list 'cl-callf '- place (or x 1))))