diff src/lisp.h @ 1442:89ac471c745c

* lisp.h (CHECK_LIVE_WINDOW): New predicate. (Qlive_window_p): Extern declaration for this.
author Jim Blandy <jimb@redhat.com>
date Mon, 19 Oct 1992 18:41:37 +0000
parents 01d973b5d81b
children eda3ace74d74
line wrap: on
line diff
--- a/src/lisp.h	Mon Oct 19 18:41:06 1992 +0000
+++ b/src/lisp.h	Mon Oct 19 18:41:37 1992 +0000
@@ -601,6 +601,20 @@
 #define CHECK_WINDOW(x, i) \
   { if (XTYPE ((x)) != Lisp_Window) x = wrong_type_argument (Qwindowp, (x)); }
 
+/* This macro rejects windows on the interior of the window tree as
+   "dead", which is what we want; this is an argument-checking macro, and 
+   the user should never get access to interior windows.
+
+   A window of any sort, leaf or interior, is dead iff the buffer,
+   vchild, and hchild members are all nil.  */
+
+#define CHECK_LIVE_WINDOW(x, i)				\
+  {							\
+    if (XTYPE ((x)) != Lisp_Window			\
+	|| NILP (XWINDOW ((x))->buffer))		\
+      x = wrong_type_argument (Qlive_window_p, (x));	\
+  }
+
 #define CHECK_PROCESS(x, i) \
   { if (XTYPE ((x)) != Lisp_Process) x = wrong_type_argument (Qprocessp, (x)); }
 
@@ -1108,7 +1122,7 @@
 extern Lisp_Object Fvertical_motion (), Findent_to (), Fcurrent_column ();
 
 /* defined in window.c */
-extern Lisp_Object Qwindowp;
+extern Lisp_Object Qwindowp, Qlive_window_p;
 extern Lisp_Object Fget_buffer_window ();
 extern Lisp_Object Fsave_window_excursion ();
 extern Lisp_Object Fset_window_configuration (), Fcurrent_window_configuration ();