]> git.eshelyaron.com Git - emacs.git/commitdiff
Handle nil value of suggest-key-bindings
authorDmitry Gutov <dgutov@yandex.ru>
Sat, 27 Dec 2014 23:24:17 +0000 (01:24 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Sat, 27 Dec 2014 23:24:17 +0000 (01:24 +0200)
* lisp/simple.el (execute-extended-command):
When `suggest-key-bindings' is nil, don't.

lisp/ChangeLog
lisp/simple.el

index b01988a06af6a3099e2f2308e117063c9581d33e..2c5a9c4a3cdbd403536073d0ab5725b42c1b193f 100644 (file)
@@ -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
index 0fcd5db45d99f29f1eae192fda9b3fa6609bd606..b436dd7699f231447755a343c01cb0682e8f6bc7 100644 (file)
@@ -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))