Mercurial > emacs
comparison src/minibuf.c @ 23448:84542af4b8d6
(Fdisplay_completion_list): Put on mouse-face properties.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 13 Oct 1998 21:10:10 +0000 |
parents | 1e29148859d4 |
children | c7a91c0586da |
comparison
equal
deleted
inserted
replaced
23447:7ccd43d053fd | 23448:84542af4b8d6 |
---|---|
105 /* If last completion attempt reported "Complete but not unique" | 105 /* If last completion attempt reported "Complete but not unique" |
106 then this is the string completed then; otherwise this is nil. */ | 106 then this is the string completed then; otherwise this is nil. */ |
107 | 107 |
108 static Lisp_Object last_exact_completion; | 108 static Lisp_Object last_exact_completion; |
109 | 109 |
110 Lisp_Object Quser_variable_p; | |
111 | |
112 Lisp_Object Qminibuffer_default; | |
113 | |
114 /* Non-nil means it is the window for C-M-v to scroll | 110 /* Non-nil means it is the window for C-M-v to scroll |
115 when the minibuffer is selected. */ | 111 when the minibuffer is selected. */ |
116 extern Lisp_Object Vminibuf_scroll_window; | 112 extern Lisp_Object Vminibuf_scroll_window; |
117 | 113 |
118 extern Lisp_Object Voverriding_local_map; | 114 extern Lisp_Object Voverriding_local_map; |
119 | 115 |
116 Lisp_Object Quser_variable_p; | |
117 | |
118 Lisp_Object Qminibuffer_default; | |
119 | |
120 Lisp_Object Qcurrent_input_method, Qactivate_input_method; | 120 Lisp_Object Qcurrent_input_method, Qactivate_input_method; |
121 | 121 |
122 extern Lisp_Object Qmouse_face; | |
122 | 123 |
123 /* Put minibuf on currently selected frame's minibuffer. | 124 /* Put minibuf on currently selected frame's minibuffer. |
124 We do this whenever the user starts a new minibuffer | 125 We do this whenever the user starts a new minibuffer |
125 or when a minibuffer exits. */ | 126 or when a minibuffer exits. */ |
126 | 127 |
1818 1, 1, 0, | 1819 1, 1, 0, |
1819 "Display the list of completions, COMPLETIONS, using `standard-output'.\n\ | 1820 "Display the list of completions, COMPLETIONS, using `standard-output'.\n\ |
1820 Each element may be just a symbol or string\n\ | 1821 Each element may be just a symbol or string\n\ |
1821 or may be a list of two strings to be printed as if concatenated.\n\ | 1822 or may be a list of two strings to be printed as if concatenated.\n\ |
1822 `standard-output' must be a buffer.\n\ | 1823 `standard-output' must be a buffer.\n\ |
1823 At the end, run the normal hook `completion-setup-hook'.\n\ | 1824 The actual completion alternatives, as inserted, are given `mouse-face'\n\ |
1825 properties of `highlight'.\n\ | |
1826 At the end, this runs the normal hook `completion-setup-hook'.\n\ | |
1824 It can find the completion buffer in `standard-output'.") | 1827 It can find the completion buffer in `standard-output'.") |
1825 (completions) | 1828 (completions) |
1826 Lisp_Object completions; | 1829 Lisp_Object completions; |
1827 { | 1830 { |
1828 Lisp_Object tail, elt; | 1831 Lisp_Object tail, elt; |
1926 && STRING_MULTIBYTE (string)) | 1929 && STRING_MULTIBYTE (string)) |
1927 string = Fstring_make_unibyte (string); | 1930 string = Fstring_make_unibyte (string); |
1928 else if (!NILP (current_buffer->enable_multibyte_characters) | 1931 else if (!NILP (current_buffer->enable_multibyte_characters) |
1929 && !STRING_MULTIBYTE (string)) | 1932 && !STRING_MULTIBYTE (string)) |
1930 string = Fstring_make_multibyte (string); | 1933 string = Fstring_make_multibyte (string); |
1931 Fprinc (string, Qnil); | 1934 |
1935 if (BUFFERP (Vstandard_output)) | |
1936 { | |
1937 int startpos = BUF_PT (XBUFFER (Vstandard_output)); | |
1938 int endpos; | |
1939 | |
1940 Fprinc (string, Qnil); | |
1941 | |
1942 endpos = BUF_PT (XBUFFER (Vstandard_output)); | |
1943 | |
1944 Fput_text_property (make_number (startpos), | |
1945 make_number (endpos), | |
1946 Qmouse_face, intern ("highlight"), | |
1947 Vstandard_output); | |
1948 } | |
1949 else | |
1950 { | |
1951 Fprinc (string, Qnil); | |
1952 } | |
1932 | 1953 |
1933 /* Output the annotation for this element. */ | 1954 /* Output the annotation for this element. */ |
1934 if (CONSP (elt)) | 1955 if (CONSP (elt)) |
1935 Fprinc (Fcar (Fcdr (elt)), Qnil); | 1956 Fprinc (Fcar (Fcdr (elt)), Qnil); |
1936 | 1957 |