mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Change the with-delayed-message syntax to allow future extensibility
* doc/lispref/display.texi (Progress): Document it. * lisp/subr.el (with-delayed-message): Change the syntax to allow future extensibility. * lisp/net/eww.el (eww-display-html): Use it.
This commit is contained in:
parent
8c73e6b0f9
commit
9ce0008edd
3 changed files with 9 additions and 7 deletions
10
lisp/subr.el
10
lisp/subr.el
|
|
@ -6723,12 +6723,14 @@ as the variable documentation string.
|
|||
(define-keymap--define (list ,@(nreverse opts) ,@defs))
|
||||
,@(and doc (list doc)))))
|
||||
|
||||
(defmacro with-delayed-message (timeout message &rest body)
|
||||
(defmacro with-delayed-message (args &rest body)
|
||||
"Like `progn', but display MESSAGE if BODY takes longer than TIMEOUT seconds.
|
||||
The MESSAGE form will be evaluated immediately, but the resulting
|
||||
string will be displayed only if BODY takes longer than TIMEOUT seconds."
|
||||
(declare (indent 2))
|
||||
`(funcall-with-delayed-message ,timeout ,message
|
||||
string will be displayed only if BODY takes longer than TIMEOUT seconds.
|
||||
|
||||
\(fn (timeout message) &rest body)"
|
||||
(declare (indent 1))
|
||||
`(funcall-with-delayed-message ,(car args) ,(cadr args)
|
||||
(lambda ()
|
||||
,@body)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue