comparison src/minibuf.c @ 50538:98fb19f9d8d3

(temp_echo_area_glyphs): Change the arg to Lisp string. Callers changed.
author Kenichi Handa <handa@m17n.org>
date Fri, 11 Apr 2003 02:06:15 +0000
parents 2123804d2bca
children e7e3f38afa3e
comparison
equal deleted inserted replaced
50537:4eb84208a499 50538:98fb19f9d8d3
1717 GCPRO2 (completion, last); 1717 GCPRO2 (completion, last);
1718 1718
1719 if (NILP (completion)) 1719 if (NILP (completion))
1720 { 1720 {
1721 bitch_at_user (); 1721 bitch_at_user ();
1722 temp_echo_area_glyphs (" [No match]"); 1722 temp_echo_area_glyphs (build_string (" [No match]"));
1723 UNGCPRO; 1723 UNGCPRO;
1724 return 0; 1724 return 0;
1725 } 1725 }
1726 1726
1727 if (EQ (completion, Qt)) /* exact and unique match */ 1727 if (EQ (completion, Qt)) /* exact and unique match */
1781 if (completedp) 1781 if (completedp)
1782 return 5; 1782 return 5;
1783 else if (!NILP (Vcompletion_auto_help)) 1783 else if (!NILP (Vcompletion_auto_help))
1784 Fminibuffer_completion_help (); 1784 Fminibuffer_completion_help ();
1785 else 1785 else
1786 temp_echo_area_glyphs (" [Next char not unique]"); 1786 temp_echo_area_glyphs (build_string (" [Next char not unique]"));
1787 return 6; 1787 return 6;
1788 } 1788 }
1789 else if (completedp) 1789 else if (completedp)
1790 { 1790 {
1791 UNGCPRO; 1791 UNGCPRO;
1880 return Qnil; 1880 return Qnil;
1881 1881
1882 case 1: 1882 case 1:
1883 if (PT != ZV) 1883 if (PT != ZV)
1884 Fgoto_char (make_number (ZV)); 1884 Fgoto_char (make_number (ZV));
1885 temp_echo_area_glyphs (" [Sole completion]"); 1885 temp_echo_area_glyphs (build_string (" [Sole completion]"));
1886 break; 1886 break;
1887 1887
1888 case 3: 1888 case 3:
1889 if (PT != ZV) 1889 if (PT != ZV)
1890 Fgoto_char (make_number (ZV)); 1890 Fgoto_char (make_number (ZV));
1891 temp_echo_area_glyphs (" [Complete, but not unique]"); 1891 temp_echo_area_glyphs (build_string (" [Complete, but not unique]"));
1892 break; 1892 break;
1893 } 1893 }
1894 1894
1895 return Qt; 1895 return Qt;
1896 } 1896 }
1947 goto exit; 1947 goto exit;
1948 1948
1949 case 4: 1949 case 4:
1950 if (!NILP (Vminibuffer_completion_confirm)) 1950 if (!NILP (Vminibuffer_completion_confirm))
1951 { 1951 {
1952 temp_echo_area_glyphs (" [Confirm]"); 1952 temp_echo_area_glyphs (build_string (" [Confirm]"));
1953 return Qnil; 1953 return Qnil;
1954 } 1954 }
1955 else 1955 else
1956 goto exit; 1956 goto exit;
1957 1957
1984 Vminibuffer_completion_table, 1984 Vminibuffer_completion_table,
1985 Vminibuffer_completion_predicate); 1985 Vminibuffer_completion_predicate);
1986 if (NILP (completion)) 1986 if (NILP (completion))
1987 { 1987 {
1988 bitch_at_user (); 1988 bitch_at_user ();
1989 temp_echo_area_glyphs (" [No match]"); 1989 temp_echo_area_glyphs (build_string (" [No match]"));
1990 return Qnil; 1990 return Qnil;
1991 } 1991 }
1992 if (EQ (completion, Qt)) 1992 if (EQ (completion, Qt))
1993 return Qnil; 1993 return Qnil;
1994 1994
2342 clear_message (1, 0); 2342 clear_message (1, 0);
2343 2343
2344 if (NILP (completions)) 2344 if (NILP (completions))
2345 { 2345 {
2346 bitch_at_user (); 2346 bitch_at_user ();
2347 temp_echo_area_glyphs (" [No completions]"); 2347 temp_echo_area_glyphs (build_string (" [No completions]"));
2348 } 2348 }
2349 else 2349 else
2350 internal_with_output_to_temp_buffer ("*Completions*", 2350 internal_with_output_to_temp_buffer ("*Completions*",
2351 Fdisplay_completion_list, 2351 Fdisplay_completion_list,
2352 Fsort (completions, Qstring_lessp)); 2352 Fsort (completions, Qstring_lessp));
2386 { 2386 {
2387 return Fcopy_sequence (minibuf_prompt); 2387 return Fcopy_sequence (minibuf_prompt);
2388 } 2388 }
2389 2389
2390 2390
2391 /* Temporarily display the string M at the end of the current 2391 /* Temporarily display STRING at the end of the current
2392 minibuffer contents. This is used to display things like 2392 minibuffer contents. This is used to display things like
2393 "[No Match]" when the user requests a completion for a prefix 2393 "[No Match]" when the user requests a completion for a prefix
2394 that has no possible completions, and other quick, unobtrusive 2394 that has no possible completions, and other quick, unobtrusive
2395 messages. */ 2395 messages. */
2396 2396
2397 void 2397 void
2398 temp_echo_area_glyphs (m) 2398 temp_echo_area_glyphs (string)
2399 const char *m; 2399 Lisp_Object string;
2400 { 2400 {
2401 int osize = ZV; 2401 int osize = ZV;
2402 int osize_byte = ZV_BYTE; 2402 int osize_byte = ZV_BYTE;
2403 int opoint = PT; 2403 int opoint = PT;
2404 int opoint_byte = PT_BYTE; 2404 int opoint_byte = PT_BYTE;
2407 2407
2408 /* Clear out any old echo-area message to make way for our new thing. */ 2408 /* Clear out any old echo-area message to make way for our new thing. */
2409 message (0); 2409 message (0);
2410 2410
2411 SET_PT_BOTH (osize, osize_byte); 2411 SET_PT_BOTH (osize, osize_byte);
2412 insert_string (m); 2412 insert_from_string (string, 0, 0, SCHARS (string), SBYTES (string), 0);
2413 SET_PT_BOTH (opoint, opoint_byte); 2413 SET_PT_BOTH (opoint, opoint_byte);
2414 Vinhibit_quit = Qt; 2414 Vinhibit_quit = Qt;
2415 Fsit_for (make_number (2), Qnil, Qnil); 2415 Fsit_for (make_number (2), Qnil, Qnil);
2416 del_range_both (osize, osize_byte, ZV, ZV_BYTE, 1); 2416 del_range_both (osize, osize_byte, ZV, ZV_BYTE, 1);
2417 SET_PT_BOTH (opoint, opoint_byte); 2417 SET_PT_BOTH (opoint, opoint_byte);
2430 or until the next input event arrives, whichever comes first. */) 2430 or until the next input event arrives, whichever comes first. */)
2431 (string) 2431 (string)
2432 Lisp_Object string; 2432 Lisp_Object string;
2433 { 2433 {
2434 CHECK_STRING (string); 2434 CHECK_STRING (string);
2435 temp_echo_area_glyphs (SDATA (string)); 2435 temp_echo_area_glyphs (string);
2436 return Qnil; 2436 return Qnil;
2437 } 2437 }
2438 2438
2439 void 2439 void
2440 init_minibuf_once () 2440 init_minibuf_once ()