From 43f6eca04631515fe23cd311483cb4e13d65032d Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Sun, 28 Dec 2014 01:24:17 +0200 Subject: [PATCH] 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 b01988a06af..2c5a9c4a3cd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-27 Dmitry Gutov + + * simple.el (execute-extended-command): + When `suggest-key-bindings' is nil, don't. + 2014-12-27 Fabián Ezequiel Gallina 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)) -- 2.39.2