diff options
| author | Dmitry Gutov | 2014-12-28 01:24:17 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2014-12-28 01:24:17 +0200 |
| commit | 43f6eca04631515fe23cd311483cb4e13d65032d (patch) | |
| tree | 9abcad9f88c71b7169b77767e58af30bb4160566 | |
| parent | 7d1e62d51b51be27b11a67d7828b77f2df9e1eb1 (diff) | |
| download | emacs-43f6eca04631515fe23cd311483cb4e13d65032d.tar.gz emacs-43f6eca04631515fe23cd311483cb4e13d65032d.zip | |
Handle nil value of suggest-key-bindings
* lisp/simple.el (execute-extended-command):
When `suggest-key-bindings' is nil, don't.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | 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 @@ | |||
| 1 | 2014-12-27 Dmitry Gutov <dgutov@yandex.ru> | ||
| 2 | |||
| 3 | * simple.el (execute-extended-command): | ||
| 4 | When `suggest-key-bindings' is nil, don't. | ||
| 5 | |||
| 1 | 2014-12-27 Fabián Ezequiel Gallina <fgallina@gnu.org> | 6 | 2014-12-27 Fabián Ezequiel Gallina <fgallina@gnu.org> |
| 2 | 7 | ||
| 3 | python.el: Enhance shell user interaction and deprecate | 8 | 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'." | |||
| 1667 | (let ((prefix-arg prefixarg)) | 1667 | (let ((prefix-arg prefixarg)) |
| 1668 | (command-execute function 'record)) | 1668 | (command-execute function 'record)) |
| 1669 | ;; If enabled, show which key runs this command. | 1669 | ;; If enabled, show which key runs this command. |
| 1670 | ;; (when binding | ||
| 1671 | ;; But first wait, and skip the message if there is input. | 1670 | ;; But first wait, and skip the message if there is input. |
| 1672 | (let* ((waited | 1671 | (let* ((waited |
| 1673 | ;; If this command displayed something in the echo area; | 1672 | ;; If this command displayed something in the echo area; |
| @@ -1675,10 +1674,11 @@ invoking, give a prefix argument to `execute-extended-command'." | |||
| 1675 | ;; FIXME: Wait *after* running post-command-hook! | 1674 | ;; FIXME: Wait *after* running post-command-hook! |
| 1676 | ;; FIXME: Don't wait if execute-extended-command--shorter won't | 1675 | ;; FIXME: Don't wait if execute-extended-command--shorter won't |
| 1677 | ;; find a better answer anyway! | 1676 | ;; find a better answer anyway! |
| 1678 | (sit-for (cond | 1677 | (when suggest-key-bindings |
| 1679 | ((zerop (length (current-message))) 0) | 1678 | (sit-for (cond |
| 1680 | ((numberp suggest-key-bindings) suggest-key-bindings) | 1679 | ((zerop (length (current-message))) 0) |
| 1681 | (t 2))))) | 1680 | ((numberp suggest-key-bindings) suggest-key-bindings) |
| 1681 | (t 2)))))) | ||
| 1682 | (when (and waited (not (consp unread-command-events))) | 1682 | (when (and waited (not (consp unread-command-events))) |
| 1683 | (unless (or binding executing-kbd-macro (not (symbolp function)) | 1683 | (unless (or binding executing-kbd-macro (not (symbolp function)) |
| 1684 | (<= (length (symbol-name function)) 2)) | 1684 | (<= (length (symbol-name function)) 2)) |