diff options
| -rw-r--r-- | lisp/simple.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 849cbd6863a..fca739636c6 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -1634,6 +1634,11 @@ If the value is non-nil and not a number, we wait 2 seconds." | |||
| 1634 | (integer :tag "time" 2) | 1634 | (integer :tag "time" 2) |
| 1635 | (other :tag "on"))) | 1635 | (other :tag "on"))) |
| 1636 | 1636 | ||
| 1637 | (defcustom extended-command-suggest-shorter t | ||
| 1638 | "Non-nil means show a shorter M-x invocation when there is one." | ||
| 1639 | :group 'keyboard | ||
| 1640 | :type 'boolean) | ||
| 1641 | |||
| 1637 | (defun execute-extended-command--shorter-1 (name length) | 1642 | (defun execute-extended-command--shorter-1 (name length) |
| 1638 | (cond | 1643 | (cond |
| 1639 | ((zerop length) (list "")) | 1644 | ((zerop length) (list "")) |
| @@ -1716,7 +1721,8 @@ invoking, give a prefix argument to `execute-extended-command'." | |||
| 1716 | ((numberp suggest-key-bindings) suggest-key-bindings) | 1721 | ((numberp suggest-key-bindings) suggest-key-bindings) |
| 1717 | (t 2)))))) | 1722 | (t 2)))))) |
| 1718 | (when (and waited (not (consp unread-command-events))) | 1723 | (when (and waited (not (consp unread-command-events))) |
| 1719 | (unless (or binding executing-kbd-macro (not (symbolp function)) | 1724 | (unless (or (not extended-command-suggest-shorter) |
| 1725 | binding executing-kbd-macro (not (symbolp function)) | ||
| 1720 | (<= (length (symbol-name function)) 2)) | 1726 | (<= (length (symbol-name function)) 2)) |
| 1721 | ;; There's no binding for CMD. Let's try and find the shortest | 1727 | ;; There's no binding for CMD. Let's try and find the shortest |
| 1722 | ;; string to use in M-x. | 1728 | ;; string to use in M-x. |