[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] [emacs] 01/01: * lisp/simple.el (execute-extended-command-
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] [emacs] 01/01: * lisp/simple.el (execute-extended-command--shorter): Cut search here. (execute-extended-command): Instead of here. |
Date: |
Sun, 16 Nov 2014 22:25:04 +0000 |
monnier pushed a commit to branch master
in repository emacs.
commit c94988f4b740738cbc4660ee9c64637e55ad5d76
Author: Stefan Monnier <address@hidden>
Date: Sun Nov 16 17:24:55 2014 -0500
* lisp/simple.el (execute-extended-command--shorter): Cut search here.
(execute-extended-command): Instead of here.
---
lisp/ChangeLog | 13 +++++++++----
lisp/simple.el | 12 ++++--------
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 984f4ce..0a73c57 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2014-11-16 Stefan Monnier <address@hidden>
+
+ * simple.el (execute-extended-command--shorter): Cut search here.
+ (execute-extended-command): Instead of here.
+
2014-11-16 Fabián Ezequiel Gallina <address@hidden>
* progmodes/python.el (python-mode): Avoid use of set-local to
@@ -15,8 +20,8 @@
2014-11-16 Ulf Jasper <address@hidden>
- * calendar/icalendar.el (icalendar--convert-tz-offset): Return
- complete cons when offsets of standard time and daylight saving
+ * calendar/icalendar.el (icalendar--convert-tz-offset):
+ Return complete cons when offsets of standard time and daylight saving
time are equal.
(icalendar-export-region): Fix unbound variable warning.
@@ -27,8 +32,8 @@
2014-11-16 Fabián Ezequiel Gallina <address@hidden>
- * progmodes/python.el (python-shell-calculate-command): Rename
- from python-shell-parse-command. Cleanup.
+ * progmodes/python.el (python-shell-calculate-command):
+ Rename from python-shell-parse-command. Cleanup.
(run-python, run-python-internal): Use it.
(python-shell-calculate-pythonpath): Rename from
python-new-pythonpath.
diff --git a/lisp/simple.el b/lisp/simple.el
index 9665cd5..031970e 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1621,7 +1621,9 @@ If the value is non-nil and not a number, we wait 2
seconds."
(setq len (1+ len))
(setq candidates (execute-extended-command--shorter-1
name len)))
- (< len max)))
+ ;; Don't show the help message if the binding isn't
+ ;; significantly shorter than the M-x command the user typed.
+ (< len (- max 5))))
(let ((candidate (pop candidates)))
(when (equal name
(car-safe (completion-try-completion
@@ -1686,13 +1688,7 @@ invoking, give a prefix argument to
`execute-extended-command'."
(while-no-input
(setq binding (execute-extended-command--shorter
(symbol-name function) typed))))
- (when (and binding
- (or (not (stringp binding))
- (> (- (length (symbol-name function)) (length binding))
- ;; Don't show the help message if the
- ;; binding isn't significantly shorter than
- ;; the M-x command the user typed.
- 5)))
+ (when binding
(with-temp-message
(format "You can run the command `%s' with %s"
function