Commit d6ae289c authored by Kim F. Storm's avatar Kim F. Storm
Browse files

(display_completion_list_1): New wrapper function

for Fdisplay_completion_list.
(Fminibuffer_completion_help): Use it.
parent d9cdfe9a
...@@ -2361,14 +2361,14 @@ alternative, the second serves as annotation. ...@@ -2361,14 +2361,14 @@ alternative, the second serves as annotation.
The actual completion alternatives, as inserted, are given `mouse-face' The actual completion alternatives, as inserted, are given `mouse-face'
properties of `highlight'. properties of `highlight'.
At the end, this runs the normal hook `completion-setup-hook'. At the end, this runs the normal hook `completion-setup-hook'.
It can find the completion buffer in `standard-output'. It can find the completion buffer in `standard-output'.
The optional second arg COMMON-SUBSTRING is a string. The optional second arg COMMON-SUBSTRING is a string.
It is used to put faces, `completions-first-difference` and It is used to put faces, `completions-first-difference` and
`completions-common-part' on the completion buffer. The `completions-common-part' on the completion buffer. The
`completions-common-part' face is put on the common substring `completions-common-part' face is put on the common substring
specified by COMMON-SUBSTRING. If COMMON-SUBSTRING is nil, specified by COMMON-SUBSTRING. If COMMON-SUBSTRING is nil,
the faces are not put. the faces are not put.
Internally, COMMON-SUBSTRING is bound to `completion-common-substring' Internally, COMMON-SUBSTRING is bound to `completion-common-substring'
during running `completion-setup-hook'. */) during running `completion-setup-hook'. */)
(completions, common_substring) (completions, common_substring)
Lisp_Object completions; Lisp_Object completions;
...@@ -2544,7 +2544,7 @@ during running `completion-setup-hook'. */) ...@@ -2544,7 +2544,7 @@ during running `completion-setup-hook'. */)
specbind (intern ("completion-common-substring"), common_substring); specbind (intern ("completion-common-substring"), common_substring);
call1 (Vrun_hooks, intern ("completion-setup-hook")); call1 (Vrun_hooks, intern ("completion-setup-hook"));
unbind_to (count1, Qnil); unbind_to (count1, Qnil);
} }
...@@ -2553,6 +2553,14 @@ during running `completion-setup-hook'. */) ...@@ -2553,6 +2553,14 @@ during running `completion-setup-hook'. */)
return Qnil; return Qnil;
} }
static Lisp_Object
display_completion_list_1 (list)
Lisp_Object list;
{
return Fdisplay_completion_list (list, Qnil);
}
DEFUN ("minibuffer-completion-help", Fminibuffer_completion_help, Sminibuffer_completion_help, DEFUN ("minibuffer-completion-help", Fminibuffer_completion_help, Sminibuffer_completion_help,
0, 0, "", 0, 0, "",
doc: /* Display a list of possible completions of the current minibuffer contents. */) doc: /* Display a list of possible completions of the current minibuffer contents. */)
...@@ -2574,7 +2582,7 @@ DEFUN ("minibuffer-completion-help", Fminibuffer_completion_help, Sminibuffer_co ...@@ -2574,7 +2582,7 @@ DEFUN ("minibuffer-completion-help", Fminibuffer_completion_help, Sminibuffer_co
} }
else else
internal_with_output_to_temp_buffer ("*Completions*", internal_with_output_to_temp_buffer ("*Completions*",
Fdisplay_completion_list, display_completion_list_1,
Fsort (completions, Qstring_lessp)); Fsort (completions, Qstring_lessp));
return Qnil; return Qnil;
} }
......
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