(read_minibuf_unwind): Clear last_overlay_modified field.
[bpt/emacs.git] / src / lisp.h
index 869b0f3..a524d86 100644 (file)
@@ -15,12 +15,14 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with GNU Emacs; see the file COPYING.  If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
 
 
 /* These are default choices for the types to use.  */
 #ifndef EMACS_INT
 #define EMACS_INT int
+#define BITS_PER_EMACS_INT BITS_PER_INT
 #endif
 #ifndef EMACS_UINT
 #define EMACS_UINT unsigned int
@@ -102,7 +104,7 @@ enum gdb_lisp_params
 {
   gdb_valbits = VALBITS,
   gdb_gctypebits = GCTYPEBITS,
-  gdb_emacs_intbits = sizeof (EMACS_INT) * INTBITS / sizeof (int),
+  gdb_emacs_intbits = sizeof (EMACS_INT) * BITS_PER_CHAR,
 #ifdef DATA_SEG_BITS
   gdb_data_seg_bits = DATA_SEG_BITS
 #else
@@ -226,19 +228,21 @@ Lisp_Object;
 enum pvec_type
 {
   PVEC_NORMAL_VECTOR = 0,
-  PVEC_BUFFER = 0x100,
   PVEC_PROCESS = 0x200,
   PVEC_FRAME = 0x400,
   PVEC_COMPILED = 0x800,
   PVEC_WINDOW = 0x1000,
   PVEC_WINDOW_CONFIGURATION = 0x2000,
   PVEC_SUBR = 0x4000,
-  PVEC_TYPE_MASK = 0x7f00,
-  PVEC_FLAG = PSEUDOVECTOR_FLAG,
+  PVEC_CHAR_TABLE = 0x8000,
+  PVEC_BOOL_VECTOR = 0x10000,
+  PVEC_BUFFER = 0x20000,
+  PVEC_TYPE_MASK = 0x3fe00,
+  PVEC_FLAG = PSEUDOVECTOR_FLAG
 };
 
 /* For convenience, we also store the number of elements in these bits.  */
-#define PSEUDOVECTOR_SIZE_MASK 0xff
+#define PSEUDOVECTOR_SIZE_MASK 0x1ff
 
 #endif /* NO_UNION_TYPE */
 \f
@@ -269,7 +273,7 @@ enum pvec_type
 /* Extract the value of a Lisp_Object as a signed integer.  */
 
 #ifndef XINT   /* Some machines need to do this differently.  */
-#define XINT(a) (((a) << (INTBITS-VALBITS)) >> (INTBITS-VALBITS))
+#define XINT(a) (((a) << (BITS_PER_INT-VALBITS)) >> (BITS_PER_INT-VALBITS))
 #endif
 
 /* Extract the value as an unsigned integer.  This is a basis
@@ -304,6 +308,11 @@ extern int pure_size;
    ((var) = ((EMACS_INT)(type) << VALBITS) + ((EMACS_INT) (ptr) & VALMASK))
 #endif
 
+/* Convert a C integer into a Lisp_Object integer.  */
+
+#define make_number(N)         \
+  ((((EMACS_INT) (N)) & VALMASK) | ((EMACS_INT) Lisp_Int) << VALBITS)
+
 /* During garbage collection, XGCTYPE must be used for extracting types
  so that the mark bit is ignored.  XMARKBIT accesses the markbit.
  Markbits are used only in particular slots of particular structure types.
@@ -314,7 +323,7 @@ extern int pure_size;
 #define XGCTYPE(a) ((enum Lisp_Type) (((a) >> VALBITS) & GCTYPEMASK))
 #endif
 
-#if VALBITS + GCTYPEBITS == INTBITS - 1
+#if VALBITS + GCTYPEBITS == BITS_PER_EMACS_INT - 1
 /* Make XMARKBIT faster if mark bit is sign bit.  */
 #ifndef XMARKBIT
 #define XMARKBIT(a) ((a) < 0)
@@ -352,7 +361,7 @@ extern int pure_size;
 
 #ifdef EXPLICIT_SIGN_EXTEND
 /* Make sure we sign-extend; compilers have been known to fail to do so.  */
-#define XINT(a) (((a).i << (INTBITS-VALBITS)) >> (INTBITS-VALBITS))
+#define XINT(a) (((a).i << (BITS_PER_INT-VALBITS)) >> (BITS_PER_INT-VALBITS))
 #else
 #define XINT(a) ((a).s.val)
 #endif /* EXPLICIT_SIGN_EXTEND */
@@ -402,6 +411,8 @@ extern int pure_size;
 #define XWINDOW(a) ((struct window *) XPNTR(a))
 #define XSUBR(a) ((struct Lisp_Subr *) XPNTR(a))
 #define XBUFFER(a) ((struct buffer *) XPNTR(a))
+#define XCHAR_TABLE(a) ((struct Lisp_Char_Table *) XPNTR(a))
+#define XBOOL_VECTOR(a) ((struct Lisp_Bool_Vector *) XPNTR(a))
 
 
 /* Construct a Lisp_Object from a value or address.  */
@@ -427,6 +438,8 @@ extern int pure_size;
 #define XSETSUBR(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_SUBR))
 #define XSETCOMPILED(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_COMPILED))
 #define XSETBUFFER(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_BUFFER))
+#define XSETCHAR_TABLE(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_CHAR_TABLE))
+#define XSETBOOL_VECTOR(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_BOOL_VECTOR))
 \f
 #ifdef USE_TEXT_PROPERTIES
 /* Basic data type for use of intervals.  See the macros in intervals.h.  */
@@ -503,6 +516,21 @@ struct Lisp_Cons
     Lisp_Object car, cdr;
   };
 
+/* Take the car or cdr of something known to be a cons cell.  */
+#define XCAR(c) (XCONS ((c))->car)
+#define XCDR(c) (XCONS ((c))->cdr)
+
+/* Take the car or cdr of something whose type is not known.  */
+#define CAR(c)                                 \
+ (CONSP ((c)) ? XCAR ((c))                     \
+  : NILP ((c)) ? Qnil                          \
+  : wrong_type_argument (Qlistp, (c)))
+
+#define CDR(c)                                 \
+ (CONSP ((c)) ? XCDR ((c))                     \
+  : NILP ((c)) ? Qnil                          \
+  : wrong_type_argument (Qlistp, (c)))
+
 /* Like a cons, but records info on where the text lives that it was read from */
 /* This is not really in use now */
 
@@ -523,9 +551,10 @@ struct Lisp_String
   };
 
 /* If a struct is made to look like a vector, this macro returns the length
-   of that vector.  */
-#define VECSIZE(type) ((sizeof (type) - (sizeof (struct Lisp_Vector)   \
-                                        - sizeof (Lisp_Object)))       \
+   of the shortest vector that would hold that struct.  */
+#define VECSIZE(type) ((sizeof (type) - (sizeof (struct Lisp_Vector)  \
+                                         - sizeof (Lisp_Object))      \
+                        + sizeof(Lisp_Object) - 1) /* round up */     \
                       / sizeof (Lisp_Object))
 
 struct Lisp_Vector
@@ -535,6 +564,59 @@ struct Lisp_Vector
     Lisp_Object contents[1];
   };
 
+/* A char table is a kind of vectorlike, with contents are like a vector
+   but with a few other slots.  For some purposes, it makes sense
+   to handle a chartable with type struct Lisp_Vector.  */
+
+/* This is the number of slots that apply to characters
+   or character sets.  */
+#define CHAR_TABLE_ORDINARY_SLOTS 256
+
+/* This is the number of slots that every char table must have.
+   This counts the ordinary slots and the parent and defalt slots.  */
+#define CHAR_TABLE_STANDARD_SLOTS (256+3)
+
+/* Return the number of "extra" slots in the char table CT.  */
+
+#define CHAR_TABLE_EXTRA_SLOTS(CT)     \
+  (((CT)->size & PSEUDOVECTOR_SIZE_MASK) - CHAR_TABLE_STANDARD_SLOTS)
+
+struct Lisp_Char_Table
+  {
+    /* This is the vector's size field, which also holds the
+       pseudovector type information.  It holds the size, too.
+       The size counts the defalt and parent slots.  */
+    EMACS_INT size;
+    struct Lisp_Vector *next;
+    Lisp_Object contents[CHAR_TABLE_ORDINARY_SLOTS];
+    /* This holds a default value,
+       which is used whenever the value for a specific character is nil.  */
+    Lisp_Object defalt;
+    /* This points to another char table, which we inherit from
+       when the value for a specific character is nil.
+       The `defalt' slot takes precedence over this.  */
+    Lisp_Object parent;
+    /* This should be a symbol which says what kind of use
+       this char-table is meant for.
+       Typically now the values can be `syntax-table' and `display-table'.  */
+    Lisp_Object purpose;
+    /* These hold additional data.  */
+    Lisp_Object extras[1];
+  };
+
+/* A boolvector is a kind of vectorlike, with contents are like a string.  */
+struct Lisp_Bool_Vector
+  {
+    /* This is the vector's size field.  It doesn't have the real size,
+       just the subtype information.  */
+    EMACS_INT vector_size;
+    struct Lisp_Vector *next;
+    /* This is the size in bits.  */
+    EMACS_INT size;
+    /* This contains the actual bits, packed into bytes.  */
+    unsigned char data[1];
+  };
+
 /* In a symbol, the markbit of the plist is used as the gc mark bit */
 
 struct Lisp_Symbol
@@ -543,6 +625,7 @@ struct Lisp_Symbol
     Lisp_Object value;
     Lisp_Object function;
     Lisp_Object plist;
+    Lisp_Object obarray;
     struct Lisp_Symbol *next;  /* -> next symbol in this obarray bucket */
   };
 
@@ -576,16 +659,16 @@ struct Lisp_Free
 
 /* In a marker, the markbit of the chain field is used as the gc mark bit */
 struct Lisp_Marker
-  {
-    int type : 16;     /* = Lisp_Misc_Marker */
-    int spacer : 15;
-    /* 1 means normal insertion at the marker's position
-       leaves the marker after the inserted text.  */
-    int insertion_type : 1;
-    struct buffer *buffer;
-    Lisp_Object chain;
-    int bufpos;
-  };
+{
+  int type : 16;               /* = Lisp_Misc_Marker */
+  int spacer : 15;
+  /* 1 means normal insertion at the marker's position
+     leaves the marker after the inserted text.  */
+  unsigned int insertion_type : 1;
+  struct buffer *buffer;
+  Lisp_Object chain;
+  int bufpos;
+};
 
 /* Forwarding pointer to an int variable.
    This is allowed only in the value cell of a symbol,
@@ -899,19 +982,12 @@ typedef unsigned char UCHAR;
 #define GC_COMPILEDP(x) GC_PSEUDOVECTORP (x, PVEC_COMPILED)
 #define BUFFERP(x) PSEUDOVECTORP (x, PVEC_BUFFER)
 #define GC_BUFFERP(x) GC_PSEUDOVECTORP (x, PVEC_BUFFER)
-
-#ifdef MULTI_FRAME
+#define CHAR_TABLE_P(x) PSEUDOVECTORP (x, PVEC_CHAR_TABLE)
+#define GC_CHAR_TABLE_P(x) GC_PSEUDOVECTORP (x, PVEC_CHAR_TABLE)
+#define BOOL_VECTOR_P(x) PSEUDOVECTORP (x, PVEC_BOOL_VECTOR)
+#define GC_BOOL_VECTOR_P(x) GC_PSEUDOVECTORP (x, PVEC_BOOL_VECTOR)
 #define FRAMEP(x) PSEUDOVECTORP (x, PVEC_FRAME)
 #define GC_FRAMEP(x) GC_PSEUDOVECTORP (x, PVEC_FRAME)
-#else
-#ifdef HAVE_MOUSE
-/* We could use this in the !HAVE_MOUSE case also, but we prefer a compile-time
-   error message in case FRAMEP is used.  */
-#define FRAMEP(x) (EQ (x, Fselected_frame ()))
-#define GC_FRAMEP(x) (GC_EQ (x, Fselected_frame ()))
-#endif
-#endif
-
 \f
 #define EQ(x, y) (XFASTINT (x) == XFASTINT (y))
 #define GC_EQ(x, y) (XGCTYPE (x) == XGCTYPE (y) && XPNTR (x) == XPNTR (y))
@@ -928,9 +1004,18 @@ typedef unsigned char UCHAR;
 #define CHECK_SYMBOL(x, i) \
   do { if (!SYMBOLP ((x))) x = wrong_type_argument (Qsymbolp, (x)); } while (0)
 
+#define CHECK_CHAR_TABLE(x, i) \
+  do { if (!CHAR_TABLE_P ((x)))        \
+        x = wrong_type_argument (Qchar_table_p, (x)); } while (0)
+
 #define CHECK_VECTOR(x, i) \
   do { if (!VECTORP ((x))) x = wrong_type_argument (Qvectorp, (x)); } while (0)
 
+#define CHECK_VECTOR_OR_CHAR_TABLE(x, i)                               \
+  do { if (!VECTORP ((x)) && !CHAR_TABLE_P ((x)))                      \
+        x = wrong_type_argument (Qvector_or_char_table_p, (x));        \
+     } while (0)
+
 #define CHECK_BUFFER(x, i) \
   do { if (!BUFFERP ((x))) x = wrong_type_argument (Qbufferp, (x)); } while (0)
 
@@ -1155,42 +1240,39 @@ extern char *stack_bottom;
 /* 1 if CH is upper case.  */
 
 #define UPPERCASEP(CH) \
-  (XSTRING (current_buffer->downcase_table)->data[CH] != (CH))
+  (XCHAR_TABLE (current_buffer->downcase_table)->contents[CH] != (CH))
 
 /* 1 if CH is lower case.  */
 
 #define LOWERCASEP(CH) \
   (!UPPERCASEP (CH) \
-   && XSTRING (current_buffer->upcase_table)->data[CH] != (CH))
+   && XCHAR_TABLE (current_buffer->upcase_table)->contents[CH] != (CH))
 
 /* 1 if CH is neither upper nor lower case.  */
 
-#define NOCASEP(CH) (XSTRING (current_buffer->upcase_table)->data[CH] == (CH))
+#define NOCASEP(CH) \
+  (XCHAR_TABLE (current_buffer->upcase_table)->contents[CH] == (CH))
 
 /* Upcase a character, or make no change if that cannot be done.  */
 
 #define UPCASE(CH) \
-  (XSTRING (current_buffer->downcase_table)->data[CH] == (CH) \
+  (XCHAR_TABLE (current_buffer->downcase_table)->contents[CH] == (CH) \
    ? UPCASE1 (CH) : (CH))
 
 /* Upcase a character known to be not upper case.  */
 
-#define UPCASE1(CH) (XSTRING (current_buffer->upcase_table)->data[CH])
+#define UPCASE1(CH) (XCHAR_TABLE (current_buffer->upcase_table)->contents[CH])
 
 /* Downcase a character, or make no change if that cannot be done.  */
 
-#define DOWNCASE(CH) (XSTRING (current_buffer->downcase_table)->data[CH])
+#define DOWNCASE(CH) \
+  (XCHAR_TABLE (current_buffer->downcase_table)->contents[CH])
 
 /* Current buffer's map from characters to lower-case characters.  */
 
-#define DOWNCASE_TABLE XSTRING (current_buffer->downcase_table)->data
-
-/* Table mapping each char to the next char with the same lowercase version.
-   This mapping is a no-op only for characters that don't have case.  */
-#define UPCASE_TABLE XSTRING (current_buffer->upcase_table)->data
+#define DOWNCASE_TABLE XCHAR_TABLE (current_buffer->downcase_table)->contents
 
-extern Lisp_Object Vascii_downcase_table, Vascii_upcase_table;
-extern Lisp_Object Vascii_canon_table, Vascii_eqv_table;
+extern Lisp_Object Vascii_downcase_table;
 \f
 /* Number of bytes of structure consed since last GC.  */
 
@@ -1288,6 +1370,7 @@ extern Lisp_Object Qsymbolp, Qlistp, Qconsp;
 extern Lisp_Object Qstringp, Qarrayp, Qsequencep, Qbufferp;
 extern Lisp_Object Qchar_or_string_p, Qmarkerp, Qvectorp;
 extern Lisp_Object Qinteger_or_marker_p, Qnumber_or_marker_p;
+extern Lisp_Object Qchar_table_p, Qvector_or_char_table_p;
 extern Lisp_Object Qboundp, Qfboundp;
 extern Lisp_Object Qbuffer_or_string_p;
 extern Lisp_Object Qcdr;
@@ -1316,6 +1399,7 @@ extern Lisp_Object indirect_function (), Findirect_function ();
 extern Lisp_Object Ffset (), Fsetplist ();
 extern Lisp_Object Fsymbol_value (), find_symbol_value (), Fset ();
 extern Lisp_Object Fdefault_value (), Fset_default (), Fdefault_boundp ();
+extern Lisp_Object Fmake_local_variable ();
 
 extern Lisp_Object Faref (), Faset ();
 
@@ -1329,7 +1413,6 @@ extern Lisp_Object Flsh (), Fash ();
 
 extern Lisp_Object Fadd1 (), Fsub1 ();
 
-extern Lisp_Object make_number ();
 extern Lisp_Object   long_to_cons ();
 extern unsigned long cons_to_long ();
 extern void args_out_of_range ();
@@ -1354,7 +1437,7 @@ extern Lisp_Object Fforward_word ();
 extern Lisp_Object Qstring_lessp;
 extern Lisp_Object Vfeatures;
 extern Lisp_Object Fidentity (), Frandom ();
-extern Lisp_Object Flength ();
+extern Lisp_Object Flength (), Fsafe_length ();
 extern Lisp_Object Fappend (), Fconcat (), Fvconcat (), Fcopy_sequence ();
 extern Lisp_Object Fsubstring ();
 extern Lisp_Object Fnth (), Fnthcdr (), Fmemq (), Fassq (), Fassoc ();
@@ -1366,6 +1449,8 @@ extern Lisp_Object Ffeaturep (), Frequire () , Fprovide ();
 extern Lisp_Object concat2 (), nconc2 ();
 extern Lisp_Object assq_no_quit ();
 extern Lisp_Object Fcopy_alist ();
+extern Lisp_Object Fplist_get ();
+extern Lisp_Object Fset_char_table_parent ();
 
 /* Defined in insdel.c */
 extern void move_gap ();
@@ -1387,6 +1472,10 @@ extern void prepare_to_modify_buffer ();
 extern void signal_before_change ();
 extern void signal_after_change ();
 
+/* Defined in dispnew.c */
+extern Lisp_Object Fding (), Fredraw_display ();
+extern Lisp_Object Fsleep_for ();
+
 /* Defined in xdisp.c */
 extern Lisp_Object Vmessage_log_max;
 extern void message ();
@@ -1408,6 +1497,8 @@ extern Lisp_Object Fpurecopy (), make_pure_string ();
 extern Lisp_Object pure_cons (), make_pure_vector ();
 extern Lisp_Object Fgarbage_collect ();
 extern Lisp_Object Fmake_byte_code ();
+extern Lisp_Object Fmake_bool_vector (), Fmake_char_table ();
+extern Lisp_Object Qchar_table_extra_slots;
 extern struct Lisp_Vector *allocate_vectorlike ();
 extern int gc_in_progress;
 
@@ -1415,6 +1506,7 @@ extern int gc_in_progress;
 extern Lisp_Object Vprin1_to_string_buffer;
 extern Lisp_Object Fprin1 (), Fprin1_to_string (), Fprinc ();
 extern Lisp_Object Fterpri (), Fprint ();
+extern Lisp_Object Ferror_message_string ();
 extern Lisp_Object Vstandard_output, Qstandard_output;
 extern Lisp_Object Qexternal_debugging_output;
 extern void temp_output_buffer_setup (), temp_output_buffer_show ();
@@ -1441,10 +1533,17 @@ extern Lisp_Object Vinhibit_quit, Qinhibit_quit, Vquit_flag;
 extern Lisp_Object Vmocklisp_arguments, Qmocklisp, Qmocklisp_arguments;
 extern Lisp_Object Vautoload_queue;
 extern Lisp_Object Vdebug_on_error;
-/* To run a normal hook, do
+/* To run a normal hook, use the appropriate function from the list below.
+   The calling convention:
+
    if (!NILP (Vrun_hooks))
-     call1 (Vrun_hooks, Qmy_funny_hook);  */
+     call1 (Vrun_hooks, Qmy_funny_hook);
+
+   should no longer be used.  */
 extern Lisp_Object Vrun_hooks;
+extern Lisp_Object Frun_hooks (), Frun_hook_with_args ();
+extern Lisp_Object Frun_hook_with_args_until_success ();
+extern Lisp_Object Frun_hook_with_args_until_failure ();
 extern Lisp_Object Fand (), For (), Fif (), Fprogn (), Fprog1 (), Fprog2 ();
 extern Lisp_Object Fsetq (), Fquote ();
 extern Lisp_Object Fuser_variable_p (), Finteractive_p ();
@@ -1473,7 +1572,10 @@ extern Lisp_Object Fpoint_min_marker (), Fpoint_max_marker ();
 extern Lisp_Object Fpoint_min (), Fpoint_max ();
 extern Lisp_Object Fpoint (), Fpoint_marker (), Fmark_marker ();
 extern Lisp_Object Ffollowing_char (), Fprevious_char (), Fchar_after ();
-extern Lisp_Object Finsert ();
+extern Lisp_Object Finsert (), Finsert_and_inherit ();
+extern Lisp_Object Finsert_before_markers ();
+extern Lisp_Object Finsert_buffer_substring ();
+extern Lisp_Object Finsert_char ();
 extern Lisp_Object Feolp (), Feobp (), Fbolp (), Fbobp ();
 extern Lisp_Object Fformat (), format1 ();
 extern Lisp_Object make_buffer_string (), Fbuffer_substring ();
@@ -1496,6 +1598,10 @@ extern Lisp_Object Fbarf_if_buffer_read_only ();
 extern Lisp_Object Fcurrent_buffer (), Fswitch_to_buffer (), Fpop_to_buffer ();
 extern Lisp_Object Fother_buffer ();
 extern Lisp_Object Foverlay_get ();
+extern Lisp_Object Fbuffer_modified_p (), Fset_buffer_modified_p ();
+extern Lisp_Object Fkill_buffer (), Fkill_all_local_variables ();
+extern Lisp_Object Fbuffer_disable_undo (), Fbuffer_enable_undo ();
+extern Lisp_Object Ferase_buffer ();
 extern Lisp_Object Qoverlayp;
 extern struct buffer *all_buffers;
 
@@ -1520,6 +1626,8 @@ extern Lisp_Object Ffile_name_directory ();
 extern Lisp_Object expand_and_dir_to_file ();
 extern Lisp_Object Ffile_accessible_directory_p ();
 extern Lisp_Object Funhandled_file_name_directory ();
+extern Lisp_Object Ffile_directory_p ();
+extern Lisp_Object Fwrite_region ();
 
 /* Defined in abbrev.c */
 
@@ -1542,24 +1650,26 @@ extern Lisp_Object Fread_variable (), Fread_buffer (), Fread_key_sequence ();
 extern Lisp_Object Fread_minibuffer (), Feval_minibuffer ();
 extern Lisp_Object Fread_string (), Fread_file_name ();
 extern Lisp_Object Fread_no_blanks_input ();
+extern Lisp_Object get_minibuffer ();
 
 /* Defined in callint.c */
 
-extern int current_prefix_partial;
-extern Lisp_Object Qminus, Qplus, Vcurrent_prefix_arg, Vprefix_arg;
+extern Lisp_Object Qminus, Qplus, Vcurrent_prefix_arg;
 extern Lisp_Object Vcommand_history;
-extern Lisp_Object Qcall_interactively;
+extern Lisp_Object Qcall_interactively, Qmouse_leave_buffer_hook;
 extern Lisp_Object Fcall_interactively ();
 extern Lisp_Object Fprefix_numeric_value ();
-extern Lisp_Object Funiversal_argument ();
-extern Lisp_Object Fnegative_argument ();
-extern Lisp_Object Fdigit_argument ();
-extern void clear_prefix_arg ();
-extern void finalize_prefix_arg ();
 
 /* defined in casefiddle.c */
 
 extern Lisp_Object Fdowncase (), Fupcase (), Fcapitalize ();
+extern Lisp_Object Fupcase_region ();
+extern Lisp_Object Fupcase_initials (), Fupcase_initials_region ();
+
+/* defined in casetab.c */
+
+extern Lisp_Object Fset_case_table ();
+extern Lisp_Object Fset_standard_case_table ();
 
 /* defined in keyboard.c */
 
@@ -1569,6 +1679,7 @@ extern Lisp_Object Fdiscard_input (), Frecursive_edit ();
 extern Lisp_Object Fcommand_execute (), Finput_pending_p ();
 extern Lisp_Object menu_bar_items ();
 extern Lisp_Object Qvertical_scroll_bar;
+extern Lisp_Object Fevent_convert_list ();
 #ifdef MULTI_KBOARD
 extern void delete_kboard ();
 #endif
@@ -1577,10 +1688,11 @@ extern void delete_kboard ();
 
 extern Lisp_Object Qkeymap, Qmenu_bar;
 extern Lisp_Object current_global_map;
+extern Lisp_Object Fdefine_key ();
 extern Lisp_Object Fkey_description (), Fsingle_key_description ();
 extern Lisp_Object Fwhere_is_internal ();
 extern Lisp_Object access_keymap (), store_in_keymap ();
-extern Lisp_Object get_keyelt (), get_keymap ();
+extern Lisp_Object get_keyelt (), get_keymap (), get_keymap_1 ();
 extern void describe_map_tree ();
 
 /* defined in indent.c */
@@ -1588,25 +1700,30 @@ extern Lisp_Object Fvertical_motion (), Findent_to (), Fcurrent_column ();
 
 /* defined in window.c */
 extern Lisp_Object Qwindowp, Qwindow_live_p;
+extern Lisp_Object Fselected_window ();
 extern Lisp_Object Fget_buffer_window ();
 extern Lisp_Object Fsave_window_excursion ();
 extern Lisp_Object Fset_window_configuration (), Fcurrent_window_configuration ();
 extern Lisp_Object Fcoordinates_in_window_p ();
 extern Lisp_Object Fwindow_at ();
+extern Lisp_Object Fpos_visible_in_window_p ();
 extern int window_internal_height (), window_internal_width ();
+extern Lisp_Object Frecenter ();
+extern Lisp_Object Fscroll_other_window ();
+extern Lisp_Object Fset_window_start ();
 
 /* defined in frame.c */
 extern Lisp_Object Qvisible;
 extern void store_frame_param (), store_in_alist ();
+extern Lisp_Object do_switch_frame ();
 extern Lisp_Object get_frame_param();
 extern Lisp_Object frame_buffer_predicate ();
 extern Lisp_Object Fframep ();
 extern Lisp_Object Fselect_frame ();
-extern Lisp_Object Ffocus_frame ();
-extern Lisp_Object Funfocus_frame ();
 extern Lisp_Object Fselected_frame ();
 extern Lisp_Object Fwindow_frame ();
 extern Lisp_Object Fframe_root_window ();
+extern Lisp_Object Fframe_first_window ();
 extern Lisp_Object Fframe_selected_window ();
 extern Lisp_Object Fframe_list ();
 extern Lisp_Object Fnext_frame ();
@@ -1628,9 +1745,8 @@ extern Lisp_Object Fset_frame_height ();
 extern Lisp_Object Fset_frame_width ();
 extern Lisp_Object Fset_frame_size ();
 extern Lisp_Object Fset_frame_position ();
-#ifndef HAVE_X11
-extern Lisp_Object Frubber_band_rectangle ();
-#endif /* HAVE_X11 */
+extern Lisp_Object Fraise_frame ();
+extern Lisp_Object Fredirect_frame_focus ();
 
 /* defined in emacs.c */
 extern Lisp_Object decode_env_path ();
@@ -1648,6 +1764,7 @@ extern int running_asynch_code;
 extern Lisp_Object Fget_process (), Fget_buffer_process (), Fprocessp ();
 extern Lisp_Object Fprocess_status (), Fkill_process ();
 extern Lisp_Object Fprocess_send_eof ();
+extern Lisp_Object Fwaiting_for_user_input_p ();
 extern Lisp_Object Qprocessp;
 
 /* defined in callproc.c */
@@ -1669,17 +1786,27 @@ extern Lisp_Object Qexecute_kbd_macro;
 extern Lisp_Object Fexecute_kbd_macro ();
 
 /* defined in undo.c */
+extern Lisp_Object Qinhibit_read_only;
 extern Lisp_Object Fundo_boundary ();
 extern Lisp_Object truncate_undo_list ();
 
 /* defined in textprop.c */
 extern Lisp_Object Qmodification_hooks;
-extern Lisp_Object Qrear_nonsticky;
+extern Lisp_Object Qrear_nonsticky, Qfont;
 extern Lisp_Object Qinsert_in_front_hooks, Qinsert_behind_hooks;
 extern Lisp_Object Fnext_property_change ();
 extern Lisp_Object Fnext_single_property_change ();
 extern Lisp_Object Fprevious_single_property_change ();
+extern Lisp_Object Fget_text_property (), Fput_text_property ();
+extern Lisp_Object Fset_text_properties ();
+extern Lisp_Object Ftext_property_not_all ();
+
+/* defined in intervals.c */
+extern Lisp_Object get_local_map ();
 
+/* defined in xmenu.c */
+extern Lisp_Object Fx_popup_menu (), Fx_popup_dialog ();
+\f
 /* Nonzero means Emacs has already been initialized.
    Used during startup to detect startup of dumped Emacs.  */
 extern int initialized;
@@ -1701,6 +1828,10 @@ extern void init_system_name ();
    in addition to a device separator.  Default the path separator
    to '/', and don't test for a device separator in IS_ANY_SEP.  */
 
+#ifdef WINDOWSNT
+extern Lisp_Object Vdirectory_sep_char;
+#endif
+
 #ifndef DIRECTORY_SEP
 #define DIRECTORY_SEP '/'
 #endif