aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Gutov2018-12-24 04:36:08 +0200
committerDmitry Gutov2018-12-24 04:36:36 +0200
commit48a28f8e389c33029ab4aa3d65445f42ed457e11 (patch)
treed3fa35d62d15334d0b3450e2818fd38b0df74c56
parenta0108f78710c960e54347c9071d6c35a262daebe (diff)
downloademacs-48a28f8e389c33029ab4aa3d65445f42ed457e11.tar.gz
emacs-48a28f8e389c33029ab4aa3d65445f42ed457e11.zip
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.
-rw-r--r--lisp/simple.el8
1 files changed, 5 insertions, 3 deletions
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'."
1839 ;; If this command displayed something in the echo area; 1839 ;; If this command displayed something in the echo area;
1840 ;; wait a few seconds, then display our suggestion message. 1840 ;; wait a few seconds, then display our suggestion message.
1841 ;; FIXME: Wait *after* running post-command-hook! 1841 ;; FIXME: Wait *after* running post-command-hook!
1842 ;; FIXME: Don't wait if execute-extended-command--shorter won't 1842 ;; FIXME: If execute-extended-command--shorter were
1843 ;; find a better answer anyway! 1843 ;; faster, we could compute the result here first too.
1844 (when suggest-key-bindings 1844 (when (and suggest-key-bindings
1845 (or binding
1846 (and extended-command-suggest-shorter typed)))
1845 (sit-for (cond 1847 (sit-for (cond
1846 ((zerop (length (current-message))) 0) 1848 ((zerop (length (current-message))) 0)
1847 ((numberp suggest-key-bindings) suggest-key-bindings) 1849 ((numberp suggest-key-bindings) suggest-key-bindings)