diff options
| author | Jim Blandy | 1991-11-16 00:15:15 +0000 |
|---|---|---|
| committer | Jim Blandy | 1991-11-16 00:15:15 +0000 |
| commit | 8de2d90bd077ccb914a326ded07e47101c6805a3 (patch) | |
| tree | 837bb44299efc67c1b9b4511103bc160753d3dda /src | |
| parent | d5783c408421d7cabe664dc75ea42687f06477dc (diff) | |
| download | emacs-8de2d90bd077ccb914a326ded07e47101c6805a3.tar.gz emacs-8de2d90bd077ccb914a326ded07e47101c6805a3.zip | |
*** empty log message ***
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 123 |
1 files changed, 66 insertions, 57 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 0fd3e89ed58..66f213ddf1c 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -212,10 +212,15 @@ message (m, a1, a2, a3) | |||
| 212 | fflush (stderr); | 212 | fflush (stderr); |
| 213 | } | 213 | } |
| 214 | /* A null message buffer means that the screen hasn't really been | 214 | /* A null message buffer means that the screen hasn't really been |
| 215 | initialized yet. Error messages get trapped by the condition-case | 215 | initialized yet. Error messages get reported properly by |
| 216 | in command-line, so this must be just an informative message; toss it. */ | 216 | cmd_error, so this must be just an informative message; toss it. */ |
| 217 | else if (INTERACTIVE && SCREEN_MESSAGE_BUF (selected_screen)) | 217 | else if (INTERACTIVE && SCREEN_MESSAGE_BUF (selected_screen)) |
| 218 | { | 218 | { |
| 219 | #ifdef MULTI_SCREEN | ||
| 220 | choose_minibuf_screen (); | ||
| 221 | Fmake_screen_visible (WINDOW_SCREEN (XWINDOW (minibuf_window))); | ||
| 222 | #endif | ||
| 223 | |||
| 219 | #ifdef NO_ARG_ARRAY | 224 | #ifdef NO_ARG_ARRAY |
| 220 | int a[3]; | 225 | int a[3]; |
| 221 | a[0] = a1; | 226 | a[0] = a1; |
| @@ -247,9 +252,6 @@ void | |||
| 247 | message1 (m) | 252 | message1 (m) |
| 248 | char *m; | 253 | char *m; |
| 249 | { | 254 | { |
| 250 | /* A null message buffer means that the screen hasn't really been | ||
| 251 | initialized yet; write the error message on the standard error | ||
| 252 | as if we were non-interactive. */ | ||
| 253 | if (noninteractive) | 255 | if (noninteractive) |
| 254 | { | 256 | { |
| 255 | if (noninteractive_need_newline) | 257 | if (noninteractive_need_newline) |
| @@ -259,10 +261,15 @@ message1 (m) | |||
| 259 | fflush (stderr); | 261 | fflush (stderr); |
| 260 | } | 262 | } |
| 261 | /* A null message buffer means that the screen hasn't really been | 263 | /* A null message buffer means that the screen hasn't really been |
| 262 | initialized yet. Error messages get trapped by the condition-case | 264 | initialized yet. Error messages get reported properly by |
| 263 | in command-line, so this must be just an informative message; toss it. */ | 265 | cmd_error, so this must be just an informative message; toss it. */ |
| 264 | else if (INTERACTIVE && SCREEN_MESSAGE_BUF (selected_screen)) | 266 | else if (INTERACTIVE && SCREEN_MESSAGE_BUF (selected_screen)) |
| 265 | { | 267 | { |
| 268 | #ifdef MULTI_SCREEN | ||
| 269 | choose_minibuf_screen (); | ||
| 270 | Fmake_screen_visible (WINDOW_SCREEN (XWINDOW (minibuf_window))); | ||
| 271 | #endif | ||
| 272 | |||
| 266 | echo_area_glyphs = m; | 273 | echo_area_glyphs = m; |
| 267 | do_pending_window_change (); | 274 | do_pending_window_change (); |
| 268 | echo_area_display (); | 275 | echo_area_display (); |
| @@ -279,9 +286,9 @@ echo_area_display () | |||
| 279 | 286 | ||
| 280 | #ifdef MULTI_SCREEN | 287 | #ifdef MULTI_SCREEN |
| 281 | choose_minibuf_screen (); | 288 | choose_minibuf_screen (); |
| 282 | s = XSCREEN (XWINDOW (minibuf_window)->screen); | 289 | s = XSCREEN (WINDOW_SCREEN (XWINDOW (minibuf_window))); |
| 283 | 290 | ||
| 284 | if (!s->visible) | 291 | if (! SCREEN_VISIBLE_P (s)) |
| 285 | return; | 292 | return; |
| 286 | #endif | 293 | #endif |
| 287 | 294 | ||
| @@ -467,7 +474,7 @@ redisplay () | |||
| 467 | Lisp_Object tail; | 474 | Lisp_Object tail; |
| 468 | 475 | ||
| 469 | /* Recompute # windows showing selected buffer. | 476 | /* Recompute # windows showing selected buffer. |
| 470 | This will be increment each time such a window is displayed. */ | 477 | This will be incremented each time such a window is displayed. */ |
| 471 | buffer_shared = 0; | 478 | buffer_shared = 0; |
| 472 | 479 | ||
| 473 | for (tail = Vscreen_list; CONSP (tail); tail = XCONS (tail)->cdr) | 480 | for (tail = Vscreen_list; CONSP (tail); tail = XCONS (tail)->cdr) |
| @@ -479,24 +486,8 @@ redisplay () | |||
| 479 | 486 | ||
| 480 | s = XSCREEN (XCONS (tail)->car); | 487 | s = XSCREEN (XCONS (tail)->car); |
| 481 | if (s->visible) | 488 | if (s->visible) |
| 482 | { | 489 | /* Redraw its windows. */ |
| 483 | 490 | redisplay_windows (SCREEN_ROOT_WINDOW (s)); | |
| 484 | /* Clear the echo area on screens where the minibuffer isn't. */ | ||
| 485 | if (s != XSCREEN (XWINDOW (minibuf_window)->screen) | ||
| 486 | /* But only screens that have minibuffers. */ | ||
| 487 | && s->has_minibuffer) | ||
| 488 | { | ||
| 489 | int vpos = XFASTINT (XWINDOW (s->minibuffer_window)->top); | ||
| 490 | register struct screen_glyphs *line; | ||
| 491 | |||
| 492 | get_display_line (s, vpos, 0); | ||
| 493 | display_string (XWINDOW (s->minibuffer_window), vpos, "", | ||
| 494 | 0, 0, 0, s->width); | ||
| 495 | } | ||
| 496 | |||
| 497 | /* Redraw its windows. */ | ||
| 498 | redisplay_windows (SCREEN_ROOT_WINDOW (s)); | ||
| 499 | } | ||
| 500 | } | 491 | } |
| 501 | #else | 492 | #else |
| 502 | redisplay_windows (SCREEN_ROOT_WINDOW (s)); | 493 | redisplay_windows (SCREEN_ROOT_WINDOW (s)); |
| @@ -534,7 +525,7 @@ update: | |||
| 534 | s = XSCREEN (XCONS (tail)->car); | 525 | s = XSCREEN (XCONS (tail)->car); |
| 535 | if (s->visible) | 526 | if (s->visible) |
| 536 | { | 527 | { |
| 537 | pause |= update_screen (s, 0, 0, SCREEN_SCROLL_BOTTOM_VPOS (s)); | 528 | pause |= update_screen (s, 0, 0); |
| 538 | if (!pause) | 529 | if (!pause) |
| 539 | mark_window_display_accurate (s->root_window, 1); | 530 | mark_window_display_accurate (s->root_window, 1); |
| 540 | } | 531 | } |
| @@ -546,19 +537,18 @@ update: | |||
| 546 | if (SCREEN_VISIBLE_P (selected_screen)) | 537 | if (SCREEN_VISIBLE_P (selected_screen)) |
| 547 | pause = update_screen (selected_screen, 0, 0); | 538 | pause = update_screen (selected_screen, 0, 0); |
| 548 | #ifdef MULTI_SCREEN | 539 | #ifdef MULTI_SCREEN |
| 549 | 540 | /* We may have called echo_area_display at the top of this | |
| 550 | /* We called echo_area_display at the top of this function. If | 541 | function. If the echo area is on another screen, that may |
| 551 | the echo area is on another screen, that may have put text on | 542 | have put text on a screen other than the selected one, so the |
| 552 | a screen other than the selected one, so the above call to | 543 | above call to update_screen would not have caught it. Catch |
| 553 | update_screen would not have caught it. Catch it here. */ | 544 | it here. */ |
| 554 | if (echo_area_glyphs || previous_echo_glyphs) | 545 | { |
| 555 | { | 546 | SCREEN_PTR mini_screen = |
| 556 | SCREEN_PTR mini_screen = | 547 | XSCREEN (WINDOW_SCREEN (XWINDOW (minibuf_window))); |
| 557 | XSCREEN (WINDOW_SCREEN (XWINDOW (minibuf_window))); | 548 | |
| 558 | 549 | if (mini_screen != selected_screen) | |
| 559 | if (mini_screen != selected_screen) | 550 | pause |= update_screen (mini_screen, 0, 0); |
| 560 | pause |= update_screen (mini_screen, 0, 0); | 551 | } |
| 561 | } | ||
| 562 | #endif | 552 | #endif |
| 563 | } | 553 | } |
| 564 | 554 | ||
| @@ -730,20 +720,39 @@ redisplay_window (window, just_this_one) | |||
| 730 | } | 720 | } |
| 731 | if (NULL (w->buffer)) | 721 | if (NULL (w->buffer)) |
| 732 | abort (); | 722 | abort (); |
| 723 | |||
| 724 | height = window_internal_height (w); | ||
| 725 | |||
| 726 | if (MINI_WINDOW_P (w)) | ||
| 727 | { | ||
| 728 | if (w == XWINDOW (minibuf_window)) | ||
| 729 | { | ||
| 730 | if (echo_area_glyphs) | ||
| 731 | /* We've already displayed the echo area glyphs, if any. */ | ||
| 732 | return; | ||
| 733 | } | ||
| 734 | else | ||
| 735 | { | ||
| 736 | /* This is a minibuffer, but it's not the currently active one, so | ||
| 737 | clear it. */ | ||
| 738 | int vpos = XFASTINT (XWINDOW (SCREEN_MINIBUF_WINDOW (s))->top); | ||
| 739 | int i; | ||
| 740 | |||
| 741 | for (i = 0; i < height; i++) | ||
| 742 | { | ||
| 743 | get_display_line (s, vpos + i, 0); | ||
| 744 | display_string (w, vpos + i, "", 0, 0, 0, width); | ||
| 745 | } | ||
| 746 | |||
| 747 | return; | ||
| 748 | } | ||
| 749 | } | ||
| 733 | 750 | ||
| 734 | if (update_mode_lines) | 751 | if (update_mode_lines) |
| 735 | w->update_mode_line = Qt; | 752 | w->update_mode_line = Qt; |
| 736 | 753 | ||
| 737 | /* Otherwise set up data on this window; select its buffer and point value */ | 754 | /* Otherwise set up data on this window; select its buffer and point value */ |
| 738 | 755 | ||
| 739 | height = window_internal_height (w); | ||
| 740 | |||
| 741 | if (MINI_WINDOW_P (w) | ||
| 742 | && (echo_area_glyphs | ||
| 743 | /* Don't display minibuffers except minibuf_window. */ | ||
| 744 | || w != XWINDOW (minibuf_window))) | ||
| 745 | return; | ||
| 746 | |||
| 747 | current_buffer = XBUFFER (w->buffer); | 756 | current_buffer = XBUFFER (w->buffer); |
| 748 | opoint = point; | 757 | opoint = point; |
| 749 | 758 | ||
| @@ -772,19 +781,20 @@ redisplay_window (window, just_this_one) | |||
| 772 | } | 781 | } |
| 773 | 782 | ||
| 774 | /* If window-start is screwed up, choose a new one. */ | 783 | /* If window-start is screwed up, choose a new one. */ |
| 775 | |||
| 776 | if (XMARKER (w->start)->buffer != current_buffer) | 784 | if (XMARKER (w->start)->buffer != current_buffer) |
| 777 | goto recenter; | 785 | goto recenter; |
| 778 | 786 | ||
| 779 | startp = marker_position (w->start); | 787 | startp = marker_position (w->start); |
| 780 | 788 | ||
| 781 | /* Handle case where place to start displaying has been specified */ | 789 | /* Handle case where place to start displaying has been specified, |
| 782 | 790 | unless the specified location is outside the visible range. */ | |
| 783 | if (!NULL (w->force_start)) | 791 | if (!NULL (w->force_start)) |
| 784 | { | 792 | { |
| 785 | w->update_mode_line = Qt; | 793 | w->update_mode_line = Qt; |
| 786 | w->force_start = Qnil; | 794 | w->force_start = Qnil; |
| 787 | XFASTINT (w->last_modified) = 0; | 795 | XFASTINT (w->last_modified) = 0; |
| 796 | if (startp < BEGV) startp = BEGV; | ||
| 797 | if (startp > ZV) startp = ZV; | ||
| 788 | try_window (window, startp); | 798 | try_window (window, startp); |
| 789 | if (cursor_vpos < 0) | 799 | if (cursor_vpos < 0) |
| 790 | { | 800 | { |
| @@ -879,7 +889,7 @@ redisplay_window (window, just_this_one) | |||
| 879 | } | 889 | } |
| 880 | else if (startp >= BEGV && startp <= ZV | 890 | else if (startp >= BEGV && startp <= ZV |
| 881 | /* Avoid starting display at end of buffer! */ | 891 | /* Avoid starting display at end of buffer! */ |
| 882 | && (startp <= ZV || startp == BEGV | 892 | && (startp < ZV || startp == BEGV |
| 883 | || (XFASTINT (w->last_modified) >= MODIFF))) | 893 | || (XFASTINT (w->last_modified) >= MODIFF))) |
| 884 | { | 894 | { |
| 885 | /* Try to redisplay starting at same place as before */ | 895 | /* Try to redisplay starting at same place as before */ |
| @@ -1753,11 +1763,10 @@ display_mode_line (w) | |||
| 1753 | 1763 | ||
| 1754 | #ifdef HAVE_X_WINDOWS | 1764 | #ifdef HAVE_X_WINDOWS |
| 1755 | /* I'm trying this out because I saw Unimpress use it, but it's | 1765 | /* I'm trying this out because I saw Unimpress use it, but it's |
| 1756 | possible that this may fuck adversely with some window managers. jla */ | 1766 | possible that this may mess adversely with some window managers. jla */ |
| 1757 | 1767 | ||
| 1758 | if (SCREEN_IS_X (s) | 1768 | if (SCREEN_IS_X (s) |
| 1759 | && (XTYPE (Vglobal_minibuffer_screen) != Lisp_Screen | 1769 | && ! SCREEN_MINIBUF_ONLY_P (s) |
| 1760 | || s != XSCREEN (Vglobal_minibuffer_screen)) | ||
| 1761 | && w == XWINDOW (s->selected_window) | 1770 | && w == XWINDOW (s->selected_window) |
| 1762 | && (NULL (Fstring_equal (XBUFFER (w->buffer)->name, s->name)))) | 1771 | && (NULL (Fstring_equal (XBUFFER (w->buffer)->name, s->name)))) |
| 1763 | x_set_name (s, XBUFFER (w->buffer)->name, Qnil); | 1772 | x_set_name (s, XBUFFER (w->buffer)->name, Qnil); |