diff options
| author | Kim F. Storm | 2004-10-09 21:50:57 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2004-10-09 21:50:57 +0000 |
| commit | c85152fceba4bc9aca0423d7f0a88d185202e87c (patch) | |
| tree | 69feca288611587c3e100411f01a9849d67ab2f2 | |
| parent | c2b4a97bbbd0c3afbac295b6c95d7d7ac42a1ac2 (diff) | |
| download | emacs-c85152fceba4bc9aca0423d7f0a88d185202e87c.tar.gz emacs-c85152fceba4bc9aca0423d7f0a88d185202e87c.zip | |
(progress-reporter-update): Define before first usage.
(make-progress-reporter): Doc fix.
| -rw-r--r-- | lisp/subr.el | 34 |
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. | ||
| 2676 | However, if the change since last echo area update is too small | ||
| 2677 | or not enough time has passed, then do nothing (see | ||
| 2678 | `make-progress-reporter' for details). | ||
| 2679 | |||
| 2680 | First parameter, REPORTER, should be the result of a call to | ||
| 2681 | `make-progress-reporter'. Second, VALUE, determines the actual | ||
| 2682 | progress of operation; it must be between MIN-VALUE and MAX-VALUE | ||
| 2683 | as passed to `make-progress-reporter'. | ||
| 2684 | |||
| 2685 | This function is very inexpensive, you may not bother how often | ||
| 2686 | you 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 | ||
| 2679 | MESSAGE is shown in the echo area. When at least 1% of operation | 2695 | MESSAGE is shown in the echo area. When at least 1% of operation |
| 2680 | is complete, the exact percentage will be appended to the | 2696 | is 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. | ||
| 2716 | However, if the change since last echo area update is too small | ||
| 2717 | or not enough time has passed, then do nothing (see | ||
| 2718 | `make-progress-reporter' for details). | ||
| 2719 | |||
| 2720 | First parameter, REPORTER, should be the result of a call to | ||
| 2721 | `make-progress-reporter'. Second, VALUE, determines the actual | ||
| 2722 | progress of operation; it must be between MIN-VALUE and MAX-VALUE | ||
| 2723 | as passed to `make-progress-reporter'. | ||
| 2724 | |||
| 2725 | This function is very inexpensive, you may not bother how often | ||
| 2726 | you 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 | ||