diff options
| author | Miles Bader | 2004-01-17 03:31:26 +0000 |
|---|---|---|
| committer | Miles Bader | 2004-01-17 03:31:26 +0000 |
| commit | 7af0e8d77515d0da4d615c767628277667aa38c8 (patch) | |
| tree | 6f5909014790dc7fbde386b0f708c74f4aba5bcc /src | |
| parent | a151ecffc93a869eb8713e5e723a5ea7f08df4f5 (diff) | |
| download | emacs-7af0e8d77515d0da4d615c767628277667aa38c8.tar.gz emacs-7af0e8d77515d0da4d615c767628277667aa38c8.zip | |
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-41
Make fringe-drawing stuff compile without a window-system
* src/xdisp.c (Voverflow_newline_into_fringe)
(move_it_in_display_line_to, redisplay_internal)
(update_window_fringes, redisplay_window, display_line, window):
Add `#ifdef HAVE_WINDOW_SYSTEM' around fringe-drawing stuff, so
that it compiles without a window-system.
* src/dispnew.c (direct_output_for_insert, update_window): Likewise.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 9 | ||||
| -rw-r--r-- | src/dispnew.c | 6 | ||||
| -rw-r--r-- | src/xdisp.c | 22 |
3 files changed, 35 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 199a7271039..c7b539b2a01 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2004-01-16 Miles Bader <miles@gnu.ai.mit.edu> | ||
| 2 | |||
| 3 | * xdisp.c (Voverflow_newline_into_fringe) | ||
| 4 | (move_it_in_display_line_to, redisplay_internal) | ||
| 5 | (update_window_fringes, redisplay_window, display_line, window): | ||
| 6 | Add `#ifdef HAVE_WINDOW_SYSTEM' around fringe-drawing stuff, so | ||
| 7 | that it compiles without a window-system. | ||
| 8 | * dispnew.c (direct_output_for_insert, update_window): Likewise. | ||
| 9 | |||
| 1 | 2004-01-16 Kim F. Storm <storm@cua.dk> | 10 | 2004-01-16 Kim F. Storm <storm@cua.dk> |
| 2 | 11 | ||
| 3 | * buffer.h (struct buffer): New member indicate_buffer_boundaries. | 12 | * buffer.h (struct buffer): New member indicate_buffer_boundaries. |
diff --git a/src/dispnew.c b/src/dispnew.c index 0314e34ecb2..65d4726b1df 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Updating of data structures for redisplay. | 1 | /* Updating of data structures for redisplay. |
| 2 | Copyright (C) 1985,86,87,88,93,94,95,97,98,1999,2000,01,02,2003 | 2 | Copyright (C) 1985,86,87,88,93,94,95,97,98,1999,2000,01,02,03,04 |
| 3 | Free Software Foundation, Inc. | 3 | Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| @@ -3655,7 +3655,9 @@ direct_output_for_insert (g) | |||
| 3655 | cursor_to (y, x); | 3655 | cursor_to (y, x); |
| 3656 | } | 3656 | } |
| 3657 | 3657 | ||
| 3658 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 3658 | update_window_fringes (w, 0); | 3659 | update_window_fringes (w, 0); |
| 3660 | #endif | ||
| 3659 | 3661 | ||
| 3660 | if (rif) | 3662 | if (rif) |
| 3661 | rif->update_window_end_hook (w, 1, 0); | 3663 | rif->update_window_end_hook (w, 1, 0); |
| @@ -4194,7 +4196,9 @@ update_window (w, force_p) | |||
| 4194 | strcpy (w->current_matrix->method, w->desired_matrix->method); | 4196 | strcpy (w->current_matrix->method, w->desired_matrix->method); |
| 4195 | #endif | 4197 | #endif |
| 4196 | 4198 | ||
| 4199 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 4197 | update_window_fringes (w, 0); | 4200 | update_window_fringes (w, 0); |
| 4201 | #endif | ||
| 4198 | 4202 | ||
| 4199 | /* End the update of window W. Don't set the cursor if we | 4203 | /* End the update of window W. Don't set the cursor if we |
| 4200 | paused updating the display because in this case, | 4204 | paused updating the display because in this case, |
diff --git a/src/xdisp.c b/src/xdisp.c index 11d48c90ea0..3241822e7b4 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Display generation from window structure and buffer text. | 1 | /* Display generation from window structure and buffer text. |
| 2 | Copyright (C) 1985,86,87,88,93,94,95,97,98,99,2000,01,02,03 | 2 | Copyright (C) 1985,86,87,88,93,94,95,97,98,99,2000,01,02,03,04 |
| 3 | Free Software Foundation, Inc. | 3 | Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| @@ -310,9 +310,11 @@ extern Lisp_Object Qscroll_bar; | |||
| 310 | 310 | ||
| 311 | Lisp_Object Vshow_trailing_whitespace; | 311 | Lisp_Object Vshow_trailing_whitespace; |
| 312 | 312 | ||
| 313 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 313 | /* Non-nil means that newline may flow into the right fringe. */ | 314 | /* Non-nil means that newline may flow into the right fringe. */ |
| 314 | 315 | ||
| 315 | Lisp_Object Voverflow_newline_into_fringe; | 316 | Lisp_Object Voverflow_newline_into_fringe; |
| 317 | #endif /* HAVE_WINDOW_SYSTEM */ | ||
| 316 | 318 | ||
| 317 | /* Test if overflow newline into fringe. Called with iterator IT | 319 | /* Test if overflow newline into fringe. Called with iterator IT |
| 318 | at or past right window margin, and with IT->current_x set. */ | 320 | at or past right window margin, and with IT->current_x set. */ |
| @@ -5609,6 +5611,7 @@ move_it_in_display_line_to (it, to_charpos, to_x, op) | |||
| 5609 | if (i == it->nglyphs - 1) | 5611 | if (i == it->nglyphs - 1) |
| 5610 | { | 5612 | { |
| 5611 | set_iterator_to_next (it, 1); | 5613 | set_iterator_to_next (it, 1); |
| 5614 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 5612 | if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)) | 5615 | if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)) |
| 5613 | { | 5616 | { |
| 5614 | get_next_display_element (it); | 5617 | get_next_display_element (it); |
| @@ -5618,6 +5621,7 @@ move_it_in_display_line_to (it, to_charpos, to_x, op) | |||
| 5618 | break; | 5621 | break; |
| 5619 | } | 5622 | } |
| 5620 | } | 5623 | } |
| 5624 | #endif /* HAVE_WINDOW_SYSTEM */ | ||
| 5621 | } | 5625 | } |
| 5622 | } | 5626 | } |
| 5623 | else | 5627 | else |
| @@ -5675,6 +5679,7 @@ move_it_in_display_line_to (it, to_charpos, to_x, op) | |||
| 5675 | if (it->truncate_lines_p | 5679 | if (it->truncate_lines_p |
| 5676 | && it->current_x >= it->last_visible_x) | 5680 | && it->current_x >= it->last_visible_x) |
| 5677 | { | 5681 | { |
| 5682 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 5678 | if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)) | 5683 | if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)) |
| 5679 | { | 5684 | { |
| 5680 | get_next_display_element (it); | 5685 | get_next_display_element (it); |
| @@ -5684,6 +5689,7 @@ move_it_in_display_line_to (it, to_charpos, to_x, op) | |||
| 5684 | break; | 5689 | break; |
| 5685 | } | 5690 | } |
| 5686 | } | 5691 | } |
| 5692 | #endif /* HAVE_WINDOW_SYSTEM */ | ||
| 5687 | result = MOVE_LINE_TRUNCATED; | 5693 | result = MOVE_LINE_TRUNCATED; |
| 5688 | break; | 5694 | break; |
| 5689 | } | 5695 | } |
| @@ -10257,7 +10263,9 @@ redisplay_internal (preserve_echo_area) | |||
| 10257 | *w->desired_matrix->method = 0; | 10263 | *w->desired_matrix->method = 0; |
| 10258 | debug_method_add (w, "optimization 1"); | 10264 | debug_method_add (w, "optimization 1"); |
| 10259 | #endif | 10265 | #endif |
| 10266 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 10260 | update_window_fringes (w, 0); | 10267 | update_window_fringes (w, 0); |
| 10268 | #endif | ||
| 10261 | goto update; | 10269 | goto update; |
| 10262 | } | 10270 | } |
| 10263 | else | 10271 | else |
| @@ -11668,6 +11676,7 @@ set_vertical_scroll_bar (w) | |||
| 11668 | set_vertical_scroll_bar_hook (w, end - start, whole, start); | 11676 | set_vertical_scroll_bar_hook (w, end - start, whole, start); |
| 11669 | } | 11677 | } |
| 11670 | 11678 | ||
| 11679 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 11671 | 11680 | ||
| 11672 | /* Recalculate the bitmaps to show in the fringes of window W. | 11681 | /* Recalculate the bitmaps to show in the fringes of window W. |
| 11673 | If FORCE_P is 0, only mark rows with modified bitmaps for update in | 11682 | If FORCE_P is 0, only mark rows with modified bitmaps for update in |
| @@ -11796,6 +11805,7 @@ update_window_fringes (w, force_p) | |||
| 11796 | return redraw_p; | 11805 | return redraw_p; |
| 11797 | } | 11806 | } |
| 11798 | 11807 | ||
| 11808 | #endif /* HAVE_WINDOW_SYSTEM */ | ||
| 11799 | 11809 | ||
| 11800 | /* Redisplay leaf window WINDOW. JUST_THIS_ONE_P non-zero means only | 11810 | /* Redisplay leaf window WINDOW. JUST_THIS_ONE_P non-zero means only |
| 11801 | selected_window is redisplayed. | 11811 | selected_window is redisplayed. |
| @@ -12484,6 +12494,7 @@ redisplay_window (window, just_this_one_p) | |||
| 12484 | #endif | 12494 | #endif |
| 12485 | } | 12495 | } |
| 12486 | 12496 | ||
| 12497 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 12487 | if (update_window_fringes (w, 0) | 12498 | if (update_window_fringes (w, 0) |
| 12488 | && (used_current_matrix_p || overlay_arrow_seen) | 12499 | && (used_current_matrix_p || overlay_arrow_seen) |
| 12489 | && !w->pseudo_window_p) | 12500 | && !w->pseudo_window_p) |
| @@ -12494,6 +12505,7 @@ redisplay_window (window, just_this_one_p) | |||
| 12494 | UNBLOCK_INPUT; | 12505 | UNBLOCK_INPUT; |
| 12495 | update_end (f); | 12506 | update_end (f); |
| 12496 | } | 12507 | } |
| 12508 | #endif /* HAVE_WINDOW_SYSTEM */ | ||
| 12497 | 12509 | ||
| 12498 | /* We go to this label, with fonts_changed_p nonzero, | 12510 | /* We go to this label, with fonts_changed_p nonzero, |
| 12499 | if it is necessary to try again using larger glyph matrices. | 12511 | if it is necessary to try again using larger glyph matrices. |
| @@ -14933,6 +14945,7 @@ display_line (it) | |||
| 14933 | if (i == nglyphs - 1) | 14945 | if (i == nglyphs - 1) |
| 14934 | { | 14946 | { |
| 14935 | set_iterator_to_next (it, 1); | 14947 | set_iterator_to_next (it, 1); |
| 14948 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 14936 | if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)) | 14949 | if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)) |
| 14937 | { | 14950 | { |
| 14938 | get_next_display_element (it); | 14951 | get_next_display_element (it); |
| @@ -14942,6 +14955,7 @@ display_line (it) | |||
| 14942 | row->exact_window_width_line_p = 1; | 14955 | row->exact_window_width_line_p = 1; |
| 14943 | } | 14956 | } |
| 14944 | } | 14957 | } |
| 14958 | #endif /* HAVE_WINDOW_SYSTEM */ | ||
| 14945 | } | 14959 | } |
| 14946 | } | 14960 | } |
| 14947 | else if (CHAR_GLYPH_PADDING_P (*glyph) | 14961 | else if (CHAR_GLYPH_PADDING_P (*glyph) |
| @@ -15054,10 +15068,12 @@ display_line (it) | |||
| 15054 | 15068 | ||
| 15055 | row->ends_in_newline_from_string_p = STRINGP (it->object); | 15069 | row->ends_in_newline_from_string_p = STRINGP (it->object); |
| 15056 | 15070 | ||
| 15071 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 15057 | /* Add a space at the end of the line that is used to | 15072 | /* Add a space at the end of the line that is used to |
| 15058 | display the cursor there. */ | 15073 | display the cursor there. */ |
| 15059 | if (!IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)) | 15074 | if (!IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)) |
| 15060 | append_space (it, 0); | 15075 | append_space (it, 0); |
| 15076 | #endif /* HAVE_WINDOW_SYSTEM */ | ||
| 15061 | 15077 | ||
| 15062 | /* Extend the face to the end of the line. */ | 15078 | /* Extend the face to the end of the line. */ |
| 15063 | extend_face_to_end_of_line (it); | 15079 | extend_face_to_end_of_line (it); |
| @@ -15098,6 +15114,7 @@ display_line (it) | |||
| 15098 | produce_special_glyphs (it, IT_TRUNCATION); | 15114 | produce_special_glyphs (it, IT_TRUNCATION); |
| 15099 | } | 15115 | } |
| 15100 | } | 15116 | } |
| 15117 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 15101 | else | 15118 | else |
| 15102 | { | 15119 | { |
| 15103 | /* Don't truncate if we can overflow newline into fringe. */ | 15120 | /* Don't truncate if we can overflow newline into fringe. */ |
| @@ -15111,6 +15128,7 @@ display_line (it) | |||
| 15111 | } | 15128 | } |
| 15112 | } | 15129 | } |
| 15113 | } | 15130 | } |
| 15131 | #endif /* HAVE_WINDOW_SYSTEM */ | ||
| 15114 | 15132 | ||
| 15115 | row->truncated_on_right_p = 1; | 15133 | row->truncated_on_right_p = 1; |
| 15116 | it->continuation_lines_width = 0; | 15134 | it->continuation_lines_width = 0; |
| @@ -21997,6 +22015,7 @@ wide as that tab on the display. */); | |||
| 21997 | The face used for trailing whitespace is `trailing-whitespace'. */); | 22015 | The face used for trailing whitespace is `trailing-whitespace'. */); |
| 21998 | Vshow_trailing_whitespace = Qnil; | 22016 | Vshow_trailing_whitespace = Qnil; |
| 21999 | 22017 | ||
| 22018 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 22000 | DEFVAR_LISP ("overflow-newline-into-fringe", &Voverflow_newline_into_fringe, | 22019 | DEFVAR_LISP ("overflow-newline-into-fringe", &Voverflow_newline_into_fringe, |
| 22001 | doc: /* *Non-nil means that newline may flow into the right fringe. | 22020 | doc: /* *Non-nil means that newline may flow into the right fringe. |
| 22002 | This means that display lines which are exactly as wide as the window | 22021 | This means that display lines which are exactly as wide as the window |
| @@ -22005,6 +22024,7 @@ showing (or hiding) the final newline in the right fringe; when point | |||
| 22005 | is at the final newline, the cursor is shown in the right fringe. | 22024 | is at the final newline, the cursor is shown in the right fringe. |
| 22006 | If nil, also continue lines which are exactly as wide as the window. */); | 22025 | If nil, also continue lines which are exactly as wide as the window. */); |
| 22007 | Voverflow_newline_into_fringe = Qt; | 22026 | Voverflow_newline_into_fringe = Qt; |
| 22027 | #endif | ||
| 22008 | 22028 | ||
| 22009 | DEFVAR_LISP ("void-text-area-pointer", &Vvoid_text_area_pointer, | 22029 | DEFVAR_LISP ("void-text-area-pointer", &Vvoid_text_area_pointer, |
| 22010 | doc: /* *The pointer shape to show in void text areas. | 22030 | doc: /* *The pointer shape to show in void text areas. |