diff src/xdisp.c @ 53612:2ddd2a0d047a

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.
author Miles Bader <miles@gnu.org>
date Sat, 17 Jan 2004 03:31:26 +0000
parents 81b31a8c3313
children 3cc32cd9cf25 82c3b4da43ca
line wrap: on
line diff
--- a/src/xdisp.c	Sat Jan 17 03:01:45 2004 +0000
+++ b/src/xdisp.c	Sat Jan 17 03:31:26 2004 +0000
@@ -1,5 +1,5 @@
 /* Display generation from window structure and buffer text.
-   Copyright (C) 1985,86,87,88,93,94,95,97,98,99,2000,01,02,03
+   Copyright (C) 1985,86,87,88,93,94,95,97,98,99,2000,01,02,03,04
    Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -310,9 +310,11 @@
 
 Lisp_Object Vshow_trailing_whitespace;
 
+#ifdef HAVE_WINDOW_SYSTEM
 /* Non-nil means that newline may flow into the right fringe.  */
 
 Lisp_Object Voverflow_newline_into_fringe;
+#endif /* HAVE_WINDOW_SYSTEM */
 
 /* Test if overflow newline into fringe.  Called with iterator IT
    at or past right window margin, and with IT->current_x set.  */ 
@@ -5609,6 +5611,7 @@
 		      if (i == it->nglyphs - 1)
 			{
 			  set_iterator_to_next (it, 1);
+#ifdef HAVE_WINDOW_SYSTEM
 			  if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it))
 			    {
 			      get_next_display_element (it);
@@ -5618,6 +5621,7 @@
 				  break;
 				}
 			    }
+#endif /* HAVE_WINDOW_SYSTEM */
 			}
 		    }
 		  else
@@ -5675,6 +5679,7 @@
       if (it->truncate_lines_p
 	  && it->current_x >= it->last_visible_x)
 	{
+#ifdef HAVE_WINDOW_SYSTEM
 	  if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it))
 	    {
 	      get_next_display_element (it);
@@ -5684,6 +5689,7 @@
 		  break;
 		}
 	    }
+#endif /* HAVE_WINDOW_SYSTEM */
 	  result = MOVE_LINE_TRUNCATED;
 	  break;
 	}
@@ -10257,7 +10263,9 @@
 	      *w->desired_matrix->method = 0;
 	      debug_method_add (w, "optimization 1");
 #endif
+#ifdef HAVE_WINDOW_SYSTEM
 	      update_window_fringes (w, 0);
+#endif
 	      goto update;
 	    }
 	  else
@@ -11668,6 +11676,7 @@
   set_vertical_scroll_bar_hook (w, end - start, whole, start);
 }
 
+#ifdef HAVE_WINDOW_SYSTEM
 
 /* Recalculate the bitmaps to show in the fringes of window W.
    If FORCE_P is 0, only mark rows with modified bitmaps for update in
@@ -11796,6 +11805,7 @@
   return redraw_p;
 }
 
+#endif /* HAVE_WINDOW_SYSTEM */
 
 /* Redisplay leaf window WINDOW.  JUST_THIS_ONE_P non-zero means only
    selected_window is redisplayed.
@@ -12484,6 +12494,7 @@
 #endif
     }
 
+#ifdef HAVE_WINDOW_SYSTEM
   if (update_window_fringes (w, 0)
       && (used_current_matrix_p || overlay_arrow_seen)
       && !w->pseudo_window_p)
@@ -12494,6 +12505,7 @@
       UNBLOCK_INPUT;
       update_end (f);
     }
+#endif /* HAVE_WINDOW_SYSTEM */
 
   /* We go to this label, with fonts_changed_p nonzero,
      if it is necessary to try again using larger glyph matrices.
@@ -14933,6 +14945,7 @@
 		      if (i == nglyphs - 1)
 			{
 			  set_iterator_to_next (it, 1);
+#ifdef HAVE_WINDOW_SYSTEM
 			  if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it))
 			    {
 			      get_next_display_element (it);
@@ -14942,6 +14955,7 @@
 				  row->exact_window_width_line_p = 1;
 				}
 			    }
+#endif /* HAVE_WINDOW_SYSTEM */
 			}
 		    }
 		  else if (CHAR_GLYPH_PADDING_P (*glyph)
@@ -15054,10 +15068,12 @@
 
 	  row->ends_in_newline_from_string_p = STRINGP (it->object);
 
+#ifdef HAVE_WINDOW_SYSTEM
 	  /* Add a space at the end of the line that is used to
 	     display the cursor there.  */
 	  if (!IT_OVERFLOW_NEWLINE_INTO_FRINGE (it))
 	    append_space (it, 0);
+#endif /* HAVE_WINDOW_SYSTEM */
 
 	  /* Extend the face to the end of the line.  */
 	  extend_face_to_end_of_line (it);
@@ -15098,6 +15114,7 @@
 		  produce_special_glyphs (it, IT_TRUNCATION);
 		}
 	    }
+#ifdef HAVE_WINDOW_SYSTEM
 	  else
 	    {
 	      /* Don't truncate if we can overflow newline into fringe.  */
@@ -15111,6 +15128,7 @@
 		    }
 		}
 	    }
+#endif /* HAVE_WINDOW_SYSTEM */
 
 	  row->truncated_on_right_p = 1;
 	  it->continuation_lines_width = 0;
@@ -21997,6 +22015,7 @@
 The face used for trailing whitespace is `trailing-whitespace'.  */);
   Vshow_trailing_whitespace = Qnil;
 
+#ifdef HAVE_WINDOW_SYSTEM
   DEFVAR_LISP ("overflow-newline-into-fringe", &Voverflow_newline_into_fringe,
     doc: /* *Non-nil means that newline may flow into the right fringe.
 This means that display lines which are exactly as wide as the window
@@ -22005,6 +22024,7 @@
 is at the final newline, the cursor is shown in the right fringe.
 If nil, also continue lines which are exactly as wide as the window.  */);
   Voverflow_newline_into_fringe = Qt;
+#endif
 
   DEFVAR_LISP ("void-text-area-pointer", &Vvoid_text_area_pointer,
     doc: /* *The pointer shape to show in void text areas.