aboutsummaryrefslogtreecommitdiffstats
path: root/src/lisp.h
diff options
context:
space:
mode:
authorJoakim Verona2015-01-11 18:40:21 +0100
committerJoakim Verona2015-01-11 18:40:21 +0100
commitcc7cb20d6abc0f862e5513b24831bba0eaecaa5f (patch)
treeafc2fc05401504aa0c28699dc3bc155c5b0d7f58 /src/lisp.h
parentd972b504f30ff4300ba368940751e8736dddf0b4 (diff)
parent9a57bda31569294ecaf8138a06e5edda9c0d87e3 (diff)
downloademacs-cc7cb20d6abc0f862e5513b24831bba0eaecaa5f.tar.gz
emacs-cc7cb20d6abc0f862e5513b24831bba0eaecaa5f.zip
merge master, fix conflicts
Diffstat (limited to 'src/lisp.h')
-rw-r--r--src/lisp.h434
1 files changed, 196 insertions, 238 deletions
diff --git a/src/lisp.h b/src/lisp.h
index d416661e5f4..9e1f1501464 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -233,8 +233,8 @@ extern bool suppress_checking EXTERNALLY_VISIBLE;
233 233
234 USE_LSB_TAG not only requires the least 3 bits of pointers returned by 234 USE_LSB_TAG not only requires the least 3 bits of pointers returned by
235 malloc to be 0 but also needs to be able to impose a mult-of-8 alignment 235 malloc to be 0 but also needs to be able to impose a mult-of-8 alignment
236 on the few static Lisp_Objects used: all the defsubr as well 236 on the few static Lisp_Objects used: lispsym, all the defsubr, and
237 as the two special buffers buffer_defaults and buffer_local_symbols. */ 237 the two special buffers buffer_defaults and buffer_local_symbols. */
238 238
239enum Lisp_Bits 239enum Lisp_Bits
240 { 240 {
@@ -354,9 +354,8 @@ error !;
354#define lisp_h_XCONS(a) \ 354#define lisp_h_XCONS(a) \
355 (eassert (CONSP (a)), (struct Lisp_Cons *) XUNTAG (a, Lisp_Cons)) 355 (eassert (CONSP (a)), (struct Lisp_Cons *) XUNTAG (a, Lisp_Cons))
356#define lisp_h_XHASH(a) XUINT (a) 356#define lisp_h_XHASH(a) XUINT (a)
357#define lisp_h_XPNTR(a) ((void *) (intptr_t) (XLI (a) & VALMASK)) 357#define lisp_h_XPNTR(a) \
358#define lisp_h_XSYMBOL(a) \ 358 (SYMBOLP (a) ? XSYMBOL (a) : (void *) ((intptr_t) (XLI (a) & VALMASK)))
359 (eassert (SYMBOLP (a)), (struct Lisp_Symbol *) XUNTAG (a, Lisp_Symbol))
360#ifndef GC_CHECK_CONS_LIST 359#ifndef GC_CHECK_CONS_LIST
361# define lisp_h_check_cons_list() ((void) 0) 360# define lisp_h_check_cons_list() ((void) 0)
362#endif 361#endif
@@ -365,8 +364,12 @@ error !;
365 XIL ((EMACS_INT) (((EMACS_UINT) (n) << INTTYPEBITS) + Lisp_Int0)) 364 XIL ((EMACS_INT) (((EMACS_UINT) (n) << INTTYPEBITS) + Lisp_Int0))
366# define lisp_h_XFASTINT(a) XINT (a) 365# define lisp_h_XFASTINT(a) XINT (a)
367# define lisp_h_XINT(a) (XLI (a) >> INTTYPEBITS) 366# define lisp_h_XINT(a) (XLI (a) >> INTTYPEBITS)
367# define lisp_h_XSYMBOL(a) \
368 (eassert (SYMBOLP (a)), \
369 (struct Lisp_Symbol *) ((uintptr_t) XLI (a) - Lisp_Symbol \
370 + (char *) lispsym))
368# define lisp_h_XTYPE(a) ((enum Lisp_Type) (XLI (a) & ~VALMASK)) 371# define lisp_h_XTYPE(a) ((enum Lisp_Type) (XLI (a) & ~VALMASK))
369# define lisp_h_XUNTAG(a, type) ((void *) (XLI (a) - (type))) 372# define lisp_h_XUNTAG(a, type) ((void *) (intptr_t) (XLI (a) - (type)))
370#endif 373#endif
371 374
372/* When compiling via gcc -O0, define the key operations as macros, as 375/* When compiling via gcc -O0, define the key operations as macros, as
@@ -398,7 +401,6 @@ error !;
398# define XCONS(a) lisp_h_XCONS (a) 401# define XCONS(a) lisp_h_XCONS (a)
399# define XHASH(a) lisp_h_XHASH (a) 402# define XHASH(a) lisp_h_XHASH (a)
400# define XPNTR(a) lisp_h_XPNTR (a) 403# define XPNTR(a) lisp_h_XPNTR (a)
401# define XSYMBOL(a) lisp_h_XSYMBOL (a)
402# ifndef GC_CHECK_CONS_LIST 404# ifndef GC_CHECK_CONS_LIST
403# define check_cons_list() lisp_h_check_cons_list () 405# define check_cons_list() lisp_h_check_cons_list ()
404# endif 406# endif
@@ -406,6 +408,7 @@ error !;
406# define make_number(n) lisp_h_make_number (n) 408# define make_number(n) lisp_h_make_number (n)
407# define XFASTINT(a) lisp_h_XFASTINT (a) 409# define XFASTINT(a) lisp_h_XFASTINT (a)
408# define XINT(a) lisp_h_XINT (a) 410# define XINT(a) lisp_h_XINT (a)
411# define XSYMBOL(a) lisp_h_XSYMBOL (a)
409# define XTYPE(a) lisp_h_XTYPE (a) 412# define XTYPE(a) lisp_h_XTYPE (a)
410# define XUNTAG(a, type) lisp_h_XUNTAG (a, type) 413# define XUNTAG(a, type) lisp_h_XUNTAG (a, type)
411# endif 414# endif
@@ -447,20 +450,20 @@ error !;
447 450
448enum Lisp_Type 451enum Lisp_Type
449 { 452 {
450 /* Integer. XINT (obj) is the integer value. */
451 Lisp_Int0 = 0,
452 Lisp_Int1 = USE_LSB_TAG ? 1 << INTTYPEBITS : 1,
453
454 /* Symbol. XSYMBOL (object) points to a struct Lisp_Symbol. */ 453 /* Symbol. XSYMBOL (object) points to a struct Lisp_Symbol. */
455 Lisp_Symbol = 2, 454 Lisp_Symbol = 0,
456 455
457 /* Miscellaneous. XMISC (object) points to a union Lisp_Misc, 456 /* Miscellaneous. XMISC (object) points to a union Lisp_Misc,
458 whose first member indicates the subtype. */ 457 whose first member indicates the subtype. */
459 Lisp_Misc = 3, 458 Lisp_Misc = 1,
459
460 /* Integer. XINT (obj) is the integer value. */
461 Lisp_Int0 = 2,
462 Lisp_Int1 = USE_LSB_TAG ? 6 : 3,
460 463
461 /* String. XSTRING (object) points to a struct Lisp_String. 464 /* String. XSTRING (object) points to a struct Lisp_String.
462 The length of the string, and its contents, are stored therein. */ 465 The length of the string, and its contents, are stored therein. */
463 Lisp_String = USE_LSB_TAG ? 1 : 1 << INTTYPEBITS, 466 Lisp_String = 4,
464 467
465 /* Vector of Lisp objects, or something resembling it. 468 /* Vector of Lisp objects, or something resembling it.
466 XVECTOR (object) points to a struct Lisp_Vector, which contains 469 XVECTOR (object) points to a struct Lisp_Vector, which contains
@@ -469,7 +472,7 @@ enum Lisp_Type
469 Lisp_Vectorlike = 5, 472 Lisp_Vectorlike = 5,
470 473
471 /* Cons. XCONS (object) points to a struct Lisp_Cons. */ 474 /* Cons. XCONS (object) points to a struct Lisp_Cons. */
472 Lisp_Cons = 6, 475 Lisp_Cons = USE_LSB_TAG ? 3 : 6,
473 476
474 Lisp_Float = 7 477 Lisp_Float = 7
475 }; 478 };
@@ -562,7 +565,7 @@ enum Lisp_Fwd_Type
562 565
563typedef struct { EMACS_INT i; } Lisp_Object; 566typedef struct { EMACS_INT i; } Lisp_Object;
564 567
565#define LISP_INITIALLY_ZERO {0} 568#define LISP_INITIALLY(i) {i}
566 569
567#undef CHECK_LISP_OBJECT_TYPE 570#undef CHECK_LISP_OBJECT_TYPE
568enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = true }; 571enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = true };
@@ -571,9 +574,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. */ 574/* If a struct type is not wanted, define Lisp_Object as just a number. */
572 575
573typedef EMACS_INT Lisp_Object; 576typedef EMACS_INT Lisp_Object;
574#define LISP_INITIALLY_ZERO 0 577#define LISP_INITIALLY(i) (i)
575enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = false }; 578enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = false };
576#endif /* CHECK_LISP_OBJECT_TYPE */ 579#endif /* CHECK_LISP_OBJECT_TYPE */
580
581#define LISP_INITIALLY_ZERO LISP_INITIALLY (0)
577 582
578/* Forward declarations. */ 583/* Forward declarations. */
579 584
@@ -604,18 +609,15 @@ INLINE bool (SYMBOLP) (Lisp_Object);
604INLINE bool (VECTORLIKEP) (Lisp_Object); 609INLINE bool (VECTORLIKEP) (Lisp_Object);
605INLINE bool WINDOWP (Lisp_Object); 610INLINE bool WINDOWP (Lisp_Object);
606INLINE struct Lisp_Save_Value *XSAVE_VALUE (Lisp_Object); 611INLINE struct Lisp_Save_Value *XSAVE_VALUE (Lisp_Object);
612INLINE struct Lisp_Symbol *(XSYMBOL) (Lisp_Object);
613INLINE enum Lisp_Type (XTYPE) (Lisp_Object);
614INLINE void *(XUNTAG) (Lisp_Object, int);
607 615
608/* Defined in chartab.c. */ 616/* Defined in chartab.c. */
609extern Lisp_Object char_table_ref (Lisp_Object, int); 617extern Lisp_Object char_table_ref (Lisp_Object, int);
610extern void char_table_set (Lisp_Object, int, Lisp_Object); 618extern void char_table_set (Lisp_Object, int, Lisp_Object);
611 619
612/* Defined in data.c. */ 620/* 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); 621extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object);
620extern _Noreturn void wrong_choice (Lisp_Object, Lisp_Object); 622extern _Noreturn void wrong_choice (Lisp_Object, Lisp_Object);
621 623
@@ -625,22 +627,122 @@ extern bool might_dump;
625 Used during startup to detect startup of dumped Emacs. */ 627 Used during startup to detect startup of dumped Emacs. */
626extern bool initialized; 628extern bool initialized;
627 629
628/* Defined in eval.c. */
629extern Lisp_Object Qautoload;
630
631/* Defined in floatfns.c. */ 630/* Defined in floatfns.c. */
632extern double extract_float (Lisp_Object); 631extern double extract_float (Lisp_Object);
633 632
634/* Defined in process.c. */ 633
635extern Lisp_Object Qprocessp; 634/* Interned state of a symbol. */
635
636enum symbol_interned
637{
638 SYMBOL_UNINTERNED = 0,
639 SYMBOL_INTERNED = 1,
640 SYMBOL_INTERNED_IN_INITIAL_OBARRAY = 2
641};
636 642
637/* Defined in window.c. */ 643enum symbol_redirect
638extern Lisp_Object Qwindowp; 644{
645 SYMBOL_PLAINVAL = 4,
646 SYMBOL_VARALIAS = 1,
647 SYMBOL_LOCALIZED = 2,
648 SYMBOL_FORWARDED = 3
649};
650
651struct Lisp_Symbol
652{
653 bool_bf gcmarkbit : 1;
654
655 /* Indicates where the value can be found:
656 0 : it's a plain var, the value is in the `value' field.
657 1 : it's a varalias, the value is really in the `alias' symbol.
658 2 : it's a localized var, the value is in the `blv' object.
659 3 : it's a forwarding variable, the value is in `forward'. */
660 ENUM_BF (symbol_redirect) redirect : 3;
661
662 /* Non-zero means symbol is constant, i.e. changing its value
663 should signal an error. If the value is 3, then the var
664 can be changed, but only by `defconst'. */
665 unsigned constant : 2;
666
667 /* Interned state of the symbol. This is an enumerator from
668 enum symbol_interned. */
669 unsigned interned : 2;
670
671 /* True means that this variable has been explicitly declared
672 special (with `defvar' etc), and shouldn't be lexically bound. */
673 bool_bf declared_special : 1;
674
675 /* True if pointed to from purespace and hence can't be GC'd. */
676 bool_bf pinned : 1;
677
678 /* The symbol's name, as a Lisp string. */
679 Lisp_Object name;
680
681 /* Value of the symbol or Qunbound if unbound. Which alternative of the
682 union is used depends on the `redirect' field above. */
683 union {
684 Lisp_Object value;
685 struct Lisp_Symbol *alias;
686 struct Lisp_Buffer_Local_Value *blv;
687 union Lisp_Fwd *fwd;
688 } val;
689
690 /* Function value of the symbol or Qnil if not fboundp. */
691 Lisp_Object function;
692
693 /* The symbol's property list. */
694 Lisp_Object plist;
695
696 /* Next symbol in obarray bucket, if the symbol is interned. */
697 struct Lisp_Symbol *next;
698};
699
700/* Declare a Lisp-callable function. The MAXARGS parameter has the same
701 meaning as in the DEFUN macro, and is used to construct a prototype. */
702/* We can use the same trick as in the DEFUN macro to generate the
703 appropriate prototype. */
704#define EXFUN(fnname, maxargs) \
705 extern Lisp_Object fnname DEFUN_ARGS_ ## maxargs
706
707/* Note that the weird token-substitution semantics of ANSI C makes
708 this work for MANY and UNEVALLED. */
709#define DEFUN_ARGS_MANY (ptrdiff_t, Lisp_Object *)
710#define DEFUN_ARGS_UNEVALLED (Lisp_Object)
711#define DEFUN_ARGS_0 (void)
712#define DEFUN_ARGS_1 (Lisp_Object)
713#define DEFUN_ARGS_2 (Lisp_Object, Lisp_Object)
714#define DEFUN_ARGS_3 (Lisp_Object, Lisp_Object, Lisp_Object)
715#define DEFUN_ARGS_4 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object)
716#define DEFUN_ARGS_5 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
717 Lisp_Object)
718#define DEFUN_ARGS_6 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
719 Lisp_Object, Lisp_Object)
720#define DEFUN_ARGS_7 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
721 Lisp_Object, Lisp_Object, Lisp_Object)
722#define DEFUN_ARGS_8 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
723 Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object)
724
725/* Yield an integer that contains TAG along with PTR. */
726#define TAG_PTR(tag, ptr) \
727 ((USE_LSB_TAG ? (tag) : (EMACS_UINT) (tag) << VALBITS) + (uintptr_t) (ptr))
728
729/* Yield an integer that contains a symbol tag along with OFFSET.
730 OFFSET should be the offset in bytes from 'lispsym' to the symbol. */
731#define TAG_SYMOFFSET(offset) \
732 TAG_PTR (Lisp_Symbol, \
733 ((uintptr_t) (offset) >> (USE_LSB_TAG ? 0 : GCTYPEBITS)))
734
735/* Declare extern constants for Lisp symbols. These can be helpful
736 when using a debugger like GDB, on older platforms where the debug
737 format does not represent C macros. */
738#define DEFINE_LISP_SYMBOL_BEGIN(name) \
739 DEFINE_GDB_SYMBOL_BEGIN (Lisp_Object, name)
740#define DEFINE_LISP_SYMBOL_END(name) \
741 DEFINE_GDB_SYMBOL_END (LISP_INITIALLY (TAG_SYMOFFSET (i##name \
742 * sizeof *lispsym)))
743
744#include "globals.h"
639 745
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. 746/* Convert a Lisp_Object to the corresponding EMACS_INT and vice versa.
645 At the machine level, these operations are no-ops. */ 747 At the machine level, these operations are no-ops. */
646LISP_MACRO_DEFUN (XLI, EMACS_INT, (Lisp_Object o), (o)) 748LISP_MACRO_DEFUN (XLI, EMACS_INT, (Lisp_Object o), (o))
@@ -731,6 +833,7 @@ LISP_MACRO_DEFUN (XPNTR, void *, (Lisp_Object a), (a))
731LISP_MACRO_DEFUN (make_number, Lisp_Object, (EMACS_INT n), (n)) 833LISP_MACRO_DEFUN (make_number, Lisp_Object, (EMACS_INT n), (n))
732LISP_MACRO_DEFUN (XINT, EMACS_INT, (Lisp_Object a), (a)) 834LISP_MACRO_DEFUN (XINT, EMACS_INT, (Lisp_Object a), (a))
733LISP_MACRO_DEFUN (XFASTINT, EMACS_INT, (Lisp_Object a), (a)) 835LISP_MACRO_DEFUN (XFASTINT, EMACS_INT, (Lisp_Object a), (a))
836LISP_MACRO_DEFUN (XSYMBOL, struct Lisp_Symbol *, (Lisp_Object a), (a))
734LISP_MACRO_DEFUN (XTYPE, enum Lisp_Type, (Lisp_Object a), (a)) 837LISP_MACRO_DEFUN (XTYPE, enum Lisp_Type, (Lisp_Object a), (a))
735LISP_MACRO_DEFUN (XUNTAG, void *, (Lisp_Object a, int type), (a, type)) 838LISP_MACRO_DEFUN (XUNTAG, void *, (Lisp_Object a, int type), (a, type))
736 839
@@ -785,6 +888,17 @@ XFASTINT (Lisp_Object a)
785 return n; 888 return n;
786} 889}
787 890
891/* Extract A's value as a symbol. */
892INLINE struct Lisp_Symbol *
893XSYMBOL (Lisp_Object a)
894{
895 uintptr_t i = (uintptr_t) XUNTAG (a, Lisp_Symbol);
896 if (! USE_LSB_TAG)
897 i <<= GCTYPEBITS;
898 void *p = (char *) lispsym + i;
899 return p;
900}
901
788/* Extract A's type. */ 902/* Extract A's type. */
789INLINE enum Lisp_Type 903INLINE enum Lisp_Type
790XTYPE (Lisp_Object a) 904XTYPE (Lisp_Object a)
@@ -797,12 +911,8 @@ XTYPE (Lisp_Object a)
797INLINE void * 911INLINE void *
798XUNTAG (Lisp_Object a, int type) 912XUNTAG (Lisp_Object a, int type)
799{ 913{
800 if (USE_LSB_TAG) 914 intptr_t i = USE_LSB_TAG ? XLI (a) - type : XLI (a) & VALMASK;
801 { 915 return (void *) i;
802 intptr_t i = XLI (a) - type;
803 return (void *) i;
804 }
805 return XPNTR (a);
806} 916}
807 917
808#endif /* ! USE_LSB_TAG */ 918#endif /* ! USE_LSB_TAG */
@@ -864,7 +974,9 @@ XSTRING (Lisp_Object a)
864 return XUNTAG (a, Lisp_String); 974 return XUNTAG (a, Lisp_String);
865} 975}
866 976
867LISP_MACRO_DEFUN (XSYMBOL, struct Lisp_Symbol *, (Lisp_Object a), (a)) 977/* The index of the C-defined Lisp symbol SYM.
978 This can be used in a static initializer. */
979#define SYMBOL_INDEX(sym) i##sym
868 980
869INLINE struct Lisp_Float * 981INLINE struct Lisp_Float *
870XFLOAT (Lisp_Object a) 982XFLOAT (Lisp_Object a)
@@ -935,14 +1047,26 @@ XBOOL_VECTOR (Lisp_Object a)
935INLINE Lisp_Object 1047INLINE Lisp_Object
936make_lisp_ptr (void *ptr, enum Lisp_Type type) 1048make_lisp_ptr (void *ptr, enum Lisp_Type type)
937{ 1049{
938 EMACS_UINT utype = type; 1050 Lisp_Object a = XIL (TAG_PTR (type, ptr));
939 EMACS_UINT typebits = USE_LSB_TAG ? type : utype << VALBITS;
940 Lisp_Object a = XIL (typebits | (uintptr_t) ptr);
941 eassert (XTYPE (a) == type && XUNTAG (a, type) == ptr); 1051 eassert (XTYPE (a) == type && XUNTAG (a, type) == ptr);
942 return a; 1052 return a;
943} 1053}
944 1054
945INLINE Lisp_Object 1055INLINE Lisp_Object
1056make_lisp_symbol (struct Lisp_Symbol *sym)
1057{
1058 Lisp_Object a = XIL (TAG_SYMOFFSET ((char *) sym - (char *) lispsym));
1059 eassert (XSYMBOL (a) == sym);
1060 return a;
1061}
1062
1063INLINE Lisp_Object
1064builtin_lisp_symbol (int index)
1065{
1066 return make_lisp_symbol (lispsym + index);
1067}
1068
1069INLINE Lisp_Object
946make_lisp_proc (struct Lisp_Process *p) 1070make_lisp_proc (struct Lisp_Process *p)
947{ 1071{
948 return make_lisp_ptr (p, Lisp_Vectorlike); 1072 return make_lisp_ptr (p, Lisp_Vectorlike);
@@ -953,7 +1077,7 @@ make_lisp_proc (struct Lisp_Process *p)
953#define XSETCONS(a, b) ((a) = make_lisp_ptr (b, Lisp_Cons)) 1077#define XSETCONS(a, b) ((a) = make_lisp_ptr (b, Lisp_Cons))
954#define XSETVECTOR(a, b) ((a) = make_lisp_ptr (b, Lisp_Vectorlike)) 1078#define XSETVECTOR(a, b) ((a) = make_lisp_ptr (b, Lisp_Vectorlike))
955#define XSETSTRING(a, b) ((a) = make_lisp_ptr (b, Lisp_String)) 1079#define XSETSTRING(a, b) ((a) = make_lisp_ptr (b, Lisp_String))
956#define XSETSYMBOL(a, b) ((a) = make_lisp_ptr (b, Lisp_Symbol)) 1080#define XSETSYMBOL(a, b) ((a) = make_lisp_symbol (b))
957#define XSETFLOAT(a, b) ((a) = make_lisp_ptr (b, Lisp_Float)) 1081#define XSETFLOAT(a, b) ((a) = make_lisp_ptr (b, Lisp_Float))
958#define XSETMISC(a, b) ((a) = make_lisp_ptr (b, Lisp_Misc)) 1082#define XSETMISC(a, b) ((a) = make_lisp_ptr (b, Lisp_Misc))
959 1083
@@ -991,6 +1115,25 @@ make_lisp_proc (struct Lisp_Process *p)
991#define XSETBOOL_VECTOR(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_BOOL_VECTOR)) 1115#define XSETBOOL_VECTOR(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_BOOL_VECTOR))
992#define XSETSUB_CHAR_TABLE(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_SUB_CHAR_TABLE)) 1116#define XSETSUB_CHAR_TABLE(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_SUB_CHAR_TABLE))
993 1117
1118/* Efficiently convert a pointer to a Lisp object and back. The
1119 pointer is represented as a Lisp integer, so the garbage collector
1120 does not know about it. The pointer should not have both Lisp_Int1
1121 bits set, which makes this conversion inherently unportable. */
1122
1123INLINE void *
1124XINTPTR (Lisp_Object a)
1125{
1126 return XUNTAG (a, Lisp_Int0);
1127}
1128
1129INLINE Lisp_Object
1130make_pointer_integer (void *p)
1131{
1132 Lisp_Object a = XIL (TAG_PTR (Lisp_Int0, p));
1133 eassert (INTEGERP (a) && XINTPTR (a) == p);
1134 return a;
1135}
1136
994/* Type checking. */ 1137/* Type checking. */
995 1138
996LISP_MACRO_DEFUN_VOID (CHECK_TYPE, 1139LISP_MACRO_DEFUN_VOID (CHECK_TYPE,
@@ -1560,72 +1703,6 @@ verify ((offsetof (struct Lisp_Sub_Char_Table, contents)
1560 Symbols 1703 Symbols
1561 ***********************************************************************/ 1704 ***********************************************************************/
1562 1705
1563/* Interned state of a symbol. */
1564
1565enum symbol_interned
1566{
1567 SYMBOL_UNINTERNED = 0,
1568 SYMBOL_INTERNED = 1,
1569 SYMBOL_INTERNED_IN_INITIAL_OBARRAY = 2
1570};
1571
1572enum symbol_redirect
1573{
1574 SYMBOL_PLAINVAL = 4,
1575 SYMBOL_VARALIAS = 1,
1576 SYMBOL_LOCALIZED = 2,
1577 SYMBOL_FORWARDED = 3
1578};
1579
1580struct Lisp_Symbol
1581{
1582 bool_bf gcmarkbit : 1;
1583
1584 /* Indicates where the value can be found:
1585 0 : it's a plain var, the value is in the `value' field.
1586 1 : it's a varalias, the value is really in the `alias' symbol.
1587 2 : it's a localized var, the value is in the `blv' object.
1588 3 : it's a forwarding variable, the value is in `forward'. */
1589 ENUM_BF (symbol_redirect) redirect : 3;
1590
1591 /* Non-zero means symbol is constant, i.e. changing its value
1592 should signal an error. If the value is 3, then the var
1593 can be changed, but only by `defconst'. */
1594 unsigned constant : 2;
1595
1596 /* Interned state of the symbol. This is an enumerator from
1597 enum symbol_interned. */
1598 unsigned interned : 2;
1599
1600 /* True means that this variable has been explicitly declared
1601 special (with `defvar' etc), and shouldn't be lexically bound. */
1602 bool_bf declared_special : 1;
1603
1604 /* True if pointed to from purespace and hence can't be GC'd. */
1605 bool_bf pinned : 1;
1606
1607 /* The symbol's name, as a Lisp string. */
1608 Lisp_Object name;
1609
1610 /* Value of the symbol or Qunbound if unbound. Which alternative of the
1611 union is used depends on the `redirect' field above. */
1612 union {
1613 Lisp_Object value;
1614 struct Lisp_Symbol *alias;
1615 struct Lisp_Buffer_Local_Value *blv;
1616 union Lisp_Fwd *fwd;
1617 } val;
1618
1619 /* Function value of the symbol or Qnil if not fboundp. */
1620 Lisp_Object function;
1621
1622 /* The symbol's property list. */
1623 Lisp_Object plist;
1624
1625 /* Next symbol in obarray bucket, if the symbol is interned. */
1626 struct Lisp_Symbol *next;
1627};
1628
1629/* Value is name of symbol. */ 1706/* Value is name of symbol. */
1630 1707
1631LISP_MACRO_DEFUN (SYMBOL_VAL, Lisp_Object, (struct Lisp_Symbol *sym), (sym)) 1708LISP_MACRO_DEFUN (SYMBOL_VAL, Lisp_Object, (struct Lisp_Symbol *sym), (sym))
@@ -1699,8 +1776,9 @@ SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P (Lisp_Object sym)
1699 1776
1700LISP_MACRO_DEFUN (SYMBOL_CONSTANT_P, int, (Lisp_Object sym), (sym)) 1777LISP_MACRO_DEFUN (SYMBOL_CONSTANT_P, int, (Lisp_Object sym), (sym))
1701 1778
1702#define DEFSYM(sym, name) \ 1779/* Placeholder for make-docfile to process. The actual symbol
1703 do { (sym) = intern_c_string ((name)); staticpro (&(sym)); } while (false) 1780 definition is done by lread.c's defsym. */
1781#define DEFSYM(sym, name) /* empty */
1704 1782
1705 1783
1706/*********************************************************************** 1784/***********************************************************************
@@ -2694,24 +2772,6 @@ CHECK_NUMBER_CDR (Lisp_Object x)
2694 Lisp_Object fnname 2772 Lisp_Object fnname
2695#endif 2773#endif
2696 2774
2697/* Note that the weird token-substitution semantics of ANSI C makes
2698 this work for MANY and UNEVALLED. */
2699#define DEFUN_ARGS_MANY (ptrdiff_t, Lisp_Object *)
2700#define DEFUN_ARGS_UNEVALLED (Lisp_Object)
2701#define DEFUN_ARGS_0 (void)
2702#define DEFUN_ARGS_1 (Lisp_Object)
2703#define DEFUN_ARGS_2 (Lisp_Object, Lisp_Object)
2704#define DEFUN_ARGS_3 (Lisp_Object, Lisp_Object, Lisp_Object)
2705#define DEFUN_ARGS_4 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object)
2706#define DEFUN_ARGS_5 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
2707 Lisp_Object)
2708#define DEFUN_ARGS_6 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
2709 Lisp_Object, Lisp_Object)
2710#define DEFUN_ARGS_7 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
2711 Lisp_Object, Lisp_Object, Lisp_Object)
2712#define DEFUN_ARGS_8 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
2713 Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object)
2714
2715/* True if OBJ is a Lisp function. */ 2775/* True if OBJ is a Lisp function. */
2716INLINE bool 2776INLINE bool
2717FUNCTIONP (Lisp_Object obj) 2777FUNCTIONP (Lisp_Object obj)
@@ -3260,15 +3320,6 @@ extern int gcpro_level;
3260 3320
3261void staticpro (Lisp_Object *); 3321void staticpro (Lisp_Object *);
3262 3322
3263/* Declare a Lisp-callable function. The MAXARGS parameter has the same
3264 meaning as in the DEFUN macro, and is used to construct a prototype. */
3265/* We can use the same trick as in the DEFUN macro to generate the
3266 appropriate prototype. */
3267#define EXFUN(fnname, maxargs) \
3268 extern Lisp_Object fnname DEFUN_ARGS_ ## maxargs
3269
3270#include "globals.h"
3271
3272/* Forward declarations for prototypes. */ 3323/* Forward declarations for prototypes. */
3273struct window; 3324struct window;
3274struct frame; 3325struct frame;
@@ -3387,30 +3438,6 @@ set_sub_char_table_contents (Lisp_Object table, ptrdiff_t idx, Lisp_Object val)
3387} 3438}
3388 3439
3389/* Defined in data.c. */ 3440/* Defined in data.c. */
3390extern Lisp_Object Qquote, Qunbound;
3391extern Lisp_Object Qerror_conditions, Qerror_message, Qtop_level;
3392extern Lisp_Object Qerror, Qquit, Qargs_out_of_range;
3393extern Lisp_Object Qvoid_variable, Qvoid_function;
3394extern Lisp_Object Qinvalid_read_syntax;
3395extern Lisp_Object Qinvalid_function, Qwrong_number_of_arguments, Qno_catch;
3396extern Lisp_Object Quser_error, Qend_of_file, Qarith_error, Qmark_inactive;
3397extern Lisp_Object Qbeginning_of_buffer, Qend_of_buffer, Qbuffer_read_only;
3398extern Lisp_Object Qtext_read_only;
3399extern Lisp_Object Qinteractive_form;
3400extern Lisp_Object Qcircular_list;
3401extern Lisp_Object Qsequencep;
3402extern Lisp_Object Qchar_or_string_p, Qinteger_or_marker_p;
3403extern Lisp_Object Qfboundp;
3404
3405extern Lisp_Object Qcdr;
3406
3407extern Lisp_Object Qrange_error, Qoverflow_error;
3408
3409extern Lisp_Object Qnumber_or_marker_p;
3410
3411extern Lisp_Object Qbuffer, Qinteger, Qsymbol;
3412
3413/* Defined in data.c. */
3414extern Lisp_Object indirect_function (Lisp_Object); 3441extern Lisp_Object indirect_function (Lisp_Object);
3415extern Lisp_Object find_symbol_value (Lisp_Object); 3442extern Lisp_Object find_symbol_value (Lisp_Object);
3416enum Arith_Comparison { 3443enum Arith_Comparison {
@@ -3466,7 +3493,6 @@ extern void syms_of_cmds (void);
3466extern void keys_of_cmds (void); 3493extern void keys_of_cmds (void);
3467 3494
3468/* Defined in coding.c. */ 3495/* Defined in coding.c. */
3469extern Lisp_Object Qcharset;
3470extern Lisp_Object detect_coding_system (const unsigned char *, ptrdiff_t, 3496extern Lisp_Object detect_coding_system (const unsigned char *, ptrdiff_t,
3471 ptrdiff_t, bool, bool, Lisp_Object); 3497 ptrdiff_t, bool, bool, Lisp_Object);
3472extern void init_coding (void); 3498extern void init_coding (void);
@@ -3490,14 +3516,10 @@ extern void init_syntax_once (void);
3490extern void syms_of_syntax (void); 3516extern void syms_of_syntax (void);
3491 3517
3492/* Defined in fns.c. */ 3518/* Defined in fns.c. */
3493extern Lisp_Object QCrehash_size, QCrehash_threshold;
3494enum { NEXT_ALMOST_PRIME_LIMIT = 11 }; 3519enum { NEXT_ALMOST_PRIME_LIMIT = 11 };
3495extern EMACS_INT next_almost_prime (EMACS_INT) ATTRIBUTE_CONST; 3520extern EMACS_INT next_almost_prime (EMACS_INT) ATTRIBUTE_CONST;
3496extern Lisp_Object larger_vector (Lisp_Object, ptrdiff_t, ptrdiff_t); 3521extern Lisp_Object larger_vector (Lisp_Object, ptrdiff_t, ptrdiff_t);
3497extern void sweep_weak_hash_tables (void); 3522extern void sweep_weak_hash_tables (void);
3498extern Lisp_Object Qcursor_in_echo_area;
3499extern Lisp_Object Qstring_lessp;
3500extern Lisp_Object QCsize, QCtest, QCweakness, Qequal, Qeq;
3501EMACS_UINT hash_string (char const *, ptrdiff_t); 3523EMACS_UINT hash_string (char const *, ptrdiff_t);
3502EMACS_UINT sxhash (Lisp_Object, int); 3524EMACS_UINT sxhash (Lisp_Object, int);
3503Lisp_Object make_hash_table (struct hash_table_test, Lisp_Object, Lisp_Object, 3525Lisp_Object make_hash_table (struct hash_table_test, Lisp_Object, Lisp_Object,
@@ -3537,15 +3559,11 @@ extern void init_fringe_once (void);
3537#endif /* HAVE_WINDOW_SYSTEM */ 3559#endif /* HAVE_WINDOW_SYSTEM */
3538 3560
3539/* Defined in image.c. */ 3561/* Defined in image.c. */
3540extern Lisp_Object QCascent, QCmargin, QCrelief;
3541extern Lisp_Object QCconversion;
3542extern int x_bitmap_mask (struct frame *, ptrdiff_t); 3562extern int x_bitmap_mask (struct frame *, ptrdiff_t);
3543extern void reset_image_types (void); 3563extern void reset_image_types (void);
3544extern void syms_of_image (void); 3564extern void syms_of_image (void);
3545 3565
3546/* Defined in insdel.c. */ 3566/* Defined in insdel.c. */
3547extern Lisp_Object Qinhibit_modification_hooks;
3548extern Lisp_Object Qregion_extract_function;
3549extern void move_gap_both (ptrdiff_t, ptrdiff_t); 3567extern void move_gap_both (ptrdiff_t, ptrdiff_t);
3550extern _Noreturn void buffer_overflow (void); 3568extern _Noreturn void buffer_overflow (void);
3551extern void make_gap (ptrdiff_t); 3569extern void make_gap (ptrdiff_t);
@@ -3600,18 +3618,6 @@ extern Lisp_Object Vwindow_system;
3600extern Lisp_Object sit_for (Lisp_Object, bool, int); 3618extern Lisp_Object sit_for (Lisp_Object, bool, int);
3601 3619
3602/* Defined in xdisp.c. */ 3620/* Defined in xdisp.c. */
3603extern Lisp_Object Qinhibit_point_motion_hooks;
3604extern Lisp_Object Qinhibit_redisplay;
3605extern Lisp_Object Qmenu_bar_update_hook;
3606extern Lisp_Object Qwindow_scroll_functions;
3607extern Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map;
3608extern Lisp_Object Qtext, Qboth, Qboth_horiz, Qtext_image_horiz;
3609extern Lisp_Object Qspace, Qcenter, QCalign_to;
3610extern Lisp_Object Qbar, Qhbar, Qhollow;
3611extern Lisp_Object Qleft_margin, Qright_margin;
3612extern Lisp_Object QCdata, QCfile;
3613extern Lisp_Object QCmap;
3614extern Lisp_Object Qrisky_local_variable;
3615extern bool noninteractive_need_newline; 3621extern bool noninteractive_need_newline;
3616extern Lisp_Object echo_area_buffer[2]; 3622extern Lisp_Object echo_area_buffer[2];
3617extern void add_to_log (const char *, Lisp_Object, Lisp_Object); 3623extern void add_to_log (const char *, Lisp_Object, Lisp_Object);
@@ -3745,8 +3751,6 @@ build_string (const char *str)
3745 3751
3746extern Lisp_Object pure_cons (Lisp_Object, Lisp_Object); 3752extern Lisp_Object pure_cons (Lisp_Object, Lisp_Object);
3747extern void make_byte_code (struct Lisp_Vector *); 3753extern void make_byte_code (struct Lisp_Vector *);
3748extern Lisp_Object Qautomatic_gc;
3749extern Lisp_Object Qchar_table_extra_slots;
3750extern struct Lisp_Vector *allocate_vector (EMACS_INT); 3754extern struct Lisp_Vector *allocate_vector (EMACS_INT);
3751 3755
3752/* Make an uninitialized vector for SIZE objects. NOTE: you must 3756/* Make an uninitialized vector for SIZE objects. NOTE: you must
@@ -3850,11 +3854,8 @@ extern void syms_of_chartab (void);
3850/* Defined in print.c. */ 3854/* Defined in print.c. */
3851extern Lisp_Object Vprin1_to_string_buffer; 3855extern Lisp_Object Vprin1_to_string_buffer;
3852extern void debug_print (Lisp_Object) EXTERNALLY_VISIBLE; 3856extern void debug_print (Lisp_Object) EXTERNALLY_VISIBLE;
3853extern Lisp_Object Qstandard_output;
3854extern Lisp_Object Qexternal_debugging_output;
3855extern void temp_output_buffer_setup (const char *); 3857extern void temp_output_buffer_setup (const char *);
3856extern int print_level; 3858extern int print_level;
3857extern Lisp_Object Qprint_escape_newlines;
3858extern void write_string (const char *, int); 3859extern void write_string (const char *, int);
3859extern void print_error_message (Lisp_Object, Lisp_Object, const char *, 3860extern void print_error_message (Lisp_Object, Lisp_Object, const char *,
3860 Lisp_Object); 3861 Lisp_Object);
@@ -3878,13 +3879,11 @@ extern ptrdiff_t evxprintf (char **, ptrdiff_t *, char const *, ptrdiff_t,
3878 ATTRIBUTE_FORMAT_PRINTF (5, 0); 3879 ATTRIBUTE_FORMAT_PRINTF (5, 0);
3879 3880
3880/* Defined in lread.c. */ 3881/* Defined in lread.c. */
3881extern Lisp_Object Qsize, Qvariable_documentation, Qstandard_input;
3882extern Lisp_Object Qbackquote, Qcomma, Qcomma_at, Qcomma_dot, Qfunction;
3883extern Lisp_Object Qlexical_binding;
3884extern Lisp_Object check_obarray (Lisp_Object); 3882extern Lisp_Object check_obarray (Lisp_Object);
3885extern Lisp_Object intern_1 (const char *, ptrdiff_t); 3883extern Lisp_Object intern_1 (const char *, ptrdiff_t);
3886extern Lisp_Object intern_c_string_1 (const char *, ptrdiff_t); 3884extern Lisp_Object intern_c_string_1 (const char *, ptrdiff_t);
3887extern Lisp_Object intern_driver (Lisp_Object, Lisp_Object, ptrdiff_t); 3885extern Lisp_Object intern_driver (Lisp_Object, Lisp_Object, Lisp_Object);
3886extern void init_symbol (Lisp_Object, Lisp_Object);
3888extern Lisp_Object oblookup (Lisp_Object, const char *, ptrdiff_t, ptrdiff_t); 3887extern Lisp_Object oblookup (Lisp_Object, const char *, ptrdiff_t, ptrdiff_t);
3889INLINE void 3888INLINE void
3890LOADHIST_ATTACH (Lisp_Object x) 3889LOADHIST_ATTACH (Lisp_Object x)
@@ -3916,10 +3915,8 @@ intern_c_string (const char *str)
3916 3915
3917/* Defined in eval.c. */ 3916/* Defined in eval.c. */
3918extern EMACS_INT lisp_eval_depth; 3917extern EMACS_INT lisp_eval_depth;
3919extern Lisp_Object Qexit, Qinteractive, Qcommandp, Qmacro;
3920extern Lisp_Object Qinhibit_quit, Qinternal_interpreter_environment, Qclosure;
3921extern Lisp_Object Qand_rest;
3922extern Lisp_Object Vautoload_queue; 3918extern Lisp_Object Vautoload_queue;
3919extern Lisp_Object Vrun_hooks;
3923extern Lisp_Object Vsignaling_function; 3920extern Lisp_Object Vsignaling_function;
3924extern Lisp_Object inhibit_lisp_code; 3921extern Lisp_Object inhibit_lisp_code;
3925extern struct handler *handlerlist; 3922extern struct handler *handlerlist;
@@ -3931,7 +3928,7 @@ extern struct handler *handlerlist;
3931 call1 (Vrun_hooks, Qmy_funny_hook); 3928 call1 (Vrun_hooks, Qmy_funny_hook);
3932 3929
3933 should no longer be used. */ 3930 should no longer be used. */
3934extern Lisp_Object Vrun_hooks; 3931extern void run_hook (Lisp_Object);
3935extern void run_hook_with_args_2 (Lisp_Object, Lisp_Object, Lisp_Object); 3932extern void run_hook_with_args_2 (Lisp_Object, Lisp_Object, Lisp_Object);
3936extern Lisp_Object run_hook_with_args (ptrdiff_t nargs, Lisp_Object *args, 3933extern Lisp_Object run_hook_with_args (ptrdiff_t nargs, Lisp_Object *args,
3937 Lisp_Object (*funcall) 3934 Lisp_Object (*funcall)
@@ -3992,7 +3989,6 @@ extern bool let_shadows_global_binding_p (Lisp_Object symbol);
3992 3989
3993 3990
3994/* Defined in editfns.c. */ 3991/* Defined in editfns.c. */
3995extern Lisp_Object Qfield;
3996extern void insert1 (Lisp_Object); 3992extern void insert1 (Lisp_Object);
3997extern Lisp_Object format2 (const char *, Lisp_Object, Lisp_Object); 3993extern Lisp_Object format2 (const char *, Lisp_Object, Lisp_Object);
3998extern Lisp_Object save_excursion_save (void); 3994extern Lisp_Object save_excursion_save (void);
@@ -4039,12 +4035,6 @@ extern void syms_of_marker (void);
4039 4035
4040/* Defined in fileio.c. */ 4036/* Defined in fileio.c. */
4041 4037
4042extern Lisp_Object Qfile_error;
4043extern Lisp_Object Qfile_notify_error;
4044extern Lisp_Object Qfile_exists_p;
4045extern Lisp_Object Qfile_directory_p;
4046extern Lisp_Object Qinsert_file_contents;
4047extern Lisp_Object Qfile_name_history;
4048extern Lisp_Object expand_and_dir_to_file (Lisp_Object, Lisp_Object); 4038extern Lisp_Object expand_and_dir_to_file (Lisp_Object, Lisp_Object);
4049extern Lisp_Object write_region (Lisp_Object, Lisp_Object, Lisp_Object, 4039extern Lisp_Object write_region (Lisp_Object, Lisp_Object, Lisp_Object,
4050 Lisp_Object, Lisp_Object, Lisp_Object, 4040 Lisp_Object, Lisp_Object, Lisp_Object,
@@ -4061,7 +4051,6 @@ extern bool file_accessible_directory_p (Lisp_Object);
4061extern void init_fileio (void); 4051extern void init_fileio (void);
4062extern void syms_of_fileio (void); 4052extern void syms_of_fileio (void);
4063extern Lisp_Object make_temp_name (Lisp_Object, bool); 4053extern Lisp_Object make_temp_name (Lisp_Object, bool);
4064extern Lisp_Object Qdelete_file;
4065 4054
4066/* Defined in search.c. */ 4055/* Defined in search.c. */
4067extern void shrink_regexp_cache (void); 4056extern void shrink_regexp_cache (void);
@@ -4091,7 +4080,6 @@ extern void clear_regexp_cache (void);
4091 4080
4092/* Defined in minibuf.c. */ 4081/* Defined in minibuf.c. */
4093 4082
4094extern Lisp_Object Qcompletion_ignore_case;
4095extern Lisp_Object Vminibuffer_list; 4083extern Lisp_Object Vminibuffer_list;
4096extern Lisp_Object last_minibuf_string; 4084extern Lisp_Object last_minibuf_string;
4097extern Lisp_Object get_minibuffer (EMACS_INT); 4085extern Lisp_Object get_minibuffer (EMACS_INT);
@@ -4100,15 +4088,10 @@ extern void syms_of_minibuf (void);
4100 4088
4101/* Defined in callint.c. */ 4089/* Defined in callint.c. */
4102 4090
4103extern Lisp_Object Qminus, Qplus;
4104extern Lisp_Object Qprogn;
4105extern Lisp_Object Qwhen;
4106extern Lisp_Object Qmouse_leave_buffer_hook;
4107extern void syms_of_callint (void); 4091extern void syms_of_callint (void);
4108 4092
4109/* Defined in casefiddle.c. */ 4093/* Defined in casefiddle.c. */
4110 4094
4111extern Lisp_Object Qidentity;
4112extern void syms_of_casefiddle (void); 4095extern void syms_of_casefiddle (void);
4113extern void keys_of_casefiddle (void); 4096extern void keys_of_casefiddle (void);
4114 4097
@@ -4122,8 +4105,6 @@ extern void syms_of_casetab (void);
4122extern Lisp_Object echo_message_buffer; 4105extern Lisp_Object echo_message_buffer;
4123extern struct kboard *echo_kboard; 4106extern struct kboard *echo_kboard;
4124extern void cancel_echoing (void); 4107extern void cancel_echoing (void);
4125extern Lisp_Object Qdisabled, QCfilter;
4126extern Lisp_Object Qup, Qdown;
4127extern Lisp_Object last_undo_boundary; 4108extern Lisp_Object last_undo_boundary;
4128extern bool input_pending; 4109extern bool input_pending;
4129#ifdef HAVE_STACK_OVERFLOW_HANDLING 4110#ifdef HAVE_STACK_OVERFLOW_HANDLING
@@ -4157,7 +4138,6 @@ extern bool indented_beyond_p (ptrdiff_t, ptrdiff_t, EMACS_INT);
4157extern void syms_of_indent (void); 4138extern void syms_of_indent (void);
4158 4139
4159/* Defined in frame.c. */ 4140/* Defined in frame.c. */
4160extern Lisp_Object Qonly, Qnone;
4161extern void store_frame_param (struct frame *, Lisp_Object, Lisp_Object); 4141extern void store_frame_param (struct frame *, Lisp_Object, Lisp_Object);
4162extern void store_in_alist (Lisp_Object *, Lisp_Object, Lisp_Object); 4142extern void store_in_alist (Lisp_Object *, Lisp_Object, Lisp_Object);
4163extern Lisp_Object do_switch_frame (Lisp_Object, int, int, Lisp_Object); 4143extern Lisp_Object do_switch_frame (Lisp_Object, int, int, Lisp_Object);
@@ -4173,9 +4153,7 @@ extern bool display_arg;
4173#endif 4153#endif
4174extern Lisp_Object decode_env_path (const char *, const char *, bool); 4154extern Lisp_Object decode_env_path (const char *, const char *, bool);
4175extern Lisp_Object empty_unibyte_string, empty_multibyte_string; 4155extern Lisp_Object empty_unibyte_string, empty_multibyte_string;
4176extern Lisp_Object Qfile_name_handler_alist;
4177extern _Noreturn void terminate_due_to_signal (int, int); 4156extern _Noreturn void terminate_due_to_signal (int, int);
4178extern Lisp_Object Qkill_emacs;
4179#ifdef WINDOWSNT 4157#ifdef WINDOWSNT
4180extern Lisp_Object Vlibrary_cache; 4158extern Lisp_Object Vlibrary_cache;
4181#endif 4159#endif
@@ -4210,7 +4188,6 @@ extern bool inhibit_window_system;
4210extern bool running_asynch_code; 4188extern bool running_asynch_code;
4211 4189
4212/* Defined in process.c. */ 4190/* Defined in process.c. */
4213extern Lisp_Object QCtype, Qlocal;
4214extern void kill_buffer_processes (Lisp_Object); 4191extern void kill_buffer_processes (Lisp_Object);
4215extern int wait_reading_process_output (intmax_t, int, int, bool, Lisp_Object, 4192extern int wait_reading_process_output (intmax_t, int, int, bool, Lisp_Object,
4216 struct Lisp_Process *, int); 4193 struct Lisp_Process *, int);
@@ -4246,7 +4223,6 @@ extern void set_initial_environment (void);
4246extern void syms_of_callproc (void); 4223extern void syms_of_callproc (void);
4247 4224
4248/* Defined in doc.c. */ 4225/* Defined in doc.c. */
4249extern Lisp_Object Qfunction_documentation;
4250extern Lisp_Object read_doc_string (Lisp_Object); 4226extern Lisp_Object read_doc_string (Lisp_Object);
4251extern Lisp_Object get_doc_string (Lisp_Object, bool, bool); 4227extern Lisp_Object get_doc_string (Lisp_Object, bool, bool);
4252extern void syms_of_doc (void); 4228extern void syms_of_doc (void);
@@ -4267,8 +4243,6 @@ extern void init_macros (void);
4267extern void syms_of_macros (void); 4243extern void syms_of_macros (void);
4268 4244
4269/* Defined in undo.c. */ 4245/* Defined in undo.c. */
4270extern Lisp_Object Qapply;
4271extern Lisp_Object Qinhibit_read_only;
4272extern void truncate_undo_list (struct buffer *); 4246extern void truncate_undo_list (struct buffer *);
4273extern void record_insert (ptrdiff_t, ptrdiff_t); 4247extern void record_insert (ptrdiff_t, ptrdiff_t);
4274extern void record_delete (ptrdiff_t, Lisp_Object, bool); 4248extern void record_delete (ptrdiff_t, Lisp_Object, bool);
@@ -4278,11 +4252,8 @@ extern void record_property_change (ptrdiff_t, ptrdiff_t,
4278 Lisp_Object, Lisp_Object, 4252 Lisp_Object, Lisp_Object,
4279 Lisp_Object); 4253 Lisp_Object);
4280extern void syms_of_undo (void); 4254extern void syms_of_undo (void);
4281/* Defined in textprop.c. */
4282extern Lisp_Object Qmouse_face;
4283extern Lisp_Object Qinsert_in_front_hooks, Qinsert_behind_hooks;
4284extern Lisp_Object Qminibuffer_prompt;
4285 4255
4256/* Defined in textprop.c. */
4286extern void report_interval_modification (Lisp_Object, Lisp_Object); 4257extern void report_interval_modification (Lisp_Object, Lisp_Object);
4287 4258
4288/* Defined in menu.c. */ 4259/* Defined in menu.c. */
@@ -4366,9 +4337,6 @@ extern void init_font (void);
4366#ifdef HAVE_WINDOW_SYSTEM 4337#ifdef HAVE_WINDOW_SYSTEM
4367/* Defined in fontset.c. */ 4338/* Defined in fontset.c. */
4368extern void syms_of_fontset (void); 4339extern void syms_of_fontset (void);
4369
4370/* Defined in xfns.c, w32fns.c, or macfns.c. */
4371extern Lisp_Object Qfont_param;
4372#endif 4340#endif
4373 4341
4374/* Defined in gfilenotify.c */ 4342/* Defined in gfilenotify.c */
@@ -4388,16 +4356,6 @@ extern void syms_of_w32notify (void);
4388#endif 4356#endif
4389 4357
4390/* Defined in xfaces.c. */ 4358/* Defined in xfaces.c. */
4391extern Lisp_Object Qdefault, Qfringe;
4392extern Lisp_Object Qscroll_bar, Qcursor;
4393extern Lisp_Object Qmode_line_inactive;
4394extern Lisp_Object Qface;
4395extern Lisp_Object Qnormal;
4396extern Lisp_Object QCfamily, QCweight, QCslant;
4397extern Lisp_Object QCheight, QCname, QCwidth, QCforeground, QCbackground;
4398extern Lisp_Object Qextra_light, Qlight, Qsemi_light, Qsemi_bold;
4399extern Lisp_Object Qbold, Qextra_bold, Qultra_bold;
4400extern Lisp_Object Qoblique, Qitalic;
4401extern Lisp_Object Vface_alternative_font_family_alist; 4359extern Lisp_Object Vface_alternative_font_family_alist;
4402extern Lisp_Object Vface_alternative_font_registry_alist; 4360extern Lisp_Object Vface_alternative_font_registry_alist;
4403extern void syms_of_xfaces (void); 4361extern void syms_of_xfaces (void);