aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorTino Calancha2018-06-17 18:28:34 +0900
committerTino Calancha2018-06-17 18:28:34 +0900
commit5099b3abb2b623ce949b8efc37bee8c41d5ad754 (patch)
treeb596f9ed994b5ffab0be9eddf8154dd3912489af /doc
parent39ccbacf9c42b2fed08c47ed7314e4c067de21b9 (diff)
downloademacs-5099b3abb2b623ce949b8efc37bee8c41d5ad754.tar.gz
emacs-5099b3abb2b623ce949b8efc37bee8c41d5ad754.zip
dotimes-with-progress-reporter: Polymorphic 2nd argument
* lisp/subr.el (dotimes-with-progress-reporter): Allow 2nd arg to be a string or a progress reporter (Bug#31696). * doc/lispref/display.texi (node Progress): Update manual.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/display.texi14
1 files changed, 13 insertions, 1 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 0ba7f0fd586..12c36bb08ff 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -469,7 +469,7 @@ never print it, there are many good reasons for this not to happen.
469Secondly, @samp{done} is more explicit. 469Secondly, @samp{done} is more explicit.
470@end defun 470@end defun
471 471
472@defmac dotimes-with-progress-reporter (var count [result]) message body@dots{} 472@defmac dotimes-with-progress-reporter (var count [result]) reporter-or-message body@dots{}
473This is a convenience macro that works the same way as @code{dotimes} 473This is a convenience macro that works the same way as @code{dotimes}
474does, but also reports loop progress using the functions described 474does, but also reports loop progress using the functions described
475above. It allows you to save some typing. 475above. It allows you to save some typing.
@@ -483,6 +483,18 @@ this macro this way:
483 "Collecting some mana for Emacs..." 483 "Collecting some mana for Emacs..."
484 (sit-for 0.01)) 484 (sit-for 0.01))
485@end example 485@end example
486
487
488The second argument @code{reporter-or-message} might be a progress
489reporter object. This is useful if you want to specify the optional
490arguments in @code{make-progress-reporter}.
491For instance, you can write previous example as follows:
492@example
493(dotimes-with-progress-reporter
494 (k 500)
495 (make-progress-reporter "Collecting some mana for Emacs..." 0 500 0 1 1.5)
496 (sit-for 0.01))
497@end example
486@end defmac 498@end defmac
487 499
488@node Logging Messages 500@node Logging Messages