From 6c6b540711d0dd8a8eac9547968ed4dfb493fd1c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 1 Feb 2019 17:34:23 +0200 Subject: Correct the docs of inserting kmacro counter * doc/emacs/kmacro.texi (Keyboard Macro Counter): Correct the description of the affect "C-u" has on inserting the macro counter. Define "previous counter value". * lisp/kmacro.el (kmacro-insert-counter) (kmacro-start-macro-or-insert-counter): Fix the doc strings regarding the effect of "C-u". (Bug#34263) --- lisp/kmacro.el | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'lisp/kmacro.el') diff --git a/lisp/kmacro.el b/lisp/kmacro.el index f9d00a5603f..72d7091df17 100644 --- a/lisp/kmacro.el +++ b/lisp/kmacro.el @@ -263,7 +263,10 @@ Can be set directly via `kmacro-set-format', which see.") (defun kmacro-insert-counter (arg) "Insert current value of `kmacro-counter', then increment it by ARG. Interactively, ARG defaults to 1. With \\[universal-argument], insert -current value of `kmacro-counter', but do not increment it." +the previous value of `kmacro-counter', and do not increment the +current value. +The previous value of the counter is the one it had before +the last increment." (interactive "P") (if kmacro-initial-counter-value (setq kmacro-counter kmacro-initial-counter-value @@ -692,9 +695,10 @@ the current value of `kmacro-counter'). When used during defining/executing a macro, inserts the current value of `kmacro-counter' and increments the counter value by ARG (or by 1 if no -prefix argument). With just \\[universal-argument], inserts the current value -of `kmacro-counter', but does not modify the counter; this is the -same as incrementing the counter by zero. +prefix argument). With just \\[universal-argument], inserts the previous +value of `kmacro-counter', and does not modify the counter; this is +different from incrementing the counter by zero. (The previous value +of the counter is the one it had before the last increment.) The macro counter can be set directly via \\[kmacro-set-counter] and \\[kmacro-add-counter]. The format of the inserted value of the counter can be controlled -- cgit v1.2.3