summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorNoam Postavsky <npostavs@gmail.com>2019-05-25 19:44:41 -0400
committerNoam Postavsky <npostavs@gmail.com>2019-06-03 20:18:19 -0400
commitf81b812d75d33a7d24c8c0f46455bde9a7ee6840 (patch)
treed258d46ceca01aedb326fbbf9d593e7dd7ba4e7a /doc
parent2aae063055283ee64ecf339c812a1fe6d1cb106e (diff)
downloademacs-f81b812d75d33a7d24c8c0f46455bde9a7ee6840.tar.gz
Let untarring (and hence package installation) go faster (Bug#35909)
* lisp/subr.el (progress-reporter-update) (progress-reporter-force-update, progress-reporter-do-update): Accept new optional argument, SUFFIX. * doc/lispref/display.texi (Progress): Document it. * etc/NEWS: Announce it. * lisp/tar-mode.el (tar-untar-buffer): Use a progress reporter instead of calling message. Suppress message from write-region. Let-bind write-region-inhibit-fsync to t.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/display.texi11
1 files changed, 8 insertions, 3 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index a2ed4b38913..95985ea5750 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -426,7 +426,7 @@ This function calls @code{progress-reporter-update}, so the first
message is printed immediately.
@end defun
-@defun progress-reporter-update reporter &optional value
+@defun progress-reporter-update reporter &optional value suffix
This function does the main work of reporting progress of your
operation. It displays the message of @var{reporter}, followed by
progress percentage determined by @var{value}. If percentage is zero,
@@ -440,6 +440,11 @@ state of your operation and must be between @var{min-value} and
@code{make-progress-reporter}. For instance, if you scan a buffer,
then @var{value} should be the result of a call to @code{point}.
+Optional argument @var{suffix} is a string to be displayed after
+@var{reporter}'s main message and progress text. If @var{reporter} is
+a non-numerical reporter, then @var{value} should be @code{nil}, or a
+string to use instead of @var{suffix}.
+
This function respects @var{min-change} and @var{min-time} as passed
to @code{make-progress-reporter} and so does not output new messages
on every invocation. It is thus very fast and normally you should not
@@ -447,11 +452,11 @@ try to reduce the number of calls to it: resulting overhead will most
likely negate your effort.
@end defun
-@defun progress-reporter-force-update reporter &optional value new-message
+@defun progress-reporter-force-update reporter &optional value new-message suffix
This function is similar to @code{progress-reporter-update} except
that it prints a message in the echo area unconditionally.
-The first two arguments have the same meaning as for
+@var{reporter}, @var{value}, and @var{suffix} have the same meaning as for
@code{progress-reporter-update}. Optional @var{new-message} allows
you to change the message of the @var{reporter}. Since this function
always updates the echo area, such a change will be immediately