From: Dmitry Gutov Date: Mon, 24 Dec 2018 02:36:08 +0000 (+0200) Subject: execute-extended-command: Skip waiting in more cases X-Git-Tag: emacs-27.0.90~3925 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=48a28f8e389c33029ab4aa3d65445f42ed457e11;p=emacs.git 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. --- diff --git a/lisp/simple.el b/lisp/simple.el index ab4960dc968..0281464c61f 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -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)