emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master cdec313: lisp/ido.el: Respect completion-auto-help setting


From: Dmitry Gutov
Subject: master cdec313: lisp/ido.el: Respect completion-auto-help setting
Date: Wed, 20 May 2020 19:22:35 -0400 (EDT)

branch: master
commit cdec3139b9125d2360223fcd1fb0fe1a52595cb7
Author: Ryan C. Thompson <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    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).
---
 lisp/ido.el | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/lisp/ido.el b/lisp/ido.el
index 8188340..15144f1 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
 even when there is only one unique completion."
   :type 'boolean)
 
-(defcustom ido-cannot-complete-command 'ido-completion-help
+(defcustom ido-cannot-complete-command 'ido-completion-auto-help
   "Command run when `ido-complete' can't complete any more.
 The most useful values are `ido-completion-help', which pops up a
-window with completion alternatives, or `ido-next-match' or
-`ido-prev-match', which cycle the buffer list."
+window with completion alternatives; `ido-completion-auto-help',
+which does the same but respects the value of
+`completion-auto-help'; or `ido-next-match' or `ido-prev-match',
+which cycle the buffer list."
   :type 'function)
 
 
@@ -3926,6 +3928,14 @@ If `ido-change-word-sub' cannot be found in WORD, return 
nil."
       (when (bobp)
        (next-completion 1)))))
 
+(defun ido-completion-auto-help ()
+  "Call `ido-completion-help' if `completion-auto-help' is non-nil."
+  (interactive)
+  ;; Note: `completion-auto-help' could also be `lazy', but this value
+  ;; is irrelevant to ido, which is fundamentally eager, so it is
+  ;; treated the same as t.
+  (when completion-auto-help
+    (ido-completion-help)))
 
 (defun ido-completion-help ()
   "Show possible completions in the `ido-completion-buffer'."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]