aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2005-01-19 23:47:35 +0000
committerStefan Monnier2005-01-19 23:47:35 +0000
commitf0d3d9feb068b5bff633efaf355c31706caaa94f (patch)
tree18751e91ef37b123411efe3245da09a6dc902f74
parent7c018923b03fb5907df95a72336ca535f1f6b4e0 (diff)
downloademacs-f0d3d9feb068b5bff633efaf355c31706caaa94f.tar.gz
emacs-f0d3d9feb068b5bff633efaf355c31706caaa94f.zip
Add dotimes-with-progress-reporter.
-rw-r--r--etc/NEWS6
-rw-r--r--lispref/display.texi20
2 files changed, 21 insertions, 5 deletions
diff --git a/etc/NEWS b/etc/NEWS
index bdbc8cc7a81..753855b46e3 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2512,9 +2512,9 @@ back the match can start; this is a way to keep it from taking too long.
2512 2512
2513+++ 2513+++
2514** New functions `make-progress-reporter', `progress-reporter-update', 2514** New functions `make-progress-reporter', `progress-reporter-update',
2515`progress-reporter-force-update' and `progress-reporter-done' provide 2515`progress-reporter-force-update', `progress-reporter-done', and
2516a simple and efficient way for a command to present progress messages 2516`dotimes-with-progress-reporter' provide a simple and efficient way for
2517for the user. 2517a command to present progress messages for the user.
2518 2518
2519--- 2519---
2520** To manipulate the File menu using easy-menu, you must specify the 2520** To manipulate the File menu using easy-menu, you must specify the
diff --git a/lispref/display.texi b/lispref/display.texi
index 375db424122..f24432615e4 100644
--- a/lispref/display.texi
+++ b/lispref/display.texi
@@ -1,7 +1,7 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002 3@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001,
4@c Free Software Foundation, Inc. 4@c 2002, 2005 Free Software Foundation, Inc.
5@c See the file elisp.texi for copying conditions. 5@c See the file elisp.texi for copying conditions.
6@setfilename ../info/display 6@setfilename ../info/display
7@node Display, Calendar, Processes, Top 7@node Display, Calendar, Processes, Top
@@ -633,6 +633,22 @@ never print it, there are many good reasons for this not to happen.
633Secondly, ``done'' is more explicit. 633Secondly, ``done'' is more explicit.
634@end defun 634@end defun
635 635
636@defmac dotimes-with-progress-reporter (var count [result]) message body...
637This is a convenience macro that works the same way as @code{dotimes}
638does, but also reports loop progress using the functions described
639above. It allows you to save some typing.
640
641You can rewrite the example in the beginning of this node using
642this macro this way:
643
644@example
645(dotimes-with-progress-reporter
646 (k 500)
647 "Collecting some mana for Emacs..."
648 (sit-for 0.01))
649@end example
650@end defmac
651
636@node Invisible Text 652@node Invisible Text
637@section Invisible Text 653@section Invisible Text
638 654