Mercurial > emacs
comparison src/minibuf.c @ 83389:732c5740ca8f
Merged from miles@gnu.org--gnu-2005 (patch 610-614)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-610
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-611
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-612
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-613
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-614
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-429
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Sun, 23 Oct 2005 22:47:29 +0000 |
parents | db4e74787e6f eef44f16f6c3 |
children | b31326248cf6 |
comparison
equal
deleted
inserted
replaced
83388:0cd72d94a6c7 | 83389:732c5740ca8f |
---|---|
2365 alternative, the second serves as annotation. | 2365 alternative, the second serves as annotation. |
2366 `standard-output' must be a buffer. | 2366 `standard-output' must be a buffer. |
2367 The actual completion alternatives, as inserted, are given `mouse-face' | 2367 The actual completion alternatives, as inserted, are given `mouse-face' |
2368 properties of `highlight'. | 2368 properties of `highlight'. |
2369 At the end, this runs the normal hook `completion-setup-hook'. | 2369 At the end, this runs the normal hook `completion-setup-hook'. |
2370 It can find the completion buffer in `standard-output'. | 2370 It can find the completion buffer in `standard-output'. |
2371 The optional second arg COMMON-SUBSTRING is a string. | 2371 The optional second arg COMMON-SUBSTRING is a string. |
2372 It is used to put faces, `completions-first-difference` and | 2372 It is used to put faces, `completions-first-difference` and |
2373 `completions-common-part' on the completion bufffer. The | 2373 `completions-common-part' on the completion buffer. The |
2374 `completions-common-part' face is put on the common substring | 2374 `completions-common-part' face is put on the common substring |
2375 specified by COMMON-SUBSTRING. If COMMON-SUBSTRING is nil, | 2375 specified by COMMON-SUBSTRING. If COMMON-SUBSTRING is nil, |
2376 the faces are not put. | 2376 the faces are not put. |
2377 Internally, COMMON-SUBSTRING is bound to `completion-common-substring' | 2377 Internally, COMMON-SUBSTRING is bound to `completion-common-substring' |
2378 during running `completion-setup-hook'. */) | 2378 during running `completion-setup-hook'. */) |
2379 (completions, common_substring) | 2379 (completions, common_substring) |
2380 Lisp_Object completions; | 2380 Lisp_Object completions; |
2381 Lisp_Object common_substring; | 2381 Lisp_Object common_substring; |
2382 { | 2382 { |
2548 { | 2548 { |
2549 int count1 = SPECPDL_INDEX (); | 2549 int count1 = SPECPDL_INDEX (); |
2550 | 2550 |
2551 specbind (intern ("completion-common-substring"), common_substring); | 2551 specbind (intern ("completion-common-substring"), common_substring); |
2552 call1 (Vrun_hooks, intern ("completion-setup-hook")); | 2552 call1 (Vrun_hooks, intern ("completion-setup-hook")); |
2553 | 2553 |
2554 unbind_to (count1, Qnil); | 2554 unbind_to (count1, Qnil); |
2555 } | 2555 } |
2556 | 2556 |
2557 UNGCPRO; | 2557 UNGCPRO; |
2558 | 2558 |
2559 return Qnil; | 2559 return Qnil; |
2560 } | |
2561 | |
2562 | |
2563 static Lisp_Object | |
2564 display_completion_list_1 (list) | |
2565 Lisp_Object list; | |
2566 { | |
2567 return Fdisplay_completion_list (list, Qnil); | |
2560 } | 2568 } |
2561 | 2569 |
2562 DEFUN ("minibuffer-completion-help", Fminibuffer_completion_help, Sminibuffer_completion_help, | 2570 DEFUN ("minibuffer-completion-help", Fminibuffer_completion_help, Sminibuffer_completion_help, |
2563 0, 0, "", | 2571 0, 0, "", |
2564 doc: /* Display a list of possible completions of the current minibuffer contents. */) | 2572 doc: /* Display a list of possible completions of the current minibuffer contents. */) |
2578 bitch_at_user (); | 2586 bitch_at_user (); |
2579 temp_echo_area_glyphs (build_string (" [No completions]")); | 2587 temp_echo_area_glyphs (build_string (" [No completions]")); |
2580 } | 2588 } |
2581 else | 2589 else |
2582 internal_with_output_to_temp_buffer ("*Completions*", | 2590 internal_with_output_to_temp_buffer ("*Completions*", |
2583 Fdisplay_completion_list, | 2591 display_completion_list_1, |
2584 Fsort (completions, Qstring_lessp)); | 2592 Fsort (completions, Qstring_lessp)); |
2585 return Qnil; | 2593 return Qnil; |
2586 } | 2594 } |
2587 | 2595 |
2588 DEFUN ("self-insert-and-exit", Fself_insert_and_exit, Sself_insert_and_exit, 0, 0, "", | 2596 DEFUN ("self-insert-and-exit", Fself_insert_and_exit, Sself_insert_and_exit, 0, 0, "", |