]> git.eshelyaron.com Git - emacs.git/commitdiff
execute-extended-command: Skip waiting in more cases
authorDmitry Gutov <dgutov@yandex.ru>
Mon, 24 Dec 2018 02:36:08 +0000 (04:36 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Mon, 24 Dec 2018 02:36:36 +0000 (04:36 +0200)
* 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.

lisp/simple.el

index ab4960dc968552d154947c14f72dc40193ca5b5d..0281464c61fee5e02f00f1f82aaf920c158eedb5 100644 (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)