changeset 9105:984a4b1be1d1

(Fwindowp, Fwindow_live_p, window_display_table, window_loop, Fget_buffer_window, Fscroll_other_window, Frecenter, Fwindow_configuration_p, Fset_window_configuration): Use type test macros.
author Karl Heuer <kwzh@gnu.org>
date Tue, 27 Sep 1994 00:51:55 +0000
parents 610e18fd64a9
children 40a353de483c
files src/window.c
diffstat 1 files changed, 13 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/src/window.c	Tue Sep 27 00:37:04 1994 +0000
+++ b/src/window.c	Tue Sep 27 00:51:55 1994 +0000
@@ -105,7 +105,7 @@
   (obj)
      Lisp_Object obj;
 {
-  return XTYPE (obj) == Lisp_Window ? Qt : Qnil;
+  return WINDOWP (obj) ? Qt : Qnil;
 }
 
 DEFUN ("window-live-p", Fwindow_live_p, Swindow_live_p, 1, 1, 0,
@@ -113,9 +113,7 @@
      (obj)
      Lisp_Object obj;
 {
-  return ((XTYPE (obj) == Lisp_Window
-	   && ! NILP (XWINDOW (obj)->buffer))
-	  ? Qt : Qnil);
+  return (WINDOWP (obj) && ! NILP (XWINDOW (obj)->buffer) ? Qt : Qnil);
 }
 
 Lisp_Object
@@ -618,13 +616,13 @@
 {
   Lisp_Object tem;
   tem = w->display_table;
-  if (XTYPE (tem) == Lisp_Vector && XVECTOR (tem)->size == DISP_TABLE_SIZE)
+  if (VECTORP (tem) && XVECTOR (tem)->size == DISP_TABLE_SIZE)
     return XVECTOR (tem);
   tem = XBUFFER (w->buffer)->display_table;
-  if (XTYPE (tem) == Lisp_Vector && XVECTOR (tem)->size == DISP_TABLE_SIZE)
+  if (VECTORP (tem) && XVECTOR (tem)->size == DISP_TABLE_SIZE)
     return XVECTOR (tem);
   tem = Vstandard_display_table;
-  if (XTYPE (tem) == Lisp_Vector && XVECTOR (tem)->size == DISP_TABLE_SIZE)
+  if (VECTORP (tem) && XVECTOR (tem)->size == DISP_TABLE_SIZE)
     return XVECTOR (tem);
   return 0;
 }
@@ -1227,7 +1225,7 @@
      or Qt otherwise.  */
 
   /* Pick a window to start with.  */
-  if (XTYPE (obj) == Lisp_Window)
+  if (WINDOWP (obj))
     w = obj;
   else if (frame)
     w = FRAME_SELECTED_WINDOW (frame);
@@ -1423,7 +1421,7 @@
     Lisp_Object buffer, frame;
 {
   buffer = Fget_buffer (buffer);
-  if (XTYPE (buffer) == Lisp_Buffer)
+  if (BUFFERP (buffer))
     return window_loop (GET_BUFFER_WINDOW, buffer, 1, frame);
   else
     return Qnil;
@@ -2573,7 +2571,7 @@
     window_scroll (window, next_screen_context_lines - ht, 1);
   else
     {
-      if (XTYPE (n) == Lisp_Cons)
+      if (CONSP (n))
 	n = Fcar (n);
       CHECK_NUMBER (n, 0);
       window_scroll (window, XINT (n), 1);
@@ -2641,7 +2639,7 @@
       SET_FRAME_GARBAGED (XFRAME (WINDOW_FRAME (w)));
       XFASTINT (n) = ht / 2;
     }
-  else if (XTYPE (n) == Lisp_Cons) /* Just C-u. */
+  else if (CONSP (n)) /* Just C-u. */
     {
       XFASTINT (n) = ht / 2;
     }
@@ -2755,7 +2753,7 @@
   (obj)
      Lisp_Object obj;
 {
-  if (XTYPE (obj) == Lisp_Window_Configuration)
+  if (WINDOW_CONFIGURATIONP (obj))
     return Qt;
   return Qnil;
 }
@@ -2775,7 +2773,7 @@
   Lisp_Object frame;
   FRAME_PTR f;
 
-  while (XTYPE (configuration) != Lisp_Window_Configuration)
+  while (!WINDOW_CONFIGURATIONP (configuration))
     {
       configuration = wrong_type_argument (intern ("window-configuration-p"),
 					   configuration);
@@ -2870,7 +2868,7 @@
 
 	  /* If we squirreled away the buffer in the window's height,
 	     restore it now.  */
-	  if (XTYPE (w->height) == Lisp_Buffer)
+	  if (BUFFERP (w->height))
 	    w->buffer = w->height;
 	  w->left = p->left;
 	  w->top = p->top;
@@ -2939,7 +2937,7 @@
 
 #ifdef MULTI_FRAME
       if (NILP (data->focus_frame)
-	  || (XTYPE (data->focus_frame) == Lisp_Frame
+	  || (FRAMEP (data->focus_frame)
 	      && FRAME_LIVE_P (XFRAME (data->focus_frame))))
 	Fredirect_frame_focus (frame, data->focus_frame);
 #endif