]> code.delx.au - gnu-emacs/blobdiff - src/lisp.h
Add 2009 to copyright years.
[gnu-emacs] / src / lisp.h
index 1752cb865d8324dacdc12c37589c7c78aa20ea77..8579516595e4664ef35ad301217fe92a06557822 100644 (file)
@@ -1,14 +1,14 @@
 /* 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, 2008
+                 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
                  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
-GNU Emacs is free software; you can redistribute it and/or modify
+GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,9 +16,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 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, Inc., 51 Franklin Street, Fifth Floor,
-Boston, MA 02110-1301, USA.  */
+along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef EMACS_LISP_H
 #define EMACS_LISP_H
@@ -110,13 +108,6 @@ extern void die P_((const char *, const char *, int)) NO_RETURN;
 
 #endif
 
-/* Used for making sure that Emacs is compilable in all
-   configurations.  */
-
-#ifdef USE_LISP_UNION_TYPE
-#undef NO_UNION_TYPE
-#endif
-
 /* Define an Emacs version of "assert", since some system ones are
    flaky.  */
 #ifndef ENABLE_CHECKING
@@ -129,10 +120,15 @@ extern void die P_((const char *, const char *, int)) NO_RETURN;
 #endif
 #endif /* ENABLE_CHECKING */
 \f
+/* Define this to make Lisp_Object use a union type instead of the
+   default int.  FIXME: It might be better to add a flag to configure
+   to do this.  */
+/* #define USE_LISP_UNION_TYPE */
+
 /***** Select the tagging scheme.  *****/
 /* There are basically two options that control the tagging scheme:
-   - NO_UNION_TYPE says that Lisp_Object should be an integer instead
-     of a union.
+   - USE_LISP_UNION_TYPE says that Lisp_Object should be a union instead
+     of an integer.
    - USE_LSB_TAG means that we can assume the least 3 bits of pointers are
      always 0, and we can thus use them to hold tag bits, without
      restricting our addressing space.
@@ -161,11 +157,11 @@ extern void die P_((const char *, const char *, int)) NO_RETURN;
 #endif
 
 /* Let's USE_LSB_TAG on systems where we know malloc returns mult-of-8.  */
-#if defined GNU_MALLOC || defined DOUG_LEA_MALLOC || defined __GLIBC__ || defined MAC_OSX
+#if defined GNU_MALLOC || defined DOUG_LEA_MALLOC || defined __GLIBC__ || defined DARWIN_OS
 /* We also need to be able to specify mult-of-8 alignment on static vars.  */
 # if defined DECL_ALIGN
 /* We currently do not support USE_LSB_TAG with a union Lisp_Object.  */
-#  if defined NO_UNION_TYPE
+#  ifndef USE_LISP_UNION_TYPE
 #   define USE_LSB_TAG
 #  endif
 # endif
@@ -248,7 +244,7 @@ enum Lisp_Misc_Type
 #define VALBITS (BITS_PER_EMACS_INT - GCTYPEBITS)
 #endif
 
-#ifndef NO_UNION_TYPE
+#ifdef USE_LISP_UNION_TYPE
 
 #ifndef WORDS_BIG_ENDIAN
 
@@ -312,13 +308,13 @@ LISP_MAKE_RVALUE (Lisp_Object o)
 #define LISP_MAKE_RVALUE(o) (o)
 #endif
 
-#else /* NO_UNION_TYPE */
+#else /* USE_LISP_UNION_TYPE */
 
 /* If union type is not wanted, define Lisp_Object as just a number.  */
 
 typedef EMACS_INT Lisp_Object;
 #define LISP_MAKE_RVALUE(o) (0+(o))
-#endif /* NO_UNION_TYPE */
+#endif /* USE_LISP_UNION_TYPE */
 
 /* In the size word of a vector, this bit means the vector has been marked.  */
 
@@ -376,7 +372,7 @@ enum pvec_type
  For example, if tem is a Lisp_Object whose type is Lisp_Cons,
  XCONS (tem) is the struct Lisp_Cons * pointing to the memory for that cons.  */
 
-#ifdef NO_UNION_TYPE
+#ifndef USE_LISP_UNION_TYPE
 
 /* Return a perfect hash of the Lisp_Object representation.  */
 #define XHASH(a) (a)
@@ -442,7 +438,7 @@ enum pvec_type
 
 #endif /* not USE_LSB_TAG */
 
-#else /* not NO_UNION_TYPE */
+#else /* USE_LISP_UNION_TYPE */
 
 #define XHASH(a) ((a).i)
 
@@ -474,7 +470,7 @@ enum pvec_type
 extern Lisp_Object make_number P_ ((EMACS_INT));
 #endif
 
-#endif /* NO_UNION_TYPE */
+#endif /* USE_LISP_UNION_TYPE */
 
 #define EQ(x, y) (XHASH (x) == XHASH (y))
 
@@ -995,7 +991,7 @@ struct Lisp_Symbol
 
 #define SYMBOL_VALUE(sym)                      \
    (XSYMBOL (sym)->indirect_variable           \
-    ? XSYMBOL (indirect_variable (sym))->value \
+    ? indirect_variable (XSYMBOL (sym))->value \
     : XSYMBOL (sym)->value)
 
 /* Set SYM's value to VAL, taking defvaralias into account.  */
@@ -1003,7 +999,7 @@ struct Lisp_Symbol
 #define SET_SYMBOL_VALUE(sym, val)                             \
      do {                                                      \
        if (XSYMBOL (sym)->indirect_variable)                   \
-        XSYMBOL (indirect_variable ((sym)))->value = (val);    \
+        indirect_variable (XSYMBOL (sym))->value = (val);      \
        else                                                    \
         XSYMBOL (sym)->value = (val);                          \
      } while (0)
@@ -1659,9 +1655,7 @@ typedef struct {
   } while (0)
 
 /* Cast pointers to this type to compare them.  Some machines want int.  */
-#ifndef PNTR_COMPARISON_TYPE
 #define PNTR_COMPARISON_TYPE EMACS_UINT
-#endif
 \f
 /* Define a built-in function for calling from Lisp.
  `lname' should be the name to give the function in Lisp,
@@ -2265,7 +2259,7 @@ EXFUN (Fadd1, 1);
 EXFUN (Fsub1, 1);
 EXFUN (Fmake_variable_buffer_local, 1);
 
-extern Lisp_Object indirect_variable P_ ((Lisp_Object));
+extern struct Lisp_Symbol *indirect_variable (struct Lisp_Symbol *);
 extern Lisp_Object long_to_cons P_ ((unsigned long));
 extern unsigned long cons_to_long P_ ((Lisp_Object));
 extern void args_out_of_range P_ ((Lisp_Object, Lisp_Object)) NO_RETURN;
@@ -2355,9 +2349,8 @@ Lisp_Object copy_hash_table P_ ((struct Lisp_Hash_Table *));
 int hash_lookup P_ ((struct Lisp_Hash_Table *, Lisp_Object, unsigned *));
 int hash_put P_ ((struct Lisp_Hash_Table *, Lisp_Object, Lisp_Object,
                  unsigned));
-void hash_remove P_ ((struct Lisp_Hash_Table *, Lisp_Object));
 void hash_clear P_ ((struct Lisp_Hash_Table *));
-void remove_hash_entry P_ ((struct Lisp_Hash_Table *, int));
+void init_weak_hash_tables P_ ((void));
 extern void init_fns P_ ((void));
 EXFUN (Fsxhash, 1);
 EXFUN (Fmake_hash_table, MANY);
@@ -2390,6 +2383,7 @@ EXFUN (Fstring_make_unibyte, 1);
 EXFUN (Fstring_as_multibyte, 1);
 EXFUN (Fstring_as_unibyte, 1);
 EXFUN (Fstring_to_multibyte, 1);
+EXFUN (Fstring_to_unibyte, 1);
 EXFUN (Fsubstring, 3);
 extern Lisp_Object substring_both P_ ((Lisp_Object, int, int, int, int));
 EXFUN (Fnth, 2);
@@ -2630,7 +2624,7 @@ EXFUN (Fset_char_table_extra_slot, 3);
 EXFUN (Fchar_table_range, 2);
 EXFUN (Fset_char_table_range, 3);
 EXFUN (Fset_char_table_default, 3);
-EXFUN (Foptimize_char_table, 1);
+EXFUN (Foptimize_char_table, 2);
 EXFUN (Fmap_char_table, 2);
 extern Lisp_Object copy_char_table P_ ((Lisp_Object));
 extern Lisp_Object sub_char_table_ref P_ ((Lisp_Object, int));
@@ -2847,10 +2841,10 @@ extern void set_time_zone_rule P_ ((char *));
 /* defined in buffer.c */
 extern int mouse_face_overlay_overlaps P_ ((Lisp_Object));
 extern void nsberror P_ ((Lisp_Object)) NO_RETURN;
-extern char *no_switch_window P_ ((Lisp_Object window));
 EXFUN (Fset_buffer_multibyte, 1);
 EXFUN (Foverlay_start, 1);
 EXFUN (Foverlay_end, 1);
+EXFUN (Foverlay_buffer, 1);
 extern void adjust_overlays_for_insert P_ ((EMACS_INT, EMACS_INT));
 extern void adjust_overlays_for_delete P_ ((EMACS_INT, EMACS_INT));
 extern void fix_start_end_in_overlays P_ ((int, int));
@@ -2867,7 +2861,6 @@ EXFUN (set_buffer_if_live, 1);
 EXFUN (Fbarf_if_buffer_read_only, 0);
 EXFUN (Fcurrent_buffer, 0);
 EXFUN (Fswitch_to_buffer, 2);
-EXFUN (Fpop_to_buffer, 3);
 EXFUN (Fother_buffer, 3);
 EXFUN (Foverlay_get, 2);
 EXFUN (Fbuffer_modified_p, 1);
@@ -2937,6 +2930,8 @@ extern void syms_of_fileio P_ ((void));
 extern void init_fileio_once P_ ((void));
 extern Lisp_Object make_temp_name P_ ((Lisp_Object, int));
 EXFUN (Fmake_symbolic_link, 3);
+extern Lisp_Object Qdelete_directory;
+extern Lisp_Object Qdelete_file;
 
 /* Defined in abbrev.c */
 
@@ -2980,7 +2975,6 @@ extern Lisp_Object get_minibuffer P_ ((int));
 extern void temp_echo_area_glyphs P_ ((Lisp_Object));
 extern void init_minibuf_once P_ ((void));
 extern void syms_of_minibuf P_ ((void));
-extern void keys_of_minibuf P_ ((void));
 
 /* Defined in callint.c */
 
@@ -3069,11 +3063,11 @@ extern Lisp_Object Vx_resource_class;
 extern Lisp_Object Qvisible;
 extern void store_frame_param P_ ((struct frame *, Lisp_Object, Lisp_Object));
 extern void store_in_alist P_ ((Lisp_Object *, Lisp_Object, Lisp_Object));
-extern Lisp_Object do_switch_frame P_ ((Lisp_Object, int, int));
+extern Lisp_Object do_switch_frame P_ ((Lisp_Object, int, int, Lisp_Object));
 extern Lisp_Object get_frame_param P_ ((struct frame *, Lisp_Object));
 extern Lisp_Object frame_buffer_predicate P_ ((Lisp_Object));
 EXFUN (Fframep, 1);
-EXFUN (Fselect_frame, 1);
+EXFUN (Fselect_frame, 2);
 EXFUN (Fselected_frame, 0);
 EXFUN (Fwindow_frame, 1);
 EXFUN (Fframe_root_window, 1);
@@ -3097,7 +3091,7 @@ EXFUN (Fset_frame_size, 3);
 EXFUN (Fset_frame_position, 3);
 EXFUN (Fraise_frame, 1);
 EXFUN (Fredirect_frame_focus, 2);
-EXFUN (Fset_frame_selected_window, 2);
+EXFUN (Fset_frame_selected_window, 3);
 extern Lisp_Object frame_buffer_list P_ ((Lisp_Object));
 extern void frames_discard_buffer P_ ((Lisp_Object));
 extern void set_frame_buffer_list P_ ((Lisp_Object, Lisp_Object));
@@ -3107,6 +3101,7 @@ extern void syms_of_frame P_ ((void));
 /* defined in emacs.c */
 extern Lisp_Object decode_env_path P_ ((char *, char *));
 extern Lisp_Object Vinvocation_name, Vinvocation_directory;
+extern Lisp_Object Vbefore_init_time, Vafter_init_time;
 extern Lisp_Object Vinstallation_directory;
 extern Lisp_Object empty_unibyte_string, empty_multibyte_string;
 EXFUN (Fkill_emacs, 1);
@@ -3123,6 +3118,12 @@ void synchronize_system_time_locale P_ ((void));
 void shut_down_emacs P_ ((int, int, Lisp_Object));
 /* Nonzero means don't do interactive redisplay and don't change tty modes */
 extern int noninteractive;
+
+/* Pipe used to send exit notification to the daemon parent at
+   startup.  */
+extern int daemon_pipe[2];
+#define IS_DAEMON (daemon_pipe[1] != 0)
+
 /* Nonzero means don't do use window-system-specific display code */
 extern int inhibit_window_system;
 /* Nonzero means that a filter or a sentinel is running.  */
@@ -3218,6 +3219,9 @@ extern Lisp_Object next_single_char_property_change P_ ((Lisp_Object,
                                                         Lisp_Object,
                                                         Lisp_Object));
 
+/* defined in menu.c */
+extern void syms_of_menu P_ ((void));
+
 /* defined in xmenu.c */
 EXFUN (Fx_popup_menu, 2);
 EXFUN (Fx_popup_dialog, 3);
@@ -3278,6 +3282,9 @@ extern void syms_of_ccl P_ ((void));
 /* Defined in dired.c */
 EXFUN (Ffile_attributes, 2);
 extern void syms_of_dired P_ ((void));
+extern Lisp_Object directory_files_internal P_ ((Lisp_Object, Lisp_Object,
+                                                Lisp_Object, Lisp_Object,
+                                                int, Lisp_Object));
 
 /* Defined in term.c */
 extern void syms_of_term P_ ((void));
@@ -3287,6 +3294,9 @@ extern void fatal P_ ((const char *msgid, ...)) NO_RETURN;
 EXFUN (Fdelete_terminal, 2);
 extern void syms_of_terminal P_ ((void));
 
+/* Defined in font.c */
+extern void syms_of_font P_ ((void));
+
 #ifdef HAVE_WINDOW_SYSTEM
 /* Defined in fontset.c */
 extern void syms_of_fontset P_ ((void));
@@ -3327,30 +3337,16 @@ extern void syms_of_xterm P_ ((void));
 EXFUN (Fmsdos_downcase_filename, 1);
 #endif
 
-#ifdef MAC_OS
-/* Defined in macfns.c */
-extern void syms_of_macfns P_ ((void));
-
-/* Defined in macselect.c */
-extern void syms_of_macselect P_ ((void));
-
-/* Defined in macterm.c */
-extern void syms_of_macterm P_ ((void));
-
-/* Defined in macmenu.c */
-extern void syms_of_macmenu P_ ((void));
-
-/* Defined in mac.c */
-extern void syms_of_mac P_ ((void));
-#ifdef MAC_OSX
-extern void init_mac_osx_environment P_ ((void));
-#endif /* MAC_OSX */
-#endif /* MAC_OS */
-
 #ifdef HAVE_MENUS
-/* Defined in (x|mac|w32)fns.c...  */
+/* Defined in (x|w32)fns.c, nsfns.m...  */
 extern int have_menus_p P_ ((void));
 #endif
+
+#ifdef HAVE_DBUS
+/* Defined in dbusbind.c */
+void xd_read_queued_messages P_ ((void));
+void syms_of_dbusbind P_ ((void));
+#endif
 \f
 /* Nonzero means Emacs has already been initialized.
    Used during startup to detect startup of dumped Emacs.  */