diff options
| author | Karl Heuer <kwzh@gnu.org> | 1994-03-15 06:49:39 +0000 |
|---|---|---|
| committer | Karl Heuer <kwzh@gnu.org> | 1994-03-15 06:49:39 +0000 |
| commit | 48ae5f0a1d4daebf66a46521f3fa567a92a88251 (patch) | |
| tree | 6062328d89d930779d8e5c6595195d29679a1022 /src | |
| parent | c26cf6c836766a260786923712d151ec3b4cc0ae (diff) | |
| download | emacs-48ae5f0a1d4daebf66a46521f3fa567a92a88251.tar.gz | |
(message1): Call message2 instead of duplicating code.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 61 |
1 files changed, 10 insertions, 51 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index f9cadc18c9d..2bfe02d956b 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -189,58 +189,10 @@ int line_number_displayed; /* Maximum buffer size for which to display line numbers. */ int line_number_display_limit; -/* Specify m, a string, as a message in the minibuf. If m is 0, clear out - any existing message, and let the minibuffer text show through. */ - -void -message1 (m) - char *m; -{ - if (noninteractive) - { - if (noninteractive_need_newline) - putc ('\n', stderr); - noninteractive_need_newline = 0; - if (cursor_in_echo_area != 0) - fprintf (stderr, "%s", m); - else - fprintf (stderr, "%s\n", m); - fflush (stderr); - } - /* A null message buffer means that the frame hasn't really been - initialized yet. Error messages get reported properly by - cmd_error, so this must be just an informative message; toss it. */ - else if (INTERACTIVE && FRAME_MESSAGE_BUF (selected_frame)) - { -#ifdef MULTI_FRAME - Lisp_Object minibuf_frame; - - choose_minibuf_frame (); - minibuf_frame = WINDOW_FRAME (XWINDOW (minibuf_window)); - FRAME_SAMPLE_VISIBILITY (XFRAME (minibuf_frame)); - if (FRAME_VISIBLE_P (selected_frame) - && ! FRAME_VISIBLE_P (XFRAME (minibuf_frame))) - Fmake_frame_visible (WINDOW_FRAME (XWINDOW (minibuf_window))); -#endif - - if (m) - { - echo_area_glyphs = m; - echo_area_glyphs_length = strlen (m); - } - else - echo_area_glyphs = previous_echo_glyphs = 0; - - do_pending_window_change (); - echo_area_display (); - update_frame (XFRAME (XWINDOW (minibuf_window)->frame), 1, 1); - do_pending_window_change (); - } -} - /* Display an echo area message M with a specified length of LEN chars. - This way, null characters can be included. Do not pass text that is - stored in a Lisp string. */ + The string may include null characters. If m is 0, clear out any + existing message, and let the minibuffer text show through. + Do not pass text that is stored in a Lisp string. */ void message2 (m, len) @@ -288,6 +240,13 @@ message2 (m, len) } } +void +message1 (m) + char *m; +{ + message2 (m, (m ? strlen (m) : 0)); +} + /* Truncate what will be displayed in the echo area the next time we display it--but don't redisplay it now. */ |
