changeset 1527:00109911b040

* xdisp.c (redisplay): Use ! EQ to compare the old and new arrow positions, not !=. (mark_window_display_accurate): Barf if WINDOW isn't a window. (display_string): Test buffer_defaults.ctl_arrow using NILP, instead of comparing it with zero. * xdisp.c (last_arrow_position, last_arrow_string): Make these static. * xdisp.c (message): Re-write this in terms of message1. (message1): Move code to clear out echo_area_glyphs and previous_echo_glyphs from message to here.
author Jim Blandy <jimb@redhat.com>
date Sat, 31 Oct 1992 05:41:20 +0000
parents a45910fb5bbc
children 924c8a609582
files src/xdisp.c
diffstat 1 files changed, 48 insertions(+), 57 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Sat Oct 31 05:40:28 1992 +0000
+++ b/src/xdisp.c	Sat Oct 31 05:41:20 1992 +0000
@@ -86,7 +86,7 @@
 Lisp_Object Voverlay_arrow_string;
 
 /* Values of those variables at last redisplay.  */
-Lisp_Object last_arrow_position, last_arrow_string;
+static Lisp_Object last_arrow_position, last_arrow_string;
 
 /* Nonzero if overlay arrow has been displayed once in this window.  */
 static int overlay_arrow_seen;
@@ -167,6 +167,47 @@
 int windows_or_buffers_changed;
 
 
+/* 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;
+      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));
+      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;
+      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 ();
+    }
+}
+
 /* Nonzero if FRAME_MESSAGE_BUF (selected_frame) is being used by print;
    zero if being used by message.  */
 int message_buf_print;
@@ -195,16 +236,6 @@
      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));
-      if (FRAME_VISIBLE_P (selected_frame)
-	  && ! FRAME_VISIBLE_P (XFRAME (minibuf_frame)))
-	Fmake_frame_visible (WINDOW_FRAME (XWINDOW (minibuf_window)));
-#endif
-
       if (m)
 	{
 	  {
@@ -222,55 +253,14 @@
 #endif				/* NO_ARG_ARRAY */
 	  }
 
-	  echo_area_glyphs = FRAME_MESSAGE_BUF (selected_frame);
+	  message1 (FRAME_MESSAGE_BUF (selected_frame));
 	}
       else
-	echo_area_glyphs = previous_echo_glyphs = 0;
+	message1 (0);
 
       /* Print should start at the beginning of the message
 	 buffer next time.  */
       message_buf_print = 0;
-
-      do_pending_window_change ();
-      echo_area_display ();
-      update_frame (XFRAME (XWINDOW (minibuf_window)->frame), 1, 1);
-      do_pending_window_change ();
-    }
-}
-
-/* Specify m, a string, as a message in the minibuf.  */
-void
-message1 (m)
-     char *m;
-{
-  if (noninteractive)
-    {
-      if (noninteractive_need_newline)
-	putc ('\n', stderr);
-      noninteractive_need_newline = 0;
-      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));
-      if (FRAME_VISIBLE_P (selected_frame)
-	  && ! FRAME_VISIBLE_P (XFRAME (minibuf_frame)))
-	Fmake_frame_visible (WINDOW_FRAME (XWINDOW (minibuf_window)));
-#endif
-
-      echo_area_glyphs = m;
-      do_pending_window_change ();
-      echo_area_display ();
-      update_frame (XFRAME (XWINDOW (minibuf_window)->frame), 1, 1);
-      do_pending_window_change ();
     }
 }
 
@@ -393,8 +383,8 @@
 
   /* If specs for an arrow have changed, do thorough redisplay
      to ensure we remove any arrow that should no longer exist.  */
-  if (Voverlay_arrow_position != last_arrow_position
-      || Voverlay_arrow_string != last_arrow_string)
+  if (! EQ (Voverlay_arrow_position, last_arrow_position)
+      || ! EQ (Voverlay_arrow_string, last_arrow_string))
     all_windows = 1, clip_changed = 1;
 
   tlbufpos = this_line_bufpos;
@@ -661,6 +651,7 @@
 
   for (;!NILP (window); window = w->next)
     {
+      if (XTYPE (window) != Lisp_Window) abort ();
       w = XWINDOW (window);
 
       if (!NILP (w->buffer))
@@ -2242,7 +2233,7 @@
 	}
       else if (dp != 0 && XTYPE (DISP_CHAR_ROPE (dp, c)) == Lisp_String)
         p1 = copy_rope (p1, start, DISP_CHAR_ROPE (dp, c));
-      else if (c < 0200 && buffer_defaults.ctl_arrow)
+      else if (c < 0200 && ! NILP (buffer_defaults.ctl_arrow))
 	{
 	  if (p1 >= start)
 	    *p1 = (dp && XTYPE (DISP_CTRL_GLYPH (dp)) == Lisp_Int