summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/simple.el10
2 files changed, 10 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b01988a06af..2c5a9c4a3cd 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-27 Dmitry Gutov <dgutov@yandex.ru>
+
+ * simple.el (execute-extended-command):
+ When `suggest-key-bindings' is nil, don't.
+
2014-12-27 Fabián Ezequiel Gallina <fgallina@gnu.org>
python.el: Enhance shell user interaction and deprecate
diff --git a/lisp/simple.el b/lisp/simple.el
index 0fcd5db45d9..b436dd7699f 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1667,7 +1667,6 @@ invoking, give a prefix argument to `execute-extended-command'."
(let ((prefix-arg prefixarg))
(command-execute function 'record))
;; If enabled, show which key runs this command.
- ;; (when binding
;; But first wait, and skip the message if there is input.
(let* ((waited
;; If this command displayed something in the echo area;
@@ -1675,10 +1674,11 @@ invoking, give a prefix argument to `execute-extended-command'."
;; FIXME: Wait *after* running post-command-hook!
;; FIXME: Don't wait if execute-extended-command--shorter won't
;; find a better answer anyway!
- (sit-for (cond
- ((zerop (length (current-message))) 0)
- ((numberp suggest-key-bindings) suggest-key-bindings)
- (t 2)))))
+ (when suggest-key-bindings
+ (sit-for (cond
+ ((zerop (length (current-message))) 0)
+ ((numberp suggest-key-bindings) suggest-key-bindings)
+ (t 2))))))
(when (and waited (not (consp unread-command-events)))
(unless (or binding executing-kbd-macro (not (symbolp function))
(<= (length (symbol-name function)) 2))