Commit 71649242 authored by Lars Magne Ingebrigtsen's avatar Lars Magne Ingebrigtsen
Browse files

Only show the "You can run" message if it's significantly shorter

* simple.el (execute-extended-command): Don't show the help
message if the binding isn't significantly shorter than the
M-x command the user typed (bug#19013).
parent 7261b4d9
2014-11-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
* simple.el (execute-extended-command): Don't show the help
message if the binding isn't significantly shorter than the
M-x command the user typed (bug#19013).
2014-11-16 Ulf Jasper <ulf.jasper@web.de>
* calendar/icalendar.el (icalendar--convert-tz-offset): Return
......
......@@ -1686,7 +1686,13 @@ invoking, give a prefix argument to `execute-extended-command'."
(while-no-input
(setq binding (execute-extended-command--shorter
(symbol-name function) typed))))
(when binding
(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)))
(with-temp-message
(format "You can run the command `%s' with %s"
function
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment