aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan C. Thompson2020-05-21 02:21:12 +0300
committerDmitry Gutov2020-05-21 02:22:26 +0300
commitcdec3139b9125d2360223fcd1fb0fe1a52595cb7 (patch)
tree1f67864fe535832ee88f36b2bda1e7e4ee10e117
parent0bfee4b18be9455e33899178fe4ccf2743ea179b (diff)
downloademacs-cdec3139b9125d2360223fcd1fb0fe1a52595cb7.tar.gz
emacs-cdec3139b9125d2360223fcd1fb0fe1a52595cb7.zip
lisp/ido.el: Respect completion-auto-help setting
This commit makes ido completion respect the user's setting for `completion-auto-help' by default. It does this by defining a wrapper function `ido-completion-auto-help', which calls `ido-completion-help' only when `completion-auto-help' is non-nil. * lisp/ido.el (ido-completion-auto-help): New function. (ido-cannot-complete-command): Use it as the new default (bug#41340).
-rw-r--r--lisp/ido.el16
1 files changed, 13 insertions, 3 deletions
diff --git a/lisp/ido.el b/lisp/ido.el
index 81883402add..15144f131ba 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -499,11 +499,13 @@ This means that \\[ido-complete] must always be followed by \\[ido-exit-minibuff
499even when there is only one unique completion." 499even when there is only one unique completion."
500 :type 'boolean) 500 :type 'boolean)
501 501
502(defcustom ido-cannot-complete-command 'ido-completion-help 502(defcustom ido-cannot-complete-command 'ido-completion-auto-help
503 "Command run when `ido-complete' can't complete any more. 503 "Command run when `ido-complete' can't complete any more.
504The most useful values are `ido-completion-help', which pops up a 504The most useful values are `ido-completion-help', which pops up a
505window with completion alternatives, or `ido-next-match' or 505window with completion alternatives; `ido-completion-auto-help',
506`ido-prev-match', which cycle the buffer list." 506which does the same but respects the value of
507`completion-auto-help'; or `ido-next-match' or `ido-prev-match',
508which cycle the buffer list."
507 :type 'function) 509 :type 'function)
508 510
509 511
@@ -3926,6 +3928,14 @@ If `ido-change-word-sub' cannot be found in WORD, return nil."
3926 (when (bobp) 3928 (when (bobp)
3927 (next-completion 1))))) 3929 (next-completion 1)))))
3928 3930
3931(defun ido-completion-auto-help ()
3932 "Call `ido-completion-help' if `completion-auto-help' is non-nil."
3933 (interactive)
3934 ;; Note: `completion-auto-help' could also be `lazy', but this value
3935 ;; is irrelevant to ido, which is fundamentally eager, so it is
3936 ;; treated the same as t.
3937 (when completion-auto-help
3938 (ido-completion-help)))
3929 3939
3930(defun ido-completion-help () 3940(defun ido-completion-help ()
3931 "Show possible completions in the `ido-completion-buffer'." 3941 "Show possible completions in the `ido-completion-buffer'."