[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 849631c: Fix last change
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master 849631c: Fix last change |
Date: |
Sun, 17 Jun 2018 06:15:29 -0400 (EDT) |
branch: master
commit 849631c1b7e9c5c4a90655208265de9db0854bb2
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Fix last change
* etc/NEWS: Fix last added entry.
* lisp/subr.el (dotimes-with-progress-reporter)
(dolist-with-progress-reporter): Fix the advertised signature.
* doc/lispref/display.texi (Progress): Fix last change.
(Bug#31696) (Bug#31697)
---
doc/lispref/display.texi | 28 ++++++++++++++++++----------
etc/NEWS | 4 +++-
lisp/subr.el | 8 ++++----
3 files changed, 25 insertions(+), 15 deletions(-)
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index feeb1ca..a3dca1c 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -472,43 +472,51 @@ Secondly, @samp{done} is more explicit.
@defmac dotimes-with-progress-reporter (var count [result])
reporter-or-message address@hidden
This is a convenience macro that works the same way as @code{dotimes}
does, but also reports loop progress using the functions described
-above. It allows you to save some typing.
+above. It allows you to save some typing. The argument
address@hidden can be either a string or a progress
+reporter object.
-You can rewrite the example in the beginning of this node using
-this macro this way:
+You can rewrite the example in the beginning of this subsection using
+this macro as follows:
@example
address@hidden
(dotimes-with-progress-reporter
(k 500)
"Collecting some mana for Emacs..."
(sit-for 0.01))
address@hidden group
@end example
+Using a reporter object as the @var{reporter-or-message} argument is
+useful if you want to specify the optional arguments in
address@hidden For instance, you can write the
+previous example as follows:
-The second argument @code{reporter-or-message} might be a progress
-reporter object. This is useful if you want to specify the optional
-arguments in @code{make-progress-reporter}.
-For instance, you can write previous example as follows:
@example
address@hidden
(dotimes-with-progress-reporter
(k 500)
(make-progress-reporter "Collecting some mana for Emacs..." 0 500 0 1 1.5)
(sit-for 0.01))
address@hidden group
@end example
@end defmac
@defmac dolist-with-progress-reporter (var count [result]) reporter-or-message
address@hidden
This is another convenience macro that works the same way as @code{dolist}
does, but also reports loop progress using the functions described
-above. As in @code{dotimes-with-progress-reporter},
@code{reporter-or-message} can be
-a progress reporter or an string.
-We can rewrite our previous example with this macro as follows:
+above. As in @code{dotimes-with-progress-reporter},
address@hidden can be a progress reporter or a string.
+You can rewrite the previous example with this macro as follows:
@example
address@hidden
(dolist-with-progress-reporter
(k (number-sequence 0 500))
"Collecting some mana for Emacs..."
(sit-for 0.01))
address@hidden group
@end example
@end defmac
diff --git a/etc/NEWS b/etc/NEWS
index b5d3d59..5a3a27e 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -617,7 +617,9 @@ manual for more details.
* Lisp Changes in Emacs 27.1
+++
-** New macro dolist-with-progress-reporter.
+** New macro 'dolist-with-progress-reporter'.
+This works like 'dolist', but reports progress similar to
+'dotimes-with-progress-reporter'.
+++
** New hook 'after-delete-frame-functions'.
diff --git a/lisp/subr.el b/lisp/subr.el
index dc946bd..7ac1c91 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -5050,11 +5050,11 @@ case, use this string to create a progress reporter.
At each iteration, print the reporter message followed by progress
percentage in the echo area. After the loop is finished,
-print the reporter message followed by word \"done\".
+print the reporter message followed by the word \"done\".
This macro is a convenience wrapper around `make-progress-reporter' and
friends.
-\(fn (VAR COUNT [RESULT]) MESSAGE BODY...)"
+\(fn (VAR COUNT [RESULT]) REPORTER-OR-MESSAGE BODY...)"
(declare (indent 2) (debug ((symbolp form &optional form) form body)))
(let ((prep (make-symbol "--dotimes-prep--"))
(end (make-symbol "--dotimes-end--")))
@@ -5078,9 +5078,9 @@ case, use this string to create a progress reporter.
At each iteration, print the reporter message followed by progress
percentage in the echo area. After the loop is finished,
-print the reporter message followed by word \"done\".
+print the reporter message followed by the word \"done\".
-\(fn (VAR LIST [RESULT]) MESSAGE BODY...)"
+\(fn (VAR LIST [RESULT]) REPORTER-OR-MESSAGE BODY...)"
(declare (indent 2) (debug ((symbolp form &optional form) form body)))
(let ((prep (make-symbol "--dolist-progress-reporter--"))
(count (make-symbol "--dolist-count--"))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 849631c: Fix last change,
Eli Zaretskii <=