Mercurial > emacs
comparison src/xdisp.c @ 11444:763c454b044e
(redisplay): Call init_desired_glyphs for each frame.
Call prepare_menu_bars.
(prepare_menu_bars): Delete code at beginning that duplicates
things done at the beginning of redisplay.
(message_log_check_duplicate): Make p1 and p2 unsigned char *.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 14 Apr 1995 18:24:00 +0000 |
parents | 17f7be3e2443 |
children | 24ae4a1359b8 |
comparison
equal
deleted
inserted
replaced
11443:188edd08d761 | 11444:763c454b044e |
---|---|
314 /* We are at the end of the buffer after just having inserted a newline. | 314 /* We are at the end of the buffer after just having inserted a newline. |
315 (Note: We depend on the fact we won't be crossing the gap.) | 315 (Note: We depend on the fact we won't be crossing the gap.) |
316 Check to see if the most recent message looks a lot like the previous one. | 316 Check to see if the most recent message looks a lot like the previous one. |
317 Return 0 if different, 1 if the new one should just replace it, or a | 317 Return 0 if different, 1 if the new one should just replace it, or a |
318 value N > 1 if we should also append " [N times]". */ | 318 value N > 1 if we should also append " [N times]". */ |
319 | |
319 static int | 320 static int |
320 message_log_check_duplicate (prev_bol, this_bol) | 321 message_log_check_duplicate (prev_bol, this_bol) |
321 int prev_bol, this_bol; | 322 int prev_bol, this_bol; |
322 { | 323 { |
323 int i; | 324 int i; |
324 int len = Z - 1 - this_bol; | 325 int len = Z - 1 - this_bol; |
325 int seen_dots = 0; | 326 int seen_dots = 0; |
326 char *p1 = BUF_CHAR_ADDRESS (current_buffer, prev_bol); | 327 unsigned char *p1 = BUF_CHAR_ADDRESS (current_buffer, prev_bol); |
327 char *p2 = BUF_CHAR_ADDRESS (current_buffer, this_bol); | 328 unsigned char *p2 = BUF_CHAR_ADDRESS (current_buffer, this_bol); |
328 | 329 |
329 for (i = 0; i < len; i++) | 330 for (i = 0; i < len; i++) |
330 { | 331 { |
331 if (i >= 3 && p1[i-3] == '.' && p1[i-2] == '.' && p1[i-1] == '.' | 332 if (i >= 3 && p1[i-3] == '.' && p1[i-2] == '.' && p1[i-1] == '.' |
332 && p1[i] != '\n') | 333 && p1[i] != '\n') |
652 { | 653 { |
653 register struct window *w = XWINDOW (selected_window); | 654 register struct window *w = XWINDOW (selected_window); |
654 int all_windows; | 655 int all_windows; |
655 struct gcpro gcpro1, gcpro2; | 656 struct gcpro gcpro1, gcpro2; |
656 | 657 |
657 if (noninteractive) | |
658 return; | |
659 | |
660 /* Set the visible flags for all frames. | |
661 Do this before checking for resized or garbaged frames; they want | |
662 to know if their frames are visible. | |
663 See the comment in frame.h for FRAME_SAMPLE_VISIBILITY. */ | |
664 { | |
665 Lisp_Object tail, frame; | |
666 | |
667 FOR_EACH_FRAME (tail, frame) | |
668 FRAME_SAMPLE_VISIBILITY (XFRAME (frame)); | |
669 } | |
670 | |
671 /* Notice any pending interrupt request to change frame size. */ | |
672 do_pending_window_change (); | |
673 | |
674 if (frame_garbaged) | |
675 { | |
676 redraw_garbaged_frames (); | |
677 frame_garbaged = 0; | |
678 } | |
679 | |
680 all_windows = (update_mode_lines || buffer_shared > 1 | 658 all_windows = (update_mode_lines || buffer_shared > 1 |
681 || clip_changed || windows_or_buffers_changed); | 659 || clip_changed || windows_or_buffers_changed); |
682 | 660 |
683 /* Update the menu bar item lists, if appropriate. | 661 /* Update the menu bar item lists, if appropriate. |
684 This has to be done before any actual redisplay | 662 This has to be done before any actual redisplay |
772 See the comment in frame.h for FRAME_SAMPLE_VISIBILITY. */ | 750 See the comment in frame.h for FRAME_SAMPLE_VISIBILITY. */ |
773 { | 751 { |
774 Lisp_Object tail, frame; | 752 Lisp_Object tail, frame; |
775 | 753 |
776 FOR_EACH_FRAME (tail, frame) | 754 FOR_EACH_FRAME (tail, frame) |
777 FRAME_SAMPLE_VISIBILITY (XFRAME (frame)); | 755 { |
756 FRAME_SAMPLE_VISIBILITY (XFRAME (frame)); | |
757 | |
758 /* Clear out all the display lines in which we will generate the | |
759 glyphs to display. */ | |
760 init_desired_glyphs (XFRAME (frame)); | |
761 } | |
778 } | 762 } |
779 | 763 |
780 /* Notice any pending interrupt request to change frame size. */ | 764 /* Notice any pending interrupt request to change frame size. */ |
781 do_pending_window_change (); | 765 do_pending_window_change (); |
782 | 766 |
783 if (frame_garbaged) | 767 if (frame_garbaged) |
784 { | 768 { |
785 redraw_garbaged_frames (); | 769 redraw_garbaged_frames (); |
786 frame_garbaged = 0; | 770 frame_garbaged = 0; |
787 } | 771 } |
772 | |
773 prepare_menu_bars (); | |
788 | 774 |
789 if (clip_changed || windows_or_buffers_changed | 775 if (clip_changed || windows_or_buffers_changed |
790 || (!NILP (w->column_number_displayed) | 776 || (!NILP (w->column_number_displayed) |
791 && XFASTINT (w->column_number_displayed) != current_column ())) | 777 && XFASTINT (w->column_number_displayed) != current_column ())) |
792 update_mode_lines++; | 778 update_mode_lines++; |