comparison lispref/display.texi @ 59651:939528a9d14b

Add dotimes-with-progress-reporter.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 19 Jan 2005 23:47:35 +0000
parents 9ce057395159
children 39b4d09e8528 6d92d69fae33
comparison
equal deleted inserted replaced
59650:bc3232a12020 59651:939528a9d14b
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
8 @chapter Emacs Display 8 @chapter Emacs Display
9 9
630 You should always call this function and not hope for 630 You should always call this function and not hope for
631 @code{progress-reporter-update} to print ``100%.'' Firstly, it may 631 @code{progress-reporter-update} to print ``100%.'' Firstly, it may
632 never print it, there are many good reasons for this not to happen. 632 never print it, there are many good reasons for this not to happen.
633 Secondly, ``done'' is more explicit. 633 Secondly, ``done'' is more explicit.
634 @end defun 634 @end defun
635
636 @defmac dotimes-with-progress-reporter (var count [result]) message body...
637 This is a convenience macro that works the same way as @code{dotimes}
638 does, but also reports loop progress using the functions described
639 above. It allows you to save some typing.
640
641 You can rewrite the example in the beginning of this node using
642 this 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
635 651
636 @node Invisible Text 652 @node Invisible Text
637 @section Invisible Text 653 @section Invisible Text
638 654
639 @cindex invisible text 655 @cindex invisible text