diff options
| author | Tino Calancha | 2018-06-17 18:28:34 +0900 |
|---|---|---|
| committer | Tino Calancha | 2018-06-17 18:28:34 +0900 |
| commit | edb1f85a27817a3fac38bb85752671414819203b (patch) | |
| tree | 8da1b7145ad7959199b2150c9337cd2f308bbb8c /doc | |
| parent | 5099b3abb2b623ce949b8efc37bee8c41d5ad754 (diff) | |
| download | emacs-edb1f85a27817a3fac38bb85752671414819203b.tar.gz emacs-edb1f85a27817a3fac38bb85752671414819203b.zip | |
Add new macro dolist-with-progress-reporter
* lisp/subr.el (dolist-with-progress-reporter): New macro (Bug#31697).
* lisp/cus-edit.el (custom-group-value-create): Use it.
* lisp/dabbrev.el (dabbrev--progress-reporter): Delete variable.
(dabbrev--find-expansion): Use dotimes-with-progress-reporter.
* doc/lispref/display.texi: Document the macro.
; * etc/NEWS: Announce it.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/display.texi | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 12c36bb08ff..feeb1caf197 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -497,6 +497,21 @@ For instance, you can write previous example as follows: | |||
| 497 | @end example | 497 | @end example |
| 498 | @end defmac | 498 | @end defmac |
| 499 | 499 | ||
| 500 | @defmac dolist-with-progress-reporter (var count [result]) reporter-or-message body@dots{} | ||
| 501 | This is another convenience macro that works the same way as @code{dolist} | ||
| 502 | does, but also reports loop progress using the functions described | ||
| 503 | above. As in @code{dotimes-with-progress-reporter}, @code{reporter-or-message} can be | ||
| 504 | a progress reporter or an string. | ||
| 505 | We can rewrite our previous example with this macro as follows: | ||
| 506 | |||
| 507 | @example | ||
| 508 | (dolist-with-progress-reporter | ||
| 509 | (k (number-sequence 0 500)) | ||
| 510 | "Collecting some mana for Emacs..." | ||
| 511 | (sit-for 0.01)) | ||
| 512 | @end example | ||
| 513 | @end defmac | ||
| 514 | |||
| 500 | @node Logging Messages | 515 | @node Logging Messages |
| 501 | @subsection Logging Messages in @file{*Messages*} | 516 | @subsection Logging Messages in @file{*Messages*} |
| 502 | @cindex logging echo-area messages | 517 | @cindex logging echo-area messages |