Revert 2008-01-13 change: this is a generated file.
[bpt/emacs.git] / src / lisp.h
index 74957e9..5788f15 100644 (file)
@@ -1,6 +1,7 @@
 /* Fundamental definitions for GNU Emacs Lisp interpreter.
    Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 1998, 1999, 2000,
-                 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+                 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+                 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -84,6 +85,20 @@ extern void die P_((const char *, const char *, int)) NO_RETURN;
 
 #ifdef ENABLE_CHECKING
 
+/* The suppress_checking variable is initialized to 0 in alloc.c.  Set
+   it to 1 using a debugger to temporarily disable aborting on
+   detected internal inconsistencies or error conditions.
+
+   Testing suppress_checking after the supplied condition ensures that
+   the side effects produced by CHECK will be consistent, independent
+   of whether ENABLE_CHECKING is defined, or whether the checks are
+   suppressed at run time.
+
+   In some cases, a good compiler may be able to optimize away the
+   CHECK macro altogether, e.g., if XSTRING (x) uses CHECK to test
+   STRINGP (x), but a particular use of XSTRING is invoked only after
+   testing that STRINGP (x) is true, making the test redundant.  */
+
 #define CHECK(check,msg) (((check) || suppress_checking                \
                           ? (void) 0                           \
                           : die ((msg), __FILE__, __LINE__)),  \
@@ -334,7 +349,8 @@ enum pvec_type
   PVEC_BUFFER = 0x20000,
   PVEC_HASH_TABLE = 0x40000,
   PVEC_TERMINAL = 0x80000,
-  PVEC_TYPE_MASK = 0xffe00
+  PVEC_OTHER = 0x100000,
+  PVEC_TYPE_MASK = 0x1ffe00
 
 #if 0 /* This is used to make the value of PSEUDOVECTOR_FLAG available to
         GDB.  It doesn't work on OS Alpha.  Moved to a variable in
@@ -521,17 +537,20 @@ extern size_t pure_size;
 /* Misc types.  */
 
 #define XMISC(a)   ((union Lisp_Misc *) XPNTR(a))
-#define XMISCANY(a) (&(XMISC(a)->u_any))
+#define XMISCANY(a)    (eassert (MISCP (a)), &(XMISC(a)->u_any))
 #define XMISCTYPE(a)   (XMISCANY (a)->type)
-#define XMARKER(a) (&(XMISC(a)->u_marker))
-#define XINTFWD(a) (&(XMISC(a)->u_intfwd))
-#define XBOOLFWD(a) (&(XMISC(a)->u_boolfwd))
-#define XOBJFWD(a) (&(XMISC(a)->u_objfwd))
-#define XBUFFER_OBJFWD(a) (&(XMISC(a)->u_buffer_objfwd))
-#define XBUFFER_LOCAL_VALUE(a) (&(XMISC(a)->u_buffer_local_value))
-#define XOVERLAY(a) (&(XMISC(a)->u_overlay))
-#define XKBOARD_OBJFWD(a) (&(XMISC(a)->u_kboard_objfwd))
-#define XSAVE_VALUE(a) (&(XMISC(a)->u_save_value))
+#define XMARKER(a)     (eassert (MARKERP (a)), &(XMISC(a)->u_marker))
+#define XINTFWD(a)     (eassert (INTFWDP (a)), &(XMISC(a)->u_intfwd))
+#define XBOOLFWD(a)    (eassert (BOOLFWDP (a)), &(XMISC(a)->u_boolfwd))
+#define XOBJFWD(a)     (eassert (OBJFWDP (a)), &(XMISC(a)->u_objfwd))
+#define XOVERLAY(a)    (eassert (OVERLAYP (a)), &(XMISC(a)->u_overlay))
+#define XSAVE_VALUE(a) (eassert (SAVE_VALUEP (a)), &(XMISC(a)->u_save_value))
+#define XBUFFER_OBJFWD(a) \
+  (eassert (BUFFER_OBJFWDP (a)), &(XMISC(a)->u_buffer_objfwd))
+#define XBUFFER_LOCAL_VALUE(a) \
+  (eassert (BUFFER_LOCAL_VALUEP (a)), &(XMISC(a)->u_buffer_local_value))
+#define XKBOARD_OBJFWD(a) \
+  (eassert (KBOARD_OBJFWDP (a)), &(XMISC(a)->u_kboard_objfwd))
 
 /* Pseudovector types.  */
 
@@ -1208,6 +1227,7 @@ struct Lisp_Buffer_Objfwd
     int type : 16;     /* = Lisp_Misc_Buffer_Objfwd */
     unsigned gcmarkbit : 1;
     int spacer : 15;
+    Lisp_Object slottype; /* Qnil, Lisp_Int, Lisp_Symbol, or Lisp_String.  */
     int offset;
   };
 
@@ -1405,7 +1425,7 @@ typedef unsigned char UCHAR;
    All callers should assure that at least this size of memory is
    allocated at the place pointed by the second argument.
 
-   Thers are 6 modifiers, each consumes 2 chars.
+   There are 6 modifiers, each consumes 2 chars.
    The octal form of a character code consumes
    (1 + CHARACTERBITS / 3 + 1) chars (including backslash at the head).
    We need one more byte for string terminator `\0'.  */
@@ -1494,10 +1514,9 @@ typedef unsigned char UCHAR;
 #define GC_BUFFER_OBJFWDP(x) (GC_MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Buffer_Objfwd)
 #define BUFFER_LOCAL_VALUEP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Buffer_Local_Value)
 #define GC_BUFFER_LOCAL_VALUEP(x) (GC_MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Buffer_Local_Value)
-#define SOME_BUFFER_LOCAL_VALUEP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Some_Buffer_Local_Value)
-#define GC_SOME_BUFFER_LOCAL_VALUEP(x) (GC_MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Some_Buffer_Local_Value)
 #define KBOARD_OBJFWDP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Kboard_Objfwd)
 #define GC_KBOARD_OBJFWDP(x) (GC_MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Kboard_Objfwd)
+#define SAVE_VALUEP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Save_Value)
 
 
 /* True if object X is a pseudovector whose code is CODE.  */
@@ -2590,7 +2609,11 @@ EXFUN (Fmake_char_table, 2);
 extern Lisp_Object make_sub_char_table P_ ((Lisp_Object));
 extern Lisp_Object Qchar_table_extra_slots;
 extern struct Lisp_Vector *allocate_vector P_ ((EMACS_INT));
-extern struct Lisp_Vector *allocate_other_vector P_ ((EMACS_INT));
+extern struct Lisp_Vector *allocate_pseudovector P_ ((int memlen, int lisplen, EMACS_INT tag));
+#define ALLOCATE_PSEUDOVECTOR(typ,field,tag)                           \
+  ((typ*)                                                              \
+   allocate_pseudovector                                               \
+       (VECSIZE (typ), PSEUDOVECSIZE (typ, field), tag))
 extern struct Lisp_Hash_Table *allocate_hash_table P_ ((void));
 extern struct window *allocate_window P_ ((void));
 extern struct frame *allocate_frame P_ ((void));
@@ -3168,6 +3191,7 @@ EXFUN (Fnext_single_property_change, 4);
 EXFUN (Fnext_single_char_property_change, 4);
 EXFUN (Fprevious_single_property_change, 4);
 EXFUN (Fput_text_property, 5);
+EXFUN (Fget_text_property, 3);
 EXFUN (Fprevious_char_property_change, 2);
 EXFUN (Fnext_char_property_change, 2);
 extern void report_interval_modification P_ ((Lisp_Object, Lisp_Object));
@@ -3238,7 +3262,7 @@ extern void syms_of_dired P_ ((void));
 
 /* Defined in term.c */
 extern void syms_of_term P_ ((void));
-extern void fatal () NO_RETURN;
+extern void fatal P_ ((const char *msgid, ...)) NO_RETURN;
 
 /* Defined in terminal.c */
 extern void syms_of_terminal P_ ((void));
@@ -3301,6 +3325,11 @@ extern void syms_of_mac P_ ((void));
 extern void init_mac_osx_environment P_ ((void));
 #endif /* MAC_OSX */
 #endif /* MAC_OS */
+
+#ifdef HAVE_MENUS
+/* Defined in (x|mac|w32)fns.c...  */
+extern int have_menus_p P_ ((void));
+#endif
 \f
 /* Nonzero means Emacs has already been initialized.
    Used during startup to detect startup of dumped Emacs.  */