]> code.delx.au - gnu-emacs/blobdiff - src/lisp.h
(ibuffer-update-mode-name): Substitute "view time" instead of
[gnu-emacs] / src / lisp.h
index ab4da2df5e3086409aa679f554602decfa129322..cc464b95e92e888507704b433ba0579325b56136 100644 (file)
@@ -162,26 +162,6 @@ enum Lisp_Misc_Type
 #define GCTYPEBITS 3
 #endif
 
-#if 0  /* This doesn't work on some systems that don't allow enumerators
-         > INT_MAX, and it won't work for long long EMACS_INT.  These
-         values are now found in emacs.c as EMACS_INT variables.  */
-
-/* Make these values available in GDB, which sees enums but not macros.  */
-
-enum gdb_lisp_params
-{
-  gdb_valbits = VALBITS,
-  gdb_gctypebits = GCTYPEBITS,
-  gdb_emacs_intbits = sizeof (EMACS_INT) * BITS_PER_CHAR,
-#ifdef DATA_SEG_BITS
-  gdb_data_seg_bits = DATA_SEG_BITS
-#else
-  gdb_data_seg_bits = 0
-#endif
-};
-
-#endif /* 0 */
-
 #ifndef NO_UNION_TYPE
 
 #ifndef WORDS_BIG_ENDIAN
@@ -248,6 +228,16 @@ Lisp_Object;
 
 #endif /* WORDS_BIG_ENDIAN */
 
+#ifdef __GNUC__
+static __inline__ Lisp_Object
+LISP_MAKE_RVALUE (Lisp_Object o)
+{
+    return o;
+}
+#else
+#define LISP_MAKE_RVALUE(o) (o) /* XXX - keeps arg as rvalue.  */
+#endif
+
 #endif /* NO_UNION_TYPE */
 
 
@@ -255,6 +245,7 @@ Lisp_Object;
 
 #ifdef NO_UNION_TYPE
 #define Lisp_Object EMACS_INT
+#define LISP_MAKE_RVALUE(o) (0+(o))
 #endif /* NO_UNION_TYPE */
 
 #ifndef VALMASK
@@ -582,7 +573,7 @@ struct interval
      The first four are duplicates for things which can be on the list,
      for purposes of speed.  */
 
-  unsigned int write_protect : 1;    /* Non-zero means can't modify.  */
+  unsigned int write_protect : 1;   /* Non-zero means can't modify.  */
   unsigned int visible : 1;        /* Zero means don't display.  */
   unsigned int front_sticky : 1;    /* Non-zero means text inserted just
                                       before this interval goes into it.  */
@@ -598,7 +589,7 @@ struct interval
 typedef struct interval *INTERVAL;
 
 /* Complain if object is not string or buffer type */
-#define CHECK_STRING_OR_BUFFER(x, i) \
+#define CHECK_STRING_OR_BUFFER(x) \
   { if (!STRINGP ((x)) && !BUFFERP ((x))) \
       x = wrong_type_argument (Qbuffer_or_string_p, (x)); }
 \f
@@ -616,14 +607,43 @@ struct Lisp_Cons
   };
 
 /* Take the car or cdr of something known to be a cons cell.  */
+/* The _AS_LVALUE macros shouldn't be used outside of the minimal set
+   of code that has to know what a cons cell looks like.  Other code not
+   part of the basic lisp implementation should assume that the car and cdr
+   fields are not accessible as lvalues.  (What if we want to switch to
+   a copying collector someday?  Cached cons cell field addresses may be
+   invalidated at arbitrary points.)  */
 #ifdef HIDE_LISP_IMPLEMENTATION
-#define XCAR(c) (XCONS ((c))->car_)
-#define XCDR(c) (XCONS ((c))->cdr_)
+#define XCAR_AS_LVALUE(c) (XCONS ((c))->car_)
+#define XCDR_AS_LVALUE(c) (XCONS ((c))->cdr_)
 #else
-#define XCAR(c) (XCONS ((c))->car)
-#define XCDR(c) (XCONS ((c))->cdr)
+#define XCAR_AS_LVALUE(c) (XCONS ((c))->car)
+#define XCDR_AS_LVALUE(c) (XCONS ((c))->cdr)
 #endif
 
+/* Okay, we're not quite ready to turn this on yet.  A few files still
+   need to be updated and tested.  */
+#undef LISP_MAKE_RVALUE
+#define LISP_MAKE_RVALUE(x) (x)
+
+/* Use these from normal code.  */
+#define XCAR(c)        LISP_MAKE_RVALUE(XCAR_AS_LVALUE(c))
+#define XCDR(c) LISP_MAKE_RVALUE(XCDR_AS_LVALUE(c))
+
+/* Use these to set the fields of a cons cell.
+
+   Note that both arguments may refer to the same object, so 'n'
+   should not be read after 'c' is first modified.  Also, neither
+   argument should be evaluated more than once; side effects are
+   especially common in the second argument.  */
+#define XSETCAR(c,n) (XCAR_AS_LVALUE(c) = (n))
+#define XSETCDR(c,n) (XCDR_AS_LVALUE(c) = (n))
+
+/* For performance: Fast storage of positive integers into the
+   fields of a cons cell.  See above caveats.  */
+#define XSETCARFASTINT(c,n)  XSETFASTINT(XCAR_AS_LVALUE(c),(n))
+#define XSETCDRFASTINT(c,n)  XSETFASTINT(XCDR_AS_LVALUE(c),(n))
+
 /* Take the car or cdr of something whose type is not known.  */
 #define CAR(c)                                 \
  (CONSP ((c)) ? XCAR ((c))                     \
@@ -858,7 +878,7 @@ struct Lisp_Symbol
      and set a symbol's value, to take defvaralias into account.  */
   Lisp_Object value;
 
-  /* Function value of the symbol or Qunbound if not fcoundp.  */
+  /* Function value of the symbol or Qunbound if not fboundp.  */
   Lisp_Object function;
 
   /* The symbol's property list.  */
@@ -983,7 +1003,7 @@ struct Lisp_Hash_Table
 #define HASH_TABLE_P(OBJ)  PSEUDOVECTORP (OBJ, PVEC_HASH_TABLE)
 #define GC_HASH_TABLE_P(x) GC_PSEUDOVECTORP (x, PVEC_HASH_TABLE)
 
-#define CHECK_HASH_TABLE(x, i)                                 \
+#define CHECK_HASH_TABLE(x)                                    \
      do                                                                \
        {                                                       \
         if (!HASH_TABLE_P ((x)))                               \
@@ -1048,7 +1068,7 @@ struct Lisp_Intfwd
   {
     int type : 16;     /* = Lisp_Misc_Intfwd */
     int spacer : 16;
-    int *intvar;
+    EMACS_INT *intvar;
   };
 
 /* Boolean forwarding pointer to an int variable.
@@ -1396,34 +1416,37 @@ typedef unsigned char UCHAR;
 #define EQ(x, y) (XFASTINT (x) == XFASTINT (y))
 #define GC_EQ(x, y) (XGCTYPE (x) == XGCTYPE (y) && XPNTR (x) == XPNTR (y))
 
-#define CHECK_LIST(x, i) \
+#define CHECK_LIST(x) \
   do { if (!CONSP ((x)) && !NILP (x)) x = wrong_type_argument (Qlistp, (x)); } while (0)
 
-#define CHECK_STRING(x, i) \
+#define CHECK_STRING(x) \
   do { if (!STRINGP ((x))) x = wrong_type_argument (Qstringp, (x)); } while (0)
 
-#define CHECK_CONS(x, i) \
+#define CHECK_STRING_CAR(x) \
+  do { if (!STRINGP (XCAR (x))) XSETCAR (x, wrong_type_argument (Qstringp, XCAR (x))); } while (0)
+
+#define CHECK_CONS(x) \
   do { if (!CONSP ((x))) x = wrong_type_argument (Qconsp, (x)); } while (0)
 
-#define CHECK_SYMBOL(x, i) \
+#define CHECK_SYMBOL(x) \
   do { if (!SYMBOLP ((x))) x = wrong_type_argument (Qsymbolp, (x)); } while (0)
 
-#define CHECK_CHAR_TABLE(x, i) \
+#define CHECK_CHAR_TABLE(x) \
   do { if (!CHAR_TABLE_P ((x)))        \
         x = wrong_type_argument (Qchar_table_p, (x)); } while (0)
 
-#define CHECK_VECTOR(x, i) \
+#define CHECK_VECTOR(x) \
   do { if (!VECTORP ((x))) x = wrong_type_argument (Qvectorp, (x)); } while (0)
 
-#define CHECK_VECTOR_OR_CHAR_TABLE(x, i)                               \
+#define CHECK_VECTOR_OR_CHAR_TABLE(x)                          \
   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) \
+#define CHECK_BUFFER(x) \
   do { if (!BUFFERP ((x))) x = wrong_type_argument (Qbufferp, (x)); } while (0)
 
-#define CHECK_WINDOW(x, i) \
+#define CHECK_WINDOW(x) \
   do { if (!WINDOWP ((x))) x = wrong_type_argument (Qwindowp, (x)); } while (0)
 
 /* This macro rejects windows on the interior of the window tree as
@@ -1433,47 +1456,63 @@ typedef unsigned char UCHAR;
    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)                                \
+#define CHECK_LIVE_WINDOW(x)                           \
   do {                                                 \
     if (!WINDOWP ((x))                                 \
        || NILP (XWINDOW ((x))->buffer))                \
       x = wrong_type_argument (Qwindow_live_p, (x));   \
   } while (0)
 
-#define CHECK_PROCESS(x, i) \
+#define CHECK_PROCESS(x) \
   do { if (!PROCESSP ((x))) x = wrong_type_argument (Qprocessp, (x)); } while (0)
 
-#define CHECK_NUMBER(x, i) \
+#define CHECK_NUMBER(x) \
   do { if (!INTEGERP ((x))) x = wrong_type_argument (Qintegerp, (x)); } while (0)
 
-#define CHECK_NATNUM(x, i) \
+#define CHECK_NATNUM(x) \
   do { if (!NATNUMP (x)) x = wrong_type_argument (Qwholenump, (x)); } while (0)
 
-#define CHECK_MARKER(x, i) \
+#define CHECK_MARKER(x) \
   do { if (!MARKERP ((x))) x = wrong_type_argument (Qmarkerp, (x)); } while (0)
 
-#define CHECK_NUMBER_COERCE_MARKER(x, i) \
+#define CHECK_NUMBER_COERCE_MARKER(x) \
   do { if (MARKERP ((x))) XSETFASTINT (x, marker_position (x)); \
     else if (!INTEGERP ((x))) x = wrong_type_argument (Qinteger_or_marker_p, (x)); } while (0)
 
 #define XFLOATINT(n) extract_float((n))
 
-#define CHECK_FLOAT(x, i)              \
+#define CHECK_FLOAT(x)         \
   do { if (!FLOATP (x))                        \
     x = wrong_type_argument (Qfloatp, (x)); } while (0)
 
-#define CHECK_NUMBER_OR_FLOAT(x, i)    \
+#define CHECK_NUMBER_OR_FLOAT(x)       \
   do { if (!FLOATP (x) && !INTEGERP (x))       \
     x = wrong_type_argument (Qnumberp, (x)); } while (0)
 
-#define CHECK_NUMBER_OR_FLOAT_COERCE_MARKER(x, i) \
+#define CHECK_NUMBER_OR_FLOAT_COERCE_MARKER(x) \
   do { if (MARKERP (x)) XSETFASTINT (x, marker_position (x));  \
   else if (!INTEGERP (x) && !FLOATP (x))               \
     x = wrong_type_argument (Qnumber_or_marker_p, (x)); } while (0)
 
-#define CHECK_OVERLAY(x, i) \
+#define CHECK_OVERLAY(x) \
   do { if (!OVERLAYP ((x))) x = wrong_type_argument (Qoverlayp, (x));} while (0)
 
+/* Since we can't assign directly to the CAR or CDR fields of a cons
+   cell, use these when checking that those fields contain numbers.  */
+#define CHECK_NUMBER_CAR(x) \
+  do {                                 \
+    Lisp_Object tmp = XCAR (x);                \
+    CHECK_NUMBER (tmp);                        \
+    XSETCAR ((x), tmp);                        \
+  } while (0)
+
+#define CHECK_NUMBER_CDR(x) \
+  do {                                 \
+    Lisp_Object tmp = XCDR (x);                \
+    CHECK_NUMBER (tmp);                        \
+    XSETCDR ((x), tmp);                        \
+  } while (0)
+
 /* Cast pointers to this type to compare them.  Some machines want int.  */
 #ifndef PNTR_COMPARISON_TYPE
 #define PNTR_COMPARISON_TYPE EMACS_UINT
@@ -1503,12 +1542,13 @@ typedef unsigned char UCHAR;
 
 #if (!defined (__STDC__) && !defined (PROTOTYPES)) \
     || defined (USE_NONANSI_DEFUN)
-#define DEFUN(lname, fnname, sname, minargs, maxargs, prompt, doc)     \
+
+#define DEFUN(lname, fnname, sname, minargs, maxargs, prompt, args)    \
   Lisp_Object fnname ();                                               \
   struct Lisp_Subr sname =                                             \
     { PVEC_SUBR | (sizeof (struct Lisp_Subr) / sizeof (EMACS_INT)),    \
       fnname, minargs, maxargs, lname, prompt, 0};                     \
-  Lisp_Object fnname
+  Lisp_Object fnname args
 
 #else
 
@@ -1549,7 +1589,7 @@ typedef unsigned char UCHAR;
       || SUBRP (OBJ))
      
 /* defsubr (Sname);
- is how we define the symbol for function `name' at start-up time.  */
  is how we define the symbol for function `name' at start-up time.  */
 extern void defsubr P_ ((struct Lisp_Subr *));
 
 #define MANY -2
@@ -1558,7 +1598,7 @@ extern void defsubr P_ ((struct Lisp_Subr *));
 extern void defvar_lisp P_ ((char *, Lisp_Object *));
 extern void defvar_lisp_nopro P_ ((char *, Lisp_Object *));
 extern void defvar_bool P_ ((char *, int *));
-extern void defvar_int P_ ((char *, int *));
+extern void defvar_int P_ ((char *, EMACS_INT *));
 extern void defvar_per_buffer P_ ((char *, Lisp_Object *, Lisp_Object, char *));
 extern void defvar_kboard P_ ((char *, int));
 
@@ -1575,6 +1615,8 @@ extern void defvar_kboard P_ ((char *, int));
  defvar_kboard (lname, \
                (int)((char *)(&current_kboard->vname) \
                      - (char *)current_kboard))
+
+
 \f
 /* Structure for recording Lisp call stack for backtrace purposes.  */
 
@@ -1611,6 +1653,8 @@ extern struct specbinding *specpdl;
 extern struct specbinding *specpdl_ptr;
 extern int specpdl_size;
 
+extern EMACS_INT max_specpdl_size;
+
 #define BINDING_STACK_SIZE()   (specpdl_ptr - specpdl)
 
 /* Everything needed to describe an active condition case.  */
@@ -1719,7 +1763,7 @@ extern int consing_since_gc;
 
 /* Threshold for doing another gc.  */
 
-extern int gc_cons_threshold;
+extern EMACS_INT gc_cons_threshold;
 
 /* Structure for recording stack slots that need marking.  */
 
@@ -1772,11 +1816,18 @@ struct gcpro
 
 #if GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS
 
-#define GCPRO1(varname) ((void) 0)
-#define GCPRO2(varname1, varname2)((void) 0) 
-#define GCPRO3(varname1, varname2, varname3) ((void) 0) 
-#define GCPRO4(varname1, varname2, varname3, varname4) ((void) 0)
-#define GCPRO5(varname1, varname2, varname3, varname4, varname5) ((void) 0)
+/* Do something silly with gcproN vars just so gcc shuts up.  */
+
+#define GCPRO1(varname) ((void) gcpro1)
+#define GCPRO2(varname1, varname2)(((void) gcpro2, (void) gcpro1)) 
+#define GCPRO3(varname1, varname2, varname3) \
+  (((void) gcpro3, (void) gcpro2, (void) gcpro1))
+#define GCPRO4(varname1, varname2, varname3, varname4) \
+  (((void) gcpro4, (void) gcpro3, (void) gcpro2, (void) gcpro1))
+#define GCPRO5(varname1, varname2, varname3, varname4, varname5) \
+  (((void) gcpro5, (void) gcpro4, (void) gcpro3, (void) gcpro2, (void) gcpro1))
+#define GCPRO6(varname1, varname2, varname3, varname4, varname5, varname6) \
+  (((void) gcpro6, (void) gcpro5, (void) gcpro4, (void) gcpro3, (void) gcpro2, (void) gcpro1))
 #define UNGCPRO ((void) 0)
 
 #else /* GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS */
@@ -1813,6 +1864,15 @@ struct gcpro
   gcpro5.next = &gcpro4; gcpro5.var = &varname5; gcpro5.nvars = 1; \
   gcprolist = &gcpro5; }
 
+#define GCPRO6(varname1, varname2, varname3, varname4, varname5, varname6) \
+ {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \
+  gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \
+  gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \
+  gcpro4.next = &gcpro3; gcpro4.var = &varname4; gcpro4.nvars = 1; \
+  gcpro5.next = &gcpro4; gcpro5.var = &varname5; gcpro5.nvars = 1; \
+  gcpro6.next = &gcpro5; gcpro6.var = &varname6; gcpro6.nvars = 1; \
+  gcprolist = &gcpro6; }
+
 #define UNGCPRO (gcprolist = gcpro1.next)
 
 #else
@@ -1858,6 +1918,17 @@ extern int gcpro_level;
   gcpro5.level = gcpro_level++; \
   gcprolist = &gcpro5; }
 
+#define GCPRO6(varname1, varname2, varname3, varname4, varname5, varname6) \
+ {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \
+  gcpro1.level = gcpro_level; \
+  gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \
+  gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \
+  gcpro4.next = &gcpro3; gcpro4.var = &varname4; gcpro4.nvars = 1; \
+  gcpro5.next = &gcpro4; gcpro5.var = &varname5; gcpro5.nvars = 1; \
+  gcpro6.next = &gcpro5; gcpro6.var = &varname6; gcpro6.nvars = 1; \
+  gcpro6.level = gcpro_level++; \
+  gcprolist = &gcpro6; }
+
 #define UNGCPRO                                        \
  ((--gcpro_level != gcpro1.level)              \
   ? (abort (), 0)                              \
@@ -2038,6 +2109,7 @@ EXFUN (Fcheck_coding_system, 1);
 EXFUN (Fread_coding_system, 2);
 EXFUN (Fread_non_nil_coding_system, 1);
 EXFUN (Ffind_operation_coding_system, MANY);
+EXFUN (Fupdate_coding_systems_internal, 0);
 EXFUN (Fencode_coding_string, 3);
 EXFUN (Fdecode_coding_string, 3);
 extern Lisp_Object detect_coding_system P_ ((unsigned char *, int, int, int));
@@ -2049,7 +2121,7 @@ extern Lisp_Object code_convert_string_norecord P_ ((Lisp_Object, Lisp_Object,
                                                     int));
 
 /* Defined in charset.c */
-extern int nonascii_insert_offset;
+extern EMACS_INT nonascii_insert_offset;
 extern Lisp_Object Vnonascii_translation_table;
 EXFUN (Fchar_bytes, 1);
 EXFUN (Fchar_width, 1);
@@ -2145,7 +2217,6 @@ EXFUN (Fmapcar, 2);
 EXFUN (Fmapconcat, 3);
 EXFUN (Fy_or_n_p, 1);
 extern Lisp_Object do_yes_or_no_p P_ ((Lisp_Object));
-EXFUN (Ffeaturep, 2);
 EXFUN (Frequire, 3);
 EXFUN (Fprovide, 2);
 extern Lisp_Object concat2 P_ ((Lisp_Object, Lisp_Object));
@@ -2211,12 +2282,14 @@ extern void prepare_to_modify_buffer P_ ((int, int, int *));
 extern void signal_before_change P_ ((int, int, int *));
 extern void signal_after_change P_ ((int, int, int));
 extern void adjust_after_replace P_ ((int, int, Lisp_Object, int, int));
+extern void adjust_after_replace_noundo P_ ((int, int, int, int, int, int));
 extern void adjust_after_insert P_ ((int, int, int, int, int));
 extern void replace_range P_ ((int, int, Lisp_Object, int, int, int));
 extern void syms_of_insdel P_ ((void));
 
 /* Defined in dispnew.c */
 extern Lisp_Object selected_frame;
+extern EMACS_INT baud_rate;
 EXFUN (Fding, 1);
 EXFUN (Fredraw_frame, 1);
 EXFUN (Fredraw_display, 0);
@@ -2232,6 +2305,7 @@ extern Lisp_Object Qinhibit_point_motion_hooks;
 extern Lisp_Object Qinhibit_redisplay, Qdisplay;
 extern Lisp_Object Qinhibit_eval_during_redisplay;
 extern Lisp_Object Qmessage_truncate_lines;
+extern Lisp_Object Qcursor_in_non_selected_windows;
 extern Lisp_Object Vmessage_log_max;
 extern int message_enable_multibyte;
 extern Lisp_Object echo_area_buffer[2];
@@ -2390,7 +2464,6 @@ extern void syms_of_lread P_ ((void));
 /* Defined in eval.c */
 extern Lisp_Object Qautoload, Qexit, Qinteractive, Qcommandp, Qdefun, Qmacro;
 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;
 extern Lisp_Object Vsignaling_function;
@@ -2515,8 +2588,8 @@ extern Lisp_Object Vinhibit_field_text_motion;
 EXFUN (Fconstrain_to_field, 5);
 EXFUN (Ffield_string, 1);
 EXFUN (Fdelete_field, 1);
-EXFUN (Ffield_beginning, 2);
-EXFUN (Ffield_end, 2);
+EXFUN (Ffield_beginning, 3);
+EXFUN (Ffield_end, 3);
 EXFUN (Ffield_string_no_properties, 1);
 extern void set_time_zone_rule P_ ((char *));
 
@@ -2638,7 +2711,6 @@ extern void syms_of_search P_ ((void));
 
 extern Lisp_Object last_minibuf_string;
 extern void choose_minibuf_frame P_ ((void));
-extern int scmp P_ ((unsigned char *, unsigned char *, int));
 EXFUN (Fcompleting_read, 8);
 EXFUN (Fread_from_minibuffer, 7);
 EXFUN (Fread_variable, 2);
@@ -2691,6 +2763,7 @@ extern Lisp_Object Vtty_erase_char, Vhelp_form, Vtop_level;
 extern int input_pending;
 EXFUN (Fdiscard_input, 0);
 EXFUN (Frecursive_edit, 0);
+EXFUN (Ftop_level, 0);
 EXFUN (Fcommand_execute, 4);
 EXFUN (Finput_pending_p, 0);
 extern Lisp_Object menu_bar_items P_ ((Lisp_Object));
@@ -2793,7 +2866,6 @@ extern void frames_discard_buffer P_ ((Lisp_Object));
 extern void set_frame_buffer_list P_ ((Lisp_Object, Lisp_Object));
 extern void frames_bury_buffer P_ ((Lisp_Object));
 extern void syms_of_frame P_ ((void));
-extern void keys_of_frame P_ ((void));
 
 /* defined in emacs.c */
 extern Lisp_Object decode_env_path P_ ((char *, char *));
@@ -2872,7 +2944,6 @@ extern Lisp_Object Qexecute_kbd_macro;
 EXFUN (Fexecute_kbd_macro, 2);
 extern void init_macros P_ ((void));
 extern void syms_of_macros P_ ((void));
-extern void keys_of_macros P_ ((void));
 
 /* defined in undo.c */
 extern Lisp_Object Qinhibit_read_only;
@@ -2967,9 +3038,6 @@ extern void syms_of_ccl P_ ((void));
 EXFUN (Ffile_attributes, 1);
 extern void syms_of_dired P_ ((void));
 
-/* Defined in mocklisp.c */
-extern void syms_of_mocklisp P_ ((void));
-
 /* Defined in term.c */
 extern void syms_of_term P_ ((void));
 extern void fatal () NO_RETURN;
@@ -2992,6 +3060,7 @@ extern void syms_of_xfns P_ ((void));
 extern void init_xfns P_ ((void));
 extern Lisp_Object Vx_resource_name;
 EXFUN (Fxw_display_color_p, 1);
+EXFUN (Fx_file_dialog, 4);
 #endif /* HAVE_X_WINDOWS */
 
 /* Defined in xselect.c */
@@ -3069,7 +3138,7 @@ extern Lisp_Object Vdirectory_sep_char;
    ? 1                                                 \
    : (CONSP (obj)                                      \
       ? 0                                              \
-      : (wrong_type_argument (Qlistp, (list), 0)), 1))
+      : (wrong_type_argument (Qlistp, (list))), 1))
 
 #define FOREACH(hare, list, tortoise, n)               \
   for (tortoise = hare = (list), n = 0;                        \
@@ -3094,4 +3163,6 @@ extern Lisp_Object Vdirectory_sep_char;
    fixnum.  */
 
 #define make_fixnum_or_float(val) \
-   (FIXNUM_OVERFLOW_P (val) ? make_float (val) : make_number (val))
+   (FIXNUM_OVERFLOW_P (val) \
+    ? make_float (val) \
+    : make_number ((EMACS_INT)(val)))