(integer :tag "time" 2)
(other :tag "on")))
+(defcustom extended-command-suggest-shorter t
+ "Non-nil means show a shorter M-x invocation when there is one."
+ :group 'keyboard
+ :type 'boolean)
+
(defun execute-extended-command--shorter-1 (name length)
(cond
((zerop length) (list ""))
((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))
+ (unless (or (not extended-command-suggest-shorter)
+ binding executing-kbd-macro (not (symbolp function))
(<= (length (symbol-name function)) 2))
;; There's no binding for CMD. Let's try and find the shortest
;; string to use in M-x.