aboutsummaryrefslogtreecommitdiffstats
path: root/src/lisp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lisp.h')
-rw-r--r--src/lisp.h345
1 files changed, 129 insertions, 216 deletions
diff --git a/src/lisp.h b/src/lisp.h
index 8d44b972717..962fed4d81f 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -562,7 +562,7 @@ enum Lisp_Fwd_Type
562 562
563typedef struct { EMACS_INT i; } Lisp_Object; 563typedef struct { EMACS_INT i; } Lisp_Object;
564 564
565#define LISP_INITIALLY_ZERO {0} 565#define LISP_INITIALLY(i) {i}
566 566
567#undef CHECK_LISP_OBJECT_TYPE 567#undef CHECK_LISP_OBJECT_TYPE
568enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = true }; 568enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = true };
@@ -571,9 +571,11 @@ enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = true };
571/* If a struct type is not wanted, define Lisp_Object as just a number. */ 571/* If a struct type is not wanted, define Lisp_Object as just a number. */
572 572
573typedef EMACS_INT Lisp_Object; 573typedef EMACS_INT Lisp_Object;
574#define LISP_INITIALLY_ZERO 0 574#define LISP_INITIALLY(i) (i)
575enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = false }; 575enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = false };
576#endif /* CHECK_LISP_OBJECT_TYPE */ 576#endif /* CHECK_LISP_OBJECT_TYPE */
577
578#define LISP_INITIALLY_ZERO LISP_INITIALLY (0)
577 579
578/* Forward declarations. */ 580/* Forward declarations. */
579 581
@@ -610,12 +612,6 @@ extern Lisp_Object char_table_ref (Lisp_Object, int);
610extern void char_table_set (Lisp_Object, int, Lisp_Object); 612extern void char_table_set (Lisp_Object, int, Lisp_Object);
611 613
612/* Defined in data.c. */ 614/* Defined in data.c. */
613extern Lisp_Object Qarrayp, Qbufferp, Qbuffer_or_string_p, Qchar_table_p;
614extern Lisp_Object Qconsp, Qfloatp, Qintegerp, Qlambda, Qlistp, Qmarkerp, Qnil;
615extern Lisp_Object Qnumberp, Qstringp, Qsymbolp, Qt, Qvectorp;
616extern Lisp_Object Qbool_vector_p;
617extern Lisp_Object Qvector_or_char_table_p, Qwholenump;
618extern Lisp_Object Qwindow;
619extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object); 615extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object);
620extern _Noreturn void wrong_choice (Lisp_Object, Lisp_Object); 616extern _Noreturn void wrong_choice (Lisp_Object, Lisp_Object);
621 617
@@ -625,22 +621,116 @@ extern bool might_dump;
625 Used during startup to detect startup of dumped Emacs. */ 621 Used during startup to detect startup of dumped Emacs. */
626extern bool initialized; 622extern bool initialized;
627 623
628/* Defined in eval.c. */
629extern Lisp_Object Qautoload;
630
631/* Defined in floatfns.c. */ 624/* Defined in floatfns.c. */
632extern double extract_float (Lisp_Object); 625extern double extract_float (Lisp_Object);
633 626
634/* Defined in process.c. */ 627
635extern Lisp_Object Qprocessp; 628/* Interned state of a symbol. */
636 629
637/* Defined in window.c. */ 630enum symbol_interned
638extern Lisp_Object Qwindowp; 631{
632 SYMBOL_UNINTERNED = 0,
633 SYMBOL_INTERNED = 1,
634 SYMBOL_INTERNED_IN_INITIAL_OBARRAY = 2
635};
636
637enum symbol_redirect
638{
639 SYMBOL_PLAINVAL = 4,
640 SYMBOL_VARALIAS = 1,
641 SYMBOL_LOCALIZED = 2,
642 SYMBOL_FORWARDED = 3
643};
644
645struct Lisp_Symbol
646{
647 bool_bf gcmarkbit : 1;
648
649 /* Indicates where the value can be found:
650 0 : it's a plain var, the value is in the `value' field.
651 1 : it's a varalias, the value is really in the `alias' symbol.
652 2 : it's a localized var, the value is in the `blv' object.
653 3 : it's a forwarding variable, the value is in `forward'. */
654 ENUM_BF (symbol_redirect) redirect : 3;
655
656 /* Non-zero means symbol is constant, i.e. changing its value
657 should signal an error. If the value is 3, then the var
658 can be changed, but only by `defconst'. */
659 unsigned constant : 2;
660
661 /* Interned state of the symbol. This is an enumerator from
662 enum symbol_interned. */
663 unsigned interned : 2;
664
665 /* True means that this variable has been explicitly declared
666 special (with `defvar' etc), and shouldn't be lexically bound. */
667 bool_bf declared_special : 1;
668
669 /* True if pointed to from purespace and hence can't be GC'd. */
670 bool_bf pinned : 1;
671
672 /* The symbol's name, as a Lisp string. */
673 Lisp_Object name;
674
675 /* Value of the symbol or Qunbound if unbound. Which alternative of the
676 union is used depends on the `redirect' field above. */
677 union {
678 Lisp_Object value;
679 struct Lisp_Symbol *alias;
680 struct Lisp_Buffer_Local_Value *blv;
681 union Lisp_Fwd *fwd;
682 } val;
683
684 /* Function value of the symbol or Qnil if not fboundp. */
685 Lisp_Object function;
686
687 /* The symbol's property list. */
688 Lisp_Object plist;
689
690 /* Next symbol in obarray bucket, if the symbol is interned. */
691 struct Lisp_Symbol *next;
692};
693
694/* Declare a Lisp-callable function. The MAXARGS parameter has the same
695 meaning as in the DEFUN macro, and is used to construct a prototype. */
696/* We can use the same trick as in the DEFUN macro to generate the
697 appropriate prototype. */
698#define EXFUN(fnname, maxargs) \
699 extern Lisp_Object fnname DEFUN_ARGS_ ## maxargs
700
701/* Note that the weird token-substitution semantics of ANSI C makes
702 this work for MANY and UNEVALLED. */
703#define DEFUN_ARGS_MANY (ptrdiff_t, Lisp_Object *)
704#define DEFUN_ARGS_UNEVALLED (Lisp_Object)
705#define DEFUN_ARGS_0 (void)
706#define DEFUN_ARGS_1 (Lisp_Object)
707#define DEFUN_ARGS_2 (Lisp_Object, Lisp_Object)
708#define DEFUN_ARGS_3 (Lisp_Object, Lisp_Object, Lisp_Object)
709#define DEFUN_ARGS_4 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object)
710#define DEFUN_ARGS_5 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
711 Lisp_Object)
712#define DEFUN_ARGS_6 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
713 Lisp_Object, Lisp_Object)
714#define DEFUN_ARGS_7 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
715 Lisp_Object, Lisp_Object, Lisp_Object)
716#define DEFUN_ARGS_8 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
717 Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object)
718
719/* Yield an integer that contains TAG along with PTR. */
720#define TAG_PTR(tag, ptr) \
721 ((USE_LSB_TAG ? (tag) : (EMACS_UINT) (tag) << VALBITS) + (uintptr_t) (ptr))
722
723/* Declare extern constants for Lisp symbols. These can be helpful
724 when using a debugger like GDB, on older platforms where the debug
725 format does not represent C macros. Athough these symbols are
726 useless on modern platforms, they don't hurt performance all that much. */
727#define DEFINE_LISP_SYMBOL_BEGIN(name) \
728 DEFINE_GDB_SYMBOL_BEGIN (Lisp_Object, name)
729#define DEFINE_LISP_SYMBOL_END(name) \
730 DEFINE_GDB_SYMBOL_END (LISP_INITIALLY (TAG_PTR (Lisp_Symbol, name)))
731
732#include "globals.h"
639 733
640/* Defined in xdisp.c. */
641extern Lisp_Object Qimage;
642extern Lisp_Object Qfontification_functions;
643
644/* Convert a Lisp_Object to the corresponding EMACS_INT and vice versa. 734/* Convert a Lisp_Object to the corresponding EMACS_INT and vice versa.
645 At the machine level, these operations are no-ops. */ 735 At the machine level, these operations are no-ops. */
646LISP_MACRO_DEFUN (XLI, EMACS_INT, (Lisp_Object o), (o)) 736LISP_MACRO_DEFUN (XLI, EMACS_INT, (Lisp_Object o), (o))
@@ -861,6 +951,10 @@ XSTRING (Lisp_Object a)
861 951
862LISP_MACRO_DEFUN (XSYMBOL, struct Lisp_Symbol *, (Lisp_Object a), (a)) 952LISP_MACRO_DEFUN (XSYMBOL, struct Lisp_Symbol *, (Lisp_Object a), (a))
863 953
954/* XSYMBOL_INIT (Qfoo) is like XSYMBOL (Qfoo), except it is valid in
955 static initializers, and SYM must be a C-defined symbol. */
956#define XSYMBOL_INIT(sym) a##sym
957
864INLINE struct Lisp_Float * 958INLINE struct Lisp_Float *
865XFLOAT (Lisp_Object a) 959XFLOAT (Lisp_Object a)
866{ 960{
@@ -930,14 +1024,18 @@ XBOOL_VECTOR (Lisp_Object a)
930INLINE Lisp_Object 1024INLINE Lisp_Object
931make_lisp_ptr (void *ptr, enum Lisp_Type type) 1025make_lisp_ptr (void *ptr, enum Lisp_Type type)
932{ 1026{
933 EMACS_UINT utype = type; 1027 Lisp_Object a = XIL (TAG_PTR (type, ptr));
934 EMACS_UINT typebits = USE_LSB_TAG ? type : utype << VALBITS;
935 Lisp_Object a = XIL (typebits | (uintptr_t) ptr);
936 eassert (XTYPE (a) == type && XUNTAG (a, type) == ptr); 1028 eassert (XTYPE (a) == type && XUNTAG (a, type) == ptr);
937 return a; 1029 return a;
938} 1030}
939 1031
940INLINE Lisp_Object 1032INLINE Lisp_Object
1033make_lisp_symbol (struct Lisp_Symbol *sym)
1034{
1035 return make_lisp_ptr (sym, Lisp_Symbol);
1036}
1037
1038INLINE Lisp_Object
941make_lisp_proc (struct Lisp_Process *p) 1039make_lisp_proc (struct Lisp_Process *p)
942{ 1040{
943 return make_lisp_ptr (p, Lisp_Vectorlike); 1041 return make_lisp_ptr (p, Lisp_Vectorlike);
@@ -948,7 +1046,7 @@ make_lisp_proc (struct Lisp_Process *p)
948#define XSETCONS(a, b) ((a) = make_lisp_ptr (b, Lisp_Cons)) 1046#define XSETCONS(a, b) ((a) = make_lisp_ptr (b, Lisp_Cons))
949#define XSETVECTOR(a, b) ((a) = make_lisp_ptr (b, Lisp_Vectorlike)) 1047#define XSETVECTOR(a, b) ((a) = make_lisp_ptr (b, Lisp_Vectorlike))
950#define XSETSTRING(a, b) ((a) = make_lisp_ptr (b, Lisp_String)) 1048#define XSETSTRING(a, b) ((a) = make_lisp_ptr (b, Lisp_String))
951#define XSETSYMBOL(a, b) ((a) = make_lisp_ptr (b, Lisp_Symbol)) 1049#define XSETSYMBOL(a, b) ((a) = make_lisp_symbol (b))
952#define XSETFLOAT(a, b) ((a) = make_lisp_ptr (b, Lisp_Float)) 1050#define XSETFLOAT(a, b) ((a) = make_lisp_ptr (b, Lisp_Float))
953#define XSETMISC(a, b) ((a) = make_lisp_ptr (b, Lisp_Misc)) 1051#define XSETMISC(a, b) ((a) = make_lisp_ptr (b, Lisp_Misc))
954 1052
@@ -1555,72 +1653,6 @@ verify ((offsetof (struct Lisp_Sub_Char_Table, contents)
1555 Symbols 1653 Symbols
1556 ***********************************************************************/ 1654 ***********************************************************************/
1557 1655
1558/* Interned state of a symbol. */
1559
1560enum symbol_interned
1561{
1562 SYMBOL_UNINTERNED = 0,
1563 SYMBOL_INTERNED = 1,
1564 SYMBOL_INTERNED_IN_INITIAL_OBARRAY = 2
1565};
1566
1567enum symbol_redirect
1568{
1569 SYMBOL_PLAINVAL = 4,
1570 SYMBOL_VARALIAS = 1,
1571 SYMBOL_LOCALIZED = 2,
1572 SYMBOL_FORWARDED = 3
1573};
1574
1575struct Lisp_Symbol
1576{
1577 bool_bf gcmarkbit : 1;
1578
1579 /* Indicates where the value can be found:
1580 0 : it's a plain var, the value is in the `value' field.
1581 1 : it's a varalias, the value is really in the `alias' symbol.
1582 2 : it's a localized var, the value is in the `blv' object.
1583 3 : it's a forwarding variable, the value is in `forward'. */
1584 ENUM_BF (symbol_redirect) redirect : 3;
1585
1586 /* Non-zero means symbol is constant, i.e. changing its value
1587 should signal an error. If the value is 3, then the var
1588 can be changed, but only by `defconst'. */
1589 unsigned constant : 2;
1590
1591 /* Interned state of the symbol. This is an enumerator from
1592 enum symbol_interned. */
1593 unsigned interned : 2;
1594
1595 /* True means that this variable has been explicitly declared
1596 special (with `defvar' etc), and shouldn't be lexically bound. */
1597 bool_bf declared_special : 1;
1598
1599 /* True if pointed to from purespace and hence can't be GC'd. */
1600 bool_bf pinned : 1;
1601
1602 /* The symbol's name, as a Lisp string. */
1603 Lisp_Object name;
1604
1605 /* Value of the symbol or Qunbound if unbound. Which alternative of the
1606 union is used depends on the `redirect' field above. */
1607 union {
1608 Lisp_Object value;
1609 struct Lisp_Symbol *alias;
1610 struct Lisp_Buffer_Local_Value *blv;
1611 union Lisp_Fwd *fwd;
1612 } val;
1613
1614 /* Function value of the symbol or Qnil if not fboundp. */
1615 Lisp_Object function;
1616
1617 /* The symbol's property list. */
1618 Lisp_Object plist;
1619
1620 /* Next symbol in obarray bucket, if the symbol is interned. */
1621 struct Lisp_Symbol *next;
1622};
1623
1624/* Value is name of symbol. */ 1656/* Value is name of symbol. */
1625 1657
1626LISP_MACRO_DEFUN (SYMBOL_VAL, Lisp_Object, (struct Lisp_Symbol *sym), (sym)) 1658LISP_MACRO_DEFUN (SYMBOL_VAL, Lisp_Object, (struct Lisp_Symbol *sym), (sym))
@@ -1694,8 +1726,9 @@ SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P (Lisp_Object sym)
1694 1726
1695LISP_MACRO_DEFUN (SYMBOL_CONSTANT_P, int, (Lisp_Object sym), (sym)) 1727LISP_MACRO_DEFUN (SYMBOL_CONSTANT_P, int, (Lisp_Object sym), (sym))
1696 1728
1697#define DEFSYM(sym, name) \ 1729/* Placeholder for make-docfile to process. The actual symbol
1698 do { (sym) = intern_c_string ((name)); staticpro (&(sym)); } while (false) 1730 definition is done by lread.c's defsym. */
1731#define DEFSYM(sym, name) /* empty */
1699 1732
1700 1733
1701/*********************************************************************** 1734/***********************************************************************
@@ -2689,24 +2722,6 @@ CHECK_NUMBER_CDR (Lisp_Object x)
2689 Lisp_Object fnname 2722 Lisp_Object fnname
2690#endif 2723#endif
2691 2724
2692/* Note that the weird token-substitution semantics of ANSI C makes
2693 this work for MANY and UNEVALLED. */
2694#define DEFUN_ARGS_MANY (ptrdiff_t, Lisp_Object *)
2695#define DEFUN_ARGS_UNEVALLED (Lisp_Object)
2696#define DEFUN_ARGS_0 (void)
2697#define DEFUN_ARGS_1 (Lisp_Object)
2698#define DEFUN_ARGS_2 (Lisp_Object, Lisp_Object)
2699#define DEFUN_ARGS_3 (Lisp_Object, Lisp_Object, Lisp_Object)
2700#define DEFUN_ARGS_4 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object)
2701#define DEFUN_ARGS_5 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
2702 Lisp_Object)
2703#define DEFUN_ARGS_6 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
2704 Lisp_Object, Lisp_Object)
2705#define DEFUN_ARGS_7 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
2706 Lisp_Object, Lisp_Object, Lisp_Object)
2707#define DEFUN_ARGS_8 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
2708 Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object)
2709
2710/* True if OBJ is a Lisp function. */ 2725/* True if OBJ is a Lisp function. */
2711INLINE bool 2726INLINE bool
2712FUNCTIONP (Lisp_Object obj) 2727FUNCTIONP (Lisp_Object obj)
@@ -3255,15 +3270,6 @@ extern int gcpro_level;
3255 3270
3256void staticpro (Lisp_Object *); 3271void staticpro (Lisp_Object *);
3257 3272
3258/* Declare a Lisp-callable function. The MAXARGS parameter has the same
3259 meaning as in the DEFUN macro, and is used to construct a prototype. */
3260/* We can use the same trick as in the DEFUN macro to generate the
3261 appropriate prototype. */
3262#define EXFUN(fnname, maxargs) \
3263 extern Lisp_Object fnname DEFUN_ARGS_ ## maxargs
3264
3265#include "globals.h"
3266
3267/* Forward declarations for prototypes. */ 3273/* Forward declarations for prototypes. */
3268struct window; 3274struct window;
3269struct frame; 3275struct frame;
@@ -3382,30 +3388,6 @@ set_sub_char_table_contents (Lisp_Object table, ptrdiff_t idx, Lisp_Object val)
3382} 3388}
3383 3389
3384/* Defined in data.c. */ 3390/* Defined in data.c. */
3385extern Lisp_Object Qquote, Qunbound;
3386extern Lisp_Object Qerror_conditions, Qerror_message, Qtop_level;
3387extern Lisp_Object Qerror, Qquit, Qargs_out_of_range;
3388extern Lisp_Object Qvoid_variable, Qvoid_function;
3389extern Lisp_Object Qinvalid_read_syntax;
3390extern Lisp_Object Qinvalid_function, Qwrong_number_of_arguments, Qno_catch;
3391extern Lisp_Object Quser_error, Qend_of_file, Qarith_error, Qmark_inactive;
3392extern Lisp_Object Qbeginning_of_buffer, Qend_of_buffer, Qbuffer_read_only;
3393extern Lisp_Object Qtext_read_only;
3394extern Lisp_Object Qinteractive_form;
3395extern Lisp_Object Qcircular_list;
3396extern Lisp_Object Qsequencep;
3397extern Lisp_Object Qchar_or_string_p, Qinteger_or_marker_p;
3398extern Lisp_Object Qfboundp;
3399
3400extern Lisp_Object Qcdr;
3401
3402extern Lisp_Object Qrange_error, Qoverflow_error;
3403
3404extern Lisp_Object Qnumber_or_marker_p;
3405
3406extern Lisp_Object Qbuffer, Qinteger, Qsymbol;
3407
3408/* Defined in data.c. */
3409extern Lisp_Object indirect_function (Lisp_Object); 3391extern Lisp_Object indirect_function (Lisp_Object);
3410extern Lisp_Object find_symbol_value (Lisp_Object); 3392extern Lisp_Object find_symbol_value (Lisp_Object);
3411enum Arith_Comparison { 3393enum Arith_Comparison {
@@ -3461,7 +3443,6 @@ extern void syms_of_cmds (void);
3461extern void keys_of_cmds (void); 3443extern void keys_of_cmds (void);
3462 3444
3463/* Defined in coding.c. */ 3445/* Defined in coding.c. */
3464extern Lisp_Object Qcharset;
3465extern Lisp_Object detect_coding_system (const unsigned char *, ptrdiff_t, 3446extern Lisp_Object detect_coding_system (const unsigned char *, ptrdiff_t,
3466 ptrdiff_t, bool, bool, Lisp_Object); 3447 ptrdiff_t, bool, bool, Lisp_Object);
3467extern void init_coding (void); 3448extern void init_coding (void);
@@ -3485,14 +3466,10 @@ extern void init_syntax_once (void);
3485extern void syms_of_syntax (void); 3466extern void syms_of_syntax (void);
3486 3467
3487/* Defined in fns.c. */ 3468/* Defined in fns.c. */
3488extern Lisp_Object QCrehash_size, QCrehash_threshold;
3489enum { NEXT_ALMOST_PRIME_LIMIT = 11 }; 3469enum { NEXT_ALMOST_PRIME_LIMIT = 11 };
3490extern EMACS_INT next_almost_prime (EMACS_INT) ATTRIBUTE_CONST; 3470extern EMACS_INT next_almost_prime (EMACS_INT) ATTRIBUTE_CONST;
3491extern Lisp_Object larger_vector (Lisp_Object, ptrdiff_t, ptrdiff_t); 3471extern Lisp_Object larger_vector (Lisp_Object, ptrdiff_t, ptrdiff_t);
3492extern void sweep_weak_hash_tables (void); 3472extern void sweep_weak_hash_tables (void);
3493extern Lisp_Object Qcursor_in_echo_area;
3494extern Lisp_Object Qstring_lessp;
3495extern Lisp_Object QCsize, QCtest, QCweakness, Qequal, Qeq;
3496EMACS_UINT hash_string (char const *, ptrdiff_t); 3473EMACS_UINT hash_string (char const *, ptrdiff_t);
3497EMACS_UINT sxhash (Lisp_Object, int); 3474EMACS_UINT sxhash (Lisp_Object, int);
3498Lisp_Object make_hash_table (struct hash_table_test, Lisp_Object, Lisp_Object, 3475Lisp_Object make_hash_table (struct hash_table_test, Lisp_Object, Lisp_Object,
@@ -3532,15 +3509,11 @@ extern void init_fringe_once (void);
3532#endif /* HAVE_WINDOW_SYSTEM */ 3509#endif /* HAVE_WINDOW_SYSTEM */
3533 3510
3534/* Defined in image.c. */ 3511/* Defined in image.c. */
3535extern Lisp_Object QCascent, QCmargin, QCrelief;
3536extern Lisp_Object QCconversion;
3537extern int x_bitmap_mask (struct frame *, ptrdiff_t); 3512extern int x_bitmap_mask (struct frame *, ptrdiff_t);
3538extern void reset_image_types (void); 3513extern void reset_image_types (void);
3539extern void syms_of_image (void); 3514extern void syms_of_image (void);
3540 3515
3541/* Defined in insdel.c. */ 3516/* Defined in insdel.c. */
3542extern Lisp_Object Qinhibit_modification_hooks;
3543extern Lisp_Object Qregion_extract_function;
3544extern void move_gap_both (ptrdiff_t, ptrdiff_t); 3517extern void move_gap_both (ptrdiff_t, ptrdiff_t);
3545extern _Noreturn void buffer_overflow (void); 3518extern _Noreturn void buffer_overflow (void);
3546extern void make_gap (ptrdiff_t); 3519extern void make_gap (ptrdiff_t);
@@ -3595,18 +3568,6 @@ extern Lisp_Object Vwindow_system;
3595extern Lisp_Object sit_for (Lisp_Object, bool, int); 3568extern Lisp_Object sit_for (Lisp_Object, bool, int);
3596 3569
3597/* Defined in xdisp.c. */ 3570/* Defined in xdisp.c. */
3598extern Lisp_Object Qinhibit_point_motion_hooks;
3599extern Lisp_Object Qinhibit_redisplay;
3600extern Lisp_Object Qmenu_bar_update_hook;
3601extern Lisp_Object Qwindow_scroll_functions;
3602extern Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map;
3603extern Lisp_Object Qtext, Qboth, Qboth_horiz, Qtext_image_horiz;
3604extern Lisp_Object Qspace, Qcenter, QCalign_to;
3605extern Lisp_Object Qbar, Qhbar, Qhollow;
3606extern Lisp_Object Qleft_margin, Qright_margin;
3607extern Lisp_Object QCdata, QCfile;
3608extern Lisp_Object QCmap;
3609extern Lisp_Object Qrisky_local_variable;
3610extern bool noninteractive_need_newline; 3571extern bool noninteractive_need_newline;
3611extern Lisp_Object echo_area_buffer[2]; 3572extern Lisp_Object echo_area_buffer[2];
3612extern void add_to_log (const char *, Lisp_Object, Lisp_Object); 3573extern void add_to_log (const char *, Lisp_Object, Lisp_Object);
@@ -3740,8 +3701,6 @@ build_string (const char *str)
3740 3701
3741extern Lisp_Object pure_cons (Lisp_Object, Lisp_Object); 3702extern Lisp_Object pure_cons (Lisp_Object, Lisp_Object);
3742extern void make_byte_code (struct Lisp_Vector *); 3703extern void make_byte_code (struct Lisp_Vector *);
3743extern Lisp_Object Qautomatic_gc;
3744extern Lisp_Object Qchar_table_extra_slots;
3745extern struct Lisp_Vector *allocate_vector (EMACS_INT); 3704extern struct Lisp_Vector *allocate_vector (EMACS_INT);
3746 3705
3747/* Make an uninitialized vector for SIZE objects. NOTE: you must 3706/* Make an uninitialized vector for SIZE objects. NOTE: you must
@@ -3845,11 +3804,8 @@ extern void syms_of_chartab (void);
3845/* Defined in print.c. */ 3804/* Defined in print.c. */
3846extern Lisp_Object Vprin1_to_string_buffer; 3805extern Lisp_Object Vprin1_to_string_buffer;
3847extern void debug_print (Lisp_Object) EXTERNALLY_VISIBLE; 3806extern void debug_print (Lisp_Object) EXTERNALLY_VISIBLE;
3848extern Lisp_Object Qstandard_output;
3849extern Lisp_Object Qexternal_debugging_output;
3850extern void temp_output_buffer_setup (const char *); 3807extern void temp_output_buffer_setup (const char *);
3851extern int print_level; 3808extern int print_level;
3852extern Lisp_Object Qprint_escape_newlines;
3853extern void write_string (const char *, int); 3809extern void write_string (const char *, int);
3854extern void print_error_message (Lisp_Object, Lisp_Object, const char *, 3810extern void print_error_message (Lisp_Object, Lisp_Object, const char *,
3855 Lisp_Object); 3811 Lisp_Object);
@@ -3873,13 +3829,11 @@ extern ptrdiff_t evxprintf (char **, ptrdiff_t *, char const *, ptrdiff_t,
3873 ATTRIBUTE_FORMAT_PRINTF (5, 0); 3829 ATTRIBUTE_FORMAT_PRINTF (5, 0);
3874 3830
3875/* Defined in lread.c. */ 3831/* Defined in lread.c. */
3876extern Lisp_Object Qsize, Qvariable_documentation, Qstandard_input;
3877extern Lisp_Object Qbackquote, Qcomma, Qcomma_at, Qcomma_dot, Qfunction;
3878extern Lisp_Object Qlexical_binding;
3879extern Lisp_Object check_obarray (Lisp_Object); 3832extern Lisp_Object check_obarray (Lisp_Object);
3880extern Lisp_Object intern_1 (const char *, ptrdiff_t); 3833extern Lisp_Object intern_1 (const char *, ptrdiff_t);
3881extern Lisp_Object intern_c_string_1 (const char *, ptrdiff_t); 3834extern Lisp_Object intern_c_string_1 (const char *, ptrdiff_t);
3882extern Lisp_Object intern_driver (Lisp_Object, Lisp_Object, ptrdiff_t); 3835extern Lisp_Object intern_driver (Lisp_Object, Lisp_Object, Lisp_Object);
3836extern void init_symbol (Lisp_Object, Lisp_Object);
3883extern Lisp_Object oblookup (Lisp_Object, const char *, ptrdiff_t, ptrdiff_t); 3837extern Lisp_Object oblookup (Lisp_Object, const char *, ptrdiff_t, ptrdiff_t);
3884INLINE void 3838INLINE void
3885LOADHIST_ATTACH (Lisp_Object x) 3839LOADHIST_ATTACH (Lisp_Object x)
@@ -3911,10 +3865,8 @@ intern_c_string (const char *str)
3911 3865
3912/* Defined in eval.c. */ 3866/* Defined in eval.c. */
3913extern EMACS_INT lisp_eval_depth; 3867extern EMACS_INT lisp_eval_depth;
3914extern Lisp_Object Qexit, Qinteractive, Qcommandp, Qmacro;
3915extern Lisp_Object Qinhibit_quit, Qinternal_interpreter_environment, Qclosure;
3916extern Lisp_Object Qand_rest;
3917extern Lisp_Object Vautoload_queue; 3868extern Lisp_Object Vautoload_queue;
3869extern Lisp_Object Vrun_hooks;
3918extern Lisp_Object Vsignaling_function; 3870extern Lisp_Object Vsignaling_function;
3919extern Lisp_Object inhibit_lisp_code; 3871extern Lisp_Object inhibit_lisp_code;
3920extern struct handler *handlerlist; 3872extern struct handler *handlerlist;
@@ -3926,7 +3878,7 @@ extern struct handler *handlerlist;
3926 call1 (Vrun_hooks, Qmy_funny_hook); 3878 call1 (Vrun_hooks, Qmy_funny_hook);
3927 3879
3928 should no longer be used. */ 3880 should no longer be used. */
3929extern Lisp_Object Vrun_hooks; 3881extern void run_hook (Lisp_Object);
3930extern void run_hook_with_args_2 (Lisp_Object, Lisp_Object, Lisp_Object); 3882extern void run_hook_with_args_2 (Lisp_Object, Lisp_Object, Lisp_Object);
3931extern Lisp_Object run_hook_with_args (ptrdiff_t nargs, Lisp_Object *args, 3883extern Lisp_Object run_hook_with_args (ptrdiff_t nargs, Lisp_Object *args,
3932 Lisp_Object (*funcall) 3884 Lisp_Object (*funcall)
@@ -3987,7 +3939,6 @@ extern bool let_shadows_global_binding_p (Lisp_Object symbol);
3987 3939
3988 3940
3989/* Defined in editfns.c. */ 3941/* Defined in editfns.c. */
3990extern Lisp_Object Qfield;
3991extern void insert1 (Lisp_Object); 3942extern void insert1 (Lisp_Object);
3992extern Lisp_Object format2 (const char *, Lisp_Object, Lisp_Object); 3943extern Lisp_Object format2 (const char *, Lisp_Object, Lisp_Object);
3993extern Lisp_Object save_excursion_save (void); 3944extern Lisp_Object save_excursion_save (void);
@@ -4034,12 +3985,6 @@ extern void syms_of_marker (void);
4034 3985
4035/* Defined in fileio.c. */ 3986/* Defined in fileio.c. */
4036 3987
4037extern Lisp_Object Qfile_error;
4038extern Lisp_Object Qfile_notify_error;
4039extern Lisp_Object Qfile_exists_p;
4040extern Lisp_Object Qfile_directory_p;
4041extern Lisp_Object Qinsert_file_contents;
4042extern Lisp_Object Qfile_name_history;
4043extern Lisp_Object expand_and_dir_to_file (Lisp_Object, Lisp_Object); 3988extern Lisp_Object expand_and_dir_to_file (Lisp_Object, Lisp_Object);
4044extern Lisp_Object write_region (Lisp_Object, Lisp_Object, Lisp_Object, 3989extern Lisp_Object write_region (Lisp_Object, Lisp_Object, Lisp_Object,
4045 Lisp_Object, Lisp_Object, Lisp_Object, 3990 Lisp_Object, Lisp_Object, Lisp_Object,
@@ -4056,7 +4001,6 @@ extern bool file_accessible_directory_p (Lisp_Object);
4056extern void init_fileio (void); 4001extern void init_fileio (void);
4057extern void syms_of_fileio (void); 4002extern void syms_of_fileio (void);
4058extern Lisp_Object make_temp_name (Lisp_Object, bool); 4003extern Lisp_Object make_temp_name (Lisp_Object, bool);
4059extern Lisp_Object Qdelete_file;
4060 4004
4061/* Defined in search.c. */ 4005/* Defined in search.c. */
4062extern void shrink_regexp_cache (void); 4006extern void shrink_regexp_cache (void);
@@ -4086,7 +4030,6 @@ extern void clear_regexp_cache (void);
4086 4030
4087/* Defined in minibuf.c. */ 4031/* Defined in minibuf.c. */
4088 4032
4089extern Lisp_Object Qcompletion_ignore_case;
4090extern Lisp_Object Vminibuffer_list; 4033extern Lisp_Object Vminibuffer_list;
4091extern Lisp_Object last_minibuf_string; 4034extern Lisp_Object last_minibuf_string;
4092extern Lisp_Object get_minibuffer (EMACS_INT); 4035extern Lisp_Object get_minibuffer (EMACS_INT);
@@ -4095,15 +4038,10 @@ extern void syms_of_minibuf (void);
4095 4038
4096/* Defined in callint.c. */ 4039/* Defined in callint.c. */
4097 4040
4098extern Lisp_Object Qminus, Qplus;
4099extern Lisp_Object Qprogn;
4100extern Lisp_Object Qwhen;
4101extern Lisp_Object Qmouse_leave_buffer_hook;
4102extern void syms_of_callint (void); 4041extern void syms_of_callint (void);
4103 4042
4104/* Defined in casefiddle.c. */ 4043/* Defined in casefiddle.c. */
4105 4044
4106extern Lisp_Object Qidentity;
4107extern void syms_of_casefiddle (void); 4045extern void syms_of_casefiddle (void);
4108extern void keys_of_casefiddle (void); 4046extern void keys_of_casefiddle (void);
4109 4047
@@ -4117,8 +4055,6 @@ extern void syms_of_casetab (void);
4117extern Lisp_Object echo_message_buffer; 4055extern Lisp_Object echo_message_buffer;
4118extern struct kboard *echo_kboard; 4056extern struct kboard *echo_kboard;
4119extern void cancel_echoing (void); 4057extern void cancel_echoing (void);
4120extern Lisp_Object Qdisabled, QCfilter;
4121extern Lisp_Object Qup, Qdown;
4122extern Lisp_Object last_undo_boundary; 4058extern Lisp_Object last_undo_boundary;
4123extern bool input_pending; 4059extern bool input_pending;
4124#ifdef HAVE_STACK_OVERFLOW_HANDLING 4060#ifdef HAVE_STACK_OVERFLOW_HANDLING
@@ -4152,7 +4088,6 @@ extern bool indented_beyond_p (ptrdiff_t, ptrdiff_t, EMACS_INT);
4152extern void syms_of_indent (void); 4088extern void syms_of_indent (void);
4153 4089
4154/* Defined in frame.c. */ 4090/* Defined in frame.c. */
4155extern Lisp_Object Qonly, Qnone;
4156extern void store_frame_param (struct frame *, Lisp_Object, Lisp_Object); 4091extern void store_frame_param (struct frame *, Lisp_Object, Lisp_Object);
4157extern void store_in_alist (Lisp_Object *, Lisp_Object, Lisp_Object); 4092extern void store_in_alist (Lisp_Object *, Lisp_Object, Lisp_Object);
4158extern Lisp_Object do_switch_frame (Lisp_Object, int, int, Lisp_Object); 4093extern Lisp_Object do_switch_frame (Lisp_Object, int, int, Lisp_Object);
@@ -4168,9 +4103,7 @@ extern bool display_arg;
4168#endif 4103#endif
4169extern Lisp_Object decode_env_path (const char *, const char *, bool); 4104extern Lisp_Object decode_env_path (const char *, const char *, bool);
4170extern Lisp_Object empty_unibyte_string, empty_multibyte_string; 4105extern Lisp_Object empty_unibyte_string, empty_multibyte_string;
4171extern Lisp_Object Qfile_name_handler_alist;
4172extern _Noreturn void terminate_due_to_signal (int, int); 4106extern _Noreturn void terminate_due_to_signal (int, int);
4173extern Lisp_Object Qkill_emacs;
4174#ifdef WINDOWSNT 4107#ifdef WINDOWSNT
4175extern Lisp_Object Vlibrary_cache; 4108extern Lisp_Object Vlibrary_cache;
4176#endif 4109#endif
@@ -4205,7 +4138,6 @@ extern bool inhibit_window_system;
4205extern bool running_asynch_code; 4138extern bool running_asynch_code;
4206 4139
4207/* Defined in process.c. */ 4140/* Defined in process.c. */
4208extern Lisp_Object QCtype, Qlocal;
4209extern void kill_buffer_processes (Lisp_Object); 4141extern void kill_buffer_processes (Lisp_Object);
4210extern int wait_reading_process_output (intmax_t, int, int, bool, Lisp_Object, 4142extern int wait_reading_process_output (intmax_t, int, int, bool, Lisp_Object,
4211 struct Lisp_Process *, int); 4143 struct Lisp_Process *, int);
@@ -4241,7 +4173,6 @@ extern void set_initial_environment (void);
4241extern void syms_of_callproc (void); 4173extern void syms_of_callproc (void);
4242 4174
4243/* Defined in doc.c. */ 4175/* Defined in doc.c. */
4244extern Lisp_Object Qfunction_documentation;
4245extern Lisp_Object read_doc_string (Lisp_Object); 4176extern Lisp_Object read_doc_string (Lisp_Object);
4246extern Lisp_Object get_doc_string (Lisp_Object, bool, bool); 4177extern Lisp_Object get_doc_string (Lisp_Object, bool, bool);
4247extern void syms_of_doc (void); 4178extern void syms_of_doc (void);
@@ -4262,8 +4193,6 @@ extern void init_macros (void);
4262extern void syms_of_macros (void); 4193extern void syms_of_macros (void);
4263 4194
4264/* Defined in undo.c. */ 4195/* Defined in undo.c. */
4265extern Lisp_Object Qapply;
4266extern Lisp_Object Qinhibit_read_only;
4267extern void truncate_undo_list (struct buffer *); 4196extern void truncate_undo_list (struct buffer *);
4268extern void record_insert (ptrdiff_t, ptrdiff_t); 4197extern void record_insert (ptrdiff_t, ptrdiff_t);
4269extern void record_delete (ptrdiff_t, Lisp_Object, bool); 4198extern void record_delete (ptrdiff_t, Lisp_Object, bool);
@@ -4273,11 +4202,8 @@ extern void record_property_change (ptrdiff_t, ptrdiff_t,
4273 Lisp_Object, Lisp_Object, 4202 Lisp_Object, Lisp_Object,
4274 Lisp_Object); 4203 Lisp_Object);
4275extern void syms_of_undo (void); 4204extern void syms_of_undo (void);
4276/* Defined in textprop.c. */
4277extern Lisp_Object Qmouse_face;
4278extern Lisp_Object Qinsert_in_front_hooks, Qinsert_behind_hooks;
4279extern Lisp_Object Qminibuffer_prompt;
4280 4205
4206/* Defined in textprop.c. */
4281extern void report_interval_modification (Lisp_Object, Lisp_Object); 4207extern void report_interval_modification (Lisp_Object, Lisp_Object);
4282 4208
4283/* Defined in menu.c. */ 4209/* Defined in menu.c. */
@@ -4361,9 +4287,6 @@ extern void init_font (void);
4361#ifdef HAVE_WINDOW_SYSTEM 4287#ifdef HAVE_WINDOW_SYSTEM
4362/* Defined in fontset.c. */ 4288/* Defined in fontset.c. */
4363extern void syms_of_fontset (void); 4289extern void syms_of_fontset (void);
4364
4365/* Defined in xfns.c, w32fns.c, or macfns.c. */
4366extern Lisp_Object Qfont_param;
4367#endif 4290#endif
4368 4291
4369/* Defined in gfilenotify.c */ 4292/* Defined in gfilenotify.c */
@@ -4383,16 +4306,6 @@ extern void syms_of_w32notify (void);
4383#endif 4306#endif
4384 4307
4385/* Defined in xfaces.c. */ 4308/* Defined in xfaces.c. */
4386extern Lisp_Object Qdefault, Qfringe;
4387extern Lisp_Object Qscroll_bar, Qcursor;
4388extern Lisp_Object Qmode_line_inactive;
4389extern Lisp_Object Qface;
4390extern Lisp_Object Qnormal;
4391extern Lisp_Object QCfamily, QCweight, QCslant;
4392extern Lisp_Object QCheight, QCname, QCwidth, QCforeground, QCbackground;
4393extern Lisp_Object Qextra_light, Qlight, Qsemi_light, Qsemi_bold;
4394extern Lisp_Object Qbold, Qextra_bold, Qultra_bold;
4395extern Lisp_Object Qoblique, Qitalic;
4396extern Lisp_Object Vface_alternative_font_family_alist; 4309extern Lisp_Object Vface_alternative_font_family_alist;
4397extern Lisp_Object Vface_alternative_font_registry_alist; 4310extern Lisp_Object Vface_alternative_font_registry_alist;
4398extern void syms_of_xfaces (void); 4311extern void syms_of_xfaces (void);