1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

execute-extended-command: Skip waiting in more cases

* lisp/simple.el (execute-extended-command): Don't wait when
there's no binding the current command, and the user doesn't want
to see "shorter" suggestions, or TYPED is nil anyway.
This commit is contained in:
Dmitry Gutov 2018-12-24 04:36:08 +02:00
parent a0108f7871
commit 48a28f8e38

View file

@ -1839,9 +1839,11 @@ invoking, give a prefix argument to `execute-extended-command'."
;; If this command displayed something in the echo area;
;; wait a few seconds, then display our suggestion message.
;; FIXME: Wait *after* running post-command-hook!
;; FIXME: Don't wait if execute-extended-command--shorter won't
;; find a better answer anyway!
(when suggest-key-bindings
;; FIXME: If execute-extended-command--shorter were
;; faster, we could compute the result here first too.
(when (and suggest-key-bindings
(or binding
(and extended-command-suggest-shorter typed)))
(sit-for (cond
((zerop (length (current-message))) 0)
((numberp suggest-key-bindings) suggest-key-bindings)