[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 6f86ec8 7/9: Add a variable to control "shorter com
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master 6f86ec8 7/9: Add a variable to control "shorter command" suggestions |
Date: |
Sat, 30 Apr 2016 15:31:18 +0000 |
branch: master
commit 6f86ec8050c12b131b5a8d54a42fef04445f9482
Author: Ivan Shmakov <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Add a variable to control "shorter command" suggestions
* lisp/simple.el (extended-command-suggest-shorter): New variable
(bug#19152).
(execute-extended-command): Use it.
---
lisp/simple.el | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lisp/simple.el b/lisp/simple.el
index 849cbd6..fca7396 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."
(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 ""))
@@ -1716,7 +1721,8 @@ invoking, give a prefix argument to
`execute-extended-command'."
((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.
- [Emacs-diffs] master updated (bc00dcf -> 66379a7), Lars Ingebrigtsen, 2016/04/30
- [Emacs-diffs] master 2824c58 4/9: Doc fix for insert-pair-alist, Lars Ingebrigtsen, 2016/04/30
- [Emacs-diffs] master e77b8d8 3/9: Move doc of backup-directory-alist to the Backup node, Lars Ingebrigtsen, 2016/04/30
- [Emacs-diffs] master 619e0ae 6/9: Explictly explain that package-initialize loads the packages, Lars Ingebrigtsen, 2016/04/30
- [Emacs-diffs] master 3eca9a0 5/9: Have the doc strings of `load-path' and `require' mention each other, Lars Ingebrigtsen, 2016/04/30
- [Emacs-diffs] master c05716d 1/9: Fill the doc string of font-lock-keywords, Lars Ingebrigtsen, 2016/04/30
- [Emacs-diffs] master 6f86ec8 7/9: Add a variable to control "shorter command" suggestions,
Lars Ingebrigtsen <=
- [Emacs-diffs] master 12515d8 8/9: Document extended-command-suggest-shorter, Lars Ingebrigtsen, 2016/04/30
- [Emacs-diffs] master c05d186 2/9: Tiny doc clarification for create-fontset-from-fontset-spec, Lars Ingebrigtsen, 2016/04/30
- [Emacs-diffs] master 66379a7 9/9: (extended-command-suggest-shorter): Add a version string, Lars Ingebrigtsen, 2016/04/30