aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2004-10-09 21:50:57 +0000
committerKim F. Storm2004-10-09 21:50:57 +0000
commitc85152fceba4bc9aca0423d7f0a88d185202e87c (patch)
tree69feca288611587c3e100411f01a9849d67ab2f2
parentc2b4a97bbbd0c3afbac295b6c95d7d7ac42a1ac2 (diff)
downloademacs-c85152fceba4bc9aca0423d7f0a88d185202e87c.tar.gz
emacs-c85152fceba4bc9aca0423d7f0a88d185202e87c.zip
(progress-reporter-update): Define before first usage.
(make-progress-reporter): Doc fix.
-rw-r--r--lisp/subr.el34
1 files changed, 17 insertions, 17 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 2abf953090a..17f8bc81ccc 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -2671,10 +2671,26 @@ The properties used on SYMBOL are `composefunc', `sendfunc',
2671;; digits of precision, it doesn't really matter here. On the other 2671;; digits of precision, it doesn't really matter here. On the other
2672;; hand, it greatly simplifies the code. 2672;; hand, it greatly simplifies the code.
2673 2673
2674(defsubst progress-reporter-update (reporter value)
2675 "Report progress of an operation in the echo area.
2676However, if the change since last echo area update is too small
2677or not enough time has passed, then do nothing (see
2678`make-progress-reporter' for details).
2679
2680First parameter, REPORTER, should be the result of a call to
2681`make-progress-reporter'. Second, VALUE, determines the actual
2682progress of operation; it must be between MIN-VALUE and MAX-VALUE
2683as passed to `make-progress-reporter'.
2684
2685This function is very inexpensive, you may not bother how often
2686you call it."
2687 (when (>= value (car reporter))
2688 (progress-reporter-do-update reporter value)))
2689
2674(defun make-progress-reporter (message min-value max-value 2690(defun make-progress-reporter (message min-value max-value
2675 &optional current-value 2691 &optional current-value
2676 min-change min-time) 2692 min-change min-time)
2677 "Return an object suitable for reporting operation progress with `progress-reporter-update'. 2693 "Return progress reporter object usage with `progress-reporter-update'.
2678 2694
2679MESSAGE is shown in the echo area. When at least 1% of operation 2695MESSAGE is shown in the echo area. When at least 1% of operation
2680is complete, the exact percentage will be appended to the 2696is complete, the exact percentage will be appended to the
@@ -2711,22 +2727,6 @@ then this parameter is effectively rounded up."
2711 (progress-reporter-update reporter (or current-value min-value)) 2727 (progress-reporter-update reporter (or current-value min-value))
2712 reporter)) 2728 reporter))
2713 2729
2714(defsubst progress-reporter-update (reporter value)
2715 "Report progress of an operation in the echo area.
2716However, if the change since last echo area update is too small
2717or not enough time has passed, then do nothing (see
2718`make-progress-reporter' for details).
2719
2720First parameter, REPORTER, should be the result of a call to
2721`make-progress-reporter'. Second, VALUE, determines the actual
2722progress of operation; it must be between MIN-VALUE and MAX-VALUE
2723as passed to `make-progress-reporter'.
2724
2725This function is very inexpensive, you may not bother how often
2726you call it."
2727 (when (>= value (car reporter))
2728 (progress-reporter-do-update reporter value)))
2729
2730(defun progress-reporter-force-update (reporter value &optional new-message) 2730(defun progress-reporter-force-update (reporter value &optional new-message)
2731 "Report progress of an operation in the echo area unconditionally. 2731 "Report progress of an operation in the echo area unconditionally.
2732 2732