emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 43f6eca: Handle nil value of suggest-key-bindings


From: Dmitry Gutov
Subject: [Emacs-diffs] master 43f6eca: Handle nil value of suggest-key-bindings
Date: Sat, 27 Dec 2014 23:24:55 +0000

branch: master
commit 43f6eca04631515fe23cd311483cb4e13d65032d
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Handle nil value of suggest-key-bindings
    
    * lisp/simple.el (execute-extended-command):
    When `suggest-key-bindings' is nil, don't.
---
 lisp/ChangeLog |    5 +++++
 lisp/simple.el |   10 +++++-----
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b01988a..2c5a9c4 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-27  Dmitry Gutov  <address@hidden>
+
+       * simple.el (execute-extended-command):
+       When `suggest-key-bindings' is nil, don't.
+
 2014-12-27  Fabián Ezequiel Gallina  <address@hidden>
 
        python.el: Enhance shell user interaction and deprecate
diff --git a/lisp/simple.el b/lisp/simple.el
index 0fcd5db..b436dd7 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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]