# HG changeset patch # User Kim F. Storm # Date 1097358657 0 # Node ID 601c087f45f660adf4357a4444964004cd5d0b82 # Parent 47b51cd0be444553928b724e96010f7e2af6e4b0 (progress-reporter-update): Define before first usage. (make-progress-reporter): Doc fix. diff -r 47b51cd0be44 -r 601c087f45f6 lisp/subr.el --- a/lisp/subr.el Sat Oct 09 21:50:38 2004 +0000 +++ b/lisp/subr.el Sat Oct 09 21:50:57 2004 +0000 @@ -2671,10 +2671,26 @@ ;; digits of precision, it doesn't really matter here. On the other ;; hand, it greatly simplifies the code. +(defsubst progress-reporter-update (reporter value) + "Report progress of an operation in the echo area. +However, if the change since last echo area update is too small +or not enough time has passed, then do nothing (see +`make-progress-reporter' for details). + +First parameter, REPORTER, should be the result of a call to +`make-progress-reporter'. Second, VALUE, determines the actual +progress of operation; it must be between MIN-VALUE and MAX-VALUE +as passed to `make-progress-reporter'. + +This function is very inexpensive, you may not bother how often +you call it." + (when (>= value (car reporter)) + (progress-reporter-do-update reporter value))) + (defun make-progress-reporter (message min-value max-value &optional current-value min-change min-time) - "Return an object suitable for reporting operation progress with `progress-reporter-update'. + "Return progress reporter object usage with `progress-reporter-update'. MESSAGE is shown in the echo area. When at least 1% of operation is complete, the exact percentage will be appended to the @@ -2711,22 +2727,6 @@ (progress-reporter-update reporter (or current-value min-value)) reporter)) -(defsubst progress-reporter-update (reporter value) - "Report progress of an operation in the echo area. -However, if the change since last echo area update is too small -or not enough time has passed, then do nothing (see -`make-progress-reporter' for details). - -First parameter, REPORTER, should be the result of a call to -`make-progress-reporter'. Second, VALUE, determines the actual -progress of operation; it must be between MIN-VALUE and MAX-VALUE -as passed to `make-progress-reporter'. - -This function is very inexpensive, you may not bother how often -you call it." - (when (>= value (car reporter)) - (progress-reporter-do-update reporter value))) - (defun progress-reporter-force-update (reporter value &optional new-message) "Report progress of an operation in the echo area unconditionally.