From 4abeb75a51634641185f80a747f9d8b3debcedd2 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 23 Feb 2025 07:23:33 +0200 Subject: [PATCH] ; Fix documentation of recent changes * etc/NEWS: * doc/lispref/numbers.texi (Arithmetic Operations): Fix wording and markup. --- doc/lispref/numbers.texi | 12 ++++++------ etc/NEWS | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/lispref/numbers.texi b/doc/lispref/numbers.texi index 29105959ecd..c38aa7cd62d 100644 --- a/doc/lispref/numbers.texi +++ b/doc/lispref/numbers.texi @@ -683,17 +683,17 @@ This function returns @var{number-or-marker} minus 1. @defmac incf place &optional delta This macro increments the number stored in @var{place} by one, or -by @var{delta} if specified. The incremented value is returned. +by @var{delta} if specified. It returns the incremented value. -@var{place} can be a symbol or a generalized variable, @xref{Generalized -Variables}. For example, @code{(incf i)} is equivalent to -@code{(setq i (1+ i))}, and @code{(incf (car x) 2)} is equivalent to -@code{(setcar x (+ (car x) 2))}. +@var{place} can be a symbol or a generalized variable, +@pxref{Generalized Variables}. For example, @w{@samp{(incf i)}} is +equivalent to @w{@samp{(setq i (1+ i))}}, and @w{@samp{(incf (car x) +2)}} is equivalent to @w{@samp{(setcar x (+ (car x) 2))}}. @end defmac @defmac decf place &optional delta This macro decrements the number stored in @var{place} by one, or -by @var{delta} if specified. The decremented value is returned. +by @var{delta} if specified. It returns the decremented value. @end defmac @defun + &rest numbers-or-markers diff --git a/etc/NEWS b/etc/NEWS index 0c54fc2c4a9..8ff318b5004 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1363,7 +1363,7 @@ change it globally with: (set-default-toplevel-value 'lexical-binding t) +++ -*** New functions 'incf' and 'decf'. +*** New macros 'incf' and 'decf'. They increment or decrement the value stored in a variable (a symbol), or in a generalized variable.