diff options
| author | Joakim Verona | 2015-01-11 18:40:21 +0100 |
|---|---|---|
| committer | Joakim Verona | 2015-01-11 18:40:21 +0100 |
| commit | cc7cb20d6abc0f862e5513b24831bba0eaecaa5f (patch) | |
| tree | afc2fc05401504aa0c28699dc3bc155c5b0d7f58 /src/lisp.h | |
| parent | d972b504f30ff4300ba368940751e8736dddf0b4 (diff) | |
| parent | 9a57bda31569294ecaf8138a06e5edda9c0d87e3 (diff) | |
| download | emacs-cc7cb20d6abc0f862e5513b24831bba0eaecaa5f.tar.gz emacs-cc7cb20d6abc0f862e5513b24831bba0eaecaa5f.zip | |
merge master, fix conflicts
Diffstat (limited to 'src/lisp.h')
| -rw-r--r-- | src/lisp.h | 434 |
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 | ||
| 239 | enum Lisp_Bits | 239 | enum 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 | ||
| 448 | enum Lisp_Type | 451 | enum 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 | ||
| 563 | typedef struct { EMACS_INT i; } Lisp_Object; | 566 | typedef 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 |
| 568 | enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = true }; | 571 | enum 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 | ||
| 573 | typedef EMACS_INT Lisp_Object; | 576 | typedef EMACS_INT Lisp_Object; |
| 574 | #define LISP_INITIALLY_ZERO 0 | 577 | #define LISP_INITIALLY(i) (i) |
| 575 | enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = false }; | 578 | enum 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); | |||
| 604 | INLINE bool (VECTORLIKEP) (Lisp_Object); | 609 | INLINE bool (VECTORLIKEP) (Lisp_Object); |
| 605 | INLINE bool WINDOWP (Lisp_Object); | 610 | INLINE bool WINDOWP (Lisp_Object); |
| 606 | INLINE struct Lisp_Save_Value *XSAVE_VALUE (Lisp_Object); | 611 | INLINE struct Lisp_Save_Value *XSAVE_VALUE (Lisp_Object); |
| 612 | INLINE struct Lisp_Symbol *(XSYMBOL) (Lisp_Object); | ||
| 613 | INLINE enum Lisp_Type (XTYPE) (Lisp_Object); | ||
| 614 | INLINE void *(XUNTAG) (Lisp_Object, int); | ||
| 607 | 615 | ||
| 608 | /* Defined in chartab.c. */ | 616 | /* Defined in chartab.c. */ |
| 609 | extern Lisp_Object char_table_ref (Lisp_Object, int); | 617 | extern Lisp_Object char_table_ref (Lisp_Object, int); |
| 610 | extern void char_table_set (Lisp_Object, int, Lisp_Object); | 618 | extern void char_table_set (Lisp_Object, int, Lisp_Object); |
| 611 | 619 | ||
| 612 | /* Defined in data.c. */ | 620 | /* Defined in data.c. */ |
| 613 | extern Lisp_Object Qarrayp, Qbufferp, Qbuffer_or_string_p, Qchar_table_p; | ||
| 614 | extern Lisp_Object Qconsp, Qfloatp, Qintegerp, Qlambda, Qlistp, Qmarkerp, Qnil; | ||
| 615 | extern Lisp_Object Qnumberp, Qstringp, Qsymbolp, Qt, Qvectorp; | ||
| 616 | extern Lisp_Object Qbool_vector_p; | ||
| 617 | extern Lisp_Object Qvector_or_char_table_p, Qwholenump; | ||
| 618 | extern Lisp_Object Qwindow; | ||
| 619 | extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object); | 621 | extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object); |
| 620 | extern _Noreturn void wrong_choice (Lisp_Object, Lisp_Object); | 622 | extern _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. */ |
| 626 | extern bool initialized; | 628 | extern bool initialized; |
| 627 | 629 | ||
| 628 | /* Defined in eval.c. */ | ||
| 629 | extern Lisp_Object Qautoload; | ||
| 630 | |||
| 631 | /* Defined in floatfns.c. */ | 630 | /* Defined in floatfns.c. */ |
| 632 | extern double extract_float (Lisp_Object); | 631 | extern double extract_float (Lisp_Object); |
| 633 | 632 | ||
| 634 | /* Defined in process.c. */ | 633 | |
| 635 | extern Lisp_Object Qprocessp; | 634 | /* Interned state of a symbol. */ |
| 635 | |||
| 636 | enum 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. */ | 643 | enum symbol_redirect |
| 638 | extern Lisp_Object Qwindowp; | 644 | { |
| 645 | SYMBOL_PLAINVAL = 4, | ||
| 646 | SYMBOL_VARALIAS = 1, | ||
| 647 | SYMBOL_LOCALIZED = 2, | ||
| 648 | SYMBOL_FORWARDED = 3 | ||
| 649 | }; | ||
| 650 | |||
| 651 | struct 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. */ | ||
| 641 | extern Lisp_Object Qimage; | ||
| 642 | extern 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. */ |
| 646 | LISP_MACRO_DEFUN (XLI, EMACS_INT, (Lisp_Object o), (o)) | 748 | LISP_MACRO_DEFUN (XLI, EMACS_INT, (Lisp_Object o), (o)) |
| @@ -731,6 +833,7 @@ LISP_MACRO_DEFUN (XPNTR, void *, (Lisp_Object a), (a)) | |||
| 731 | LISP_MACRO_DEFUN (make_number, Lisp_Object, (EMACS_INT n), (n)) | 833 | LISP_MACRO_DEFUN (make_number, Lisp_Object, (EMACS_INT n), (n)) |
| 732 | LISP_MACRO_DEFUN (XINT, EMACS_INT, (Lisp_Object a), (a)) | 834 | LISP_MACRO_DEFUN (XINT, EMACS_INT, (Lisp_Object a), (a)) |
| 733 | LISP_MACRO_DEFUN (XFASTINT, EMACS_INT, (Lisp_Object a), (a)) | 835 | LISP_MACRO_DEFUN (XFASTINT, EMACS_INT, (Lisp_Object a), (a)) |
| 836 | LISP_MACRO_DEFUN (XSYMBOL, struct Lisp_Symbol *, (Lisp_Object a), (a)) | ||
| 734 | LISP_MACRO_DEFUN (XTYPE, enum Lisp_Type, (Lisp_Object a), (a)) | 837 | LISP_MACRO_DEFUN (XTYPE, enum Lisp_Type, (Lisp_Object a), (a)) |
| 735 | LISP_MACRO_DEFUN (XUNTAG, void *, (Lisp_Object a, int type), (a, type)) | 838 | LISP_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. */ | ||
| 892 | INLINE struct Lisp_Symbol * | ||
| 893 | XSYMBOL (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. */ |
| 789 | INLINE enum Lisp_Type | 903 | INLINE enum Lisp_Type |
| 790 | XTYPE (Lisp_Object a) | 904 | XTYPE (Lisp_Object a) |
| @@ -797,12 +911,8 @@ XTYPE (Lisp_Object a) | |||
| 797 | INLINE void * | 911 | INLINE void * |
| 798 | XUNTAG (Lisp_Object a, int type) | 912 | XUNTAG (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 | ||
| 867 | LISP_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 | ||
| 869 | INLINE struct Lisp_Float * | 981 | INLINE struct Lisp_Float * |
| 870 | XFLOAT (Lisp_Object a) | 982 | XFLOAT (Lisp_Object a) |
| @@ -935,14 +1047,26 @@ XBOOL_VECTOR (Lisp_Object a) | |||
| 935 | INLINE Lisp_Object | 1047 | INLINE Lisp_Object |
| 936 | make_lisp_ptr (void *ptr, enum Lisp_Type type) | 1048 | make_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 | ||
| 945 | INLINE Lisp_Object | 1055 | INLINE Lisp_Object |
| 1056 | make_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 | |||
| 1063 | INLINE Lisp_Object | ||
| 1064 | builtin_lisp_symbol (int index) | ||
| 1065 | { | ||
| 1066 | return make_lisp_symbol (lispsym + index); | ||
| 1067 | } | ||
| 1068 | |||
| 1069 | INLINE Lisp_Object | ||
| 946 | make_lisp_proc (struct Lisp_Process *p) | 1070 | make_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 | |||
| 1123 | INLINE void * | ||
| 1124 | XINTPTR (Lisp_Object a) | ||
| 1125 | { | ||
| 1126 | return XUNTAG (a, Lisp_Int0); | ||
| 1127 | } | ||
| 1128 | |||
| 1129 | INLINE Lisp_Object | ||
| 1130 | make_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 | ||
| 996 | LISP_MACRO_DEFUN_VOID (CHECK_TYPE, | 1139 | LISP_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 | |||
| 1565 | enum symbol_interned | ||
| 1566 | { | ||
| 1567 | SYMBOL_UNINTERNED = 0, | ||
| 1568 | SYMBOL_INTERNED = 1, | ||
| 1569 | SYMBOL_INTERNED_IN_INITIAL_OBARRAY = 2 | ||
| 1570 | }; | ||
| 1571 | |||
| 1572 | enum symbol_redirect | ||
| 1573 | { | ||
| 1574 | SYMBOL_PLAINVAL = 4, | ||
| 1575 | SYMBOL_VARALIAS = 1, | ||
| 1576 | SYMBOL_LOCALIZED = 2, | ||
| 1577 | SYMBOL_FORWARDED = 3 | ||
| 1578 | }; | ||
| 1579 | |||
| 1580 | struct 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 | ||
| 1631 | LISP_MACRO_DEFUN (SYMBOL_VAL, Lisp_Object, (struct Lisp_Symbol *sym), (sym)) | 1708 | LISP_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 | ||
| 1700 | LISP_MACRO_DEFUN (SYMBOL_CONSTANT_P, int, (Lisp_Object sym), (sym)) | 1777 | LISP_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. */ |
| 2716 | INLINE bool | 2776 | INLINE bool |
| 2717 | FUNCTIONP (Lisp_Object obj) | 2777 | FUNCTIONP (Lisp_Object obj) |
| @@ -3260,15 +3320,6 @@ extern int gcpro_level; | |||
| 3260 | 3320 | ||
| 3261 | void staticpro (Lisp_Object *); | 3321 | void 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. */ |
| 3273 | struct window; | 3324 | struct window; |
| 3274 | struct frame; | 3325 | struct 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. */ |
| 3390 | extern Lisp_Object Qquote, Qunbound; | ||
| 3391 | extern Lisp_Object Qerror_conditions, Qerror_message, Qtop_level; | ||
| 3392 | extern Lisp_Object Qerror, Qquit, Qargs_out_of_range; | ||
| 3393 | extern Lisp_Object Qvoid_variable, Qvoid_function; | ||
| 3394 | extern Lisp_Object Qinvalid_read_syntax; | ||
| 3395 | extern Lisp_Object Qinvalid_function, Qwrong_number_of_arguments, Qno_catch; | ||
| 3396 | extern Lisp_Object Quser_error, Qend_of_file, Qarith_error, Qmark_inactive; | ||
| 3397 | extern Lisp_Object Qbeginning_of_buffer, Qend_of_buffer, Qbuffer_read_only; | ||
| 3398 | extern Lisp_Object Qtext_read_only; | ||
| 3399 | extern Lisp_Object Qinteractive_form; | ||
| 3400 | extern Lisp_Object Qcircular_list; | ||
| 3401 | extern Lisp_Object Qsequencep; | ||
| 3402 | extern Lisp_Object Qchar_or_string_p, Qinteger_or_marker_p; | ||
| 3403 | extern Lisp_Object Qfboundp; | ||
| 3404 | |||
| 3405 | extern Lisp_Object Qcdr; | ||
| 3406 | |||
| 3407 | extern Lisp_Object Qrange_error, Qoverflow_error; | ||
| 3408 | |||
| 3409 | extern Lisp_Object Qnumber_or_marker_p; | ||
| 3410 | |||
| 3411 | extern Lisp_Object Qbuffer, Qinteger, Qsymbol; | ||
| 3412 | |||
| 3413 | /* Defined in data.c. */ | ||
| 3414 | extern Lisp_Object indirect_function (Lisp_Object); | 3441 | extern Lisp_Object indirect_function (Lisp_Object); |
| 3415 | extern Lisp_Object find_symbol_value (Lisp_Object); | 3442 | extern Lisp_Object find_symbol_value (Lisp_Object); |
| 3416 | enum Arith_Comparison { | 3443 | enum Arith_Comparison { |
| @@ -3466,7 +3493,6 @@ extern void syms_of_cmds (void); | |||
| 3466 | extern void keys_of_cmds (void); | 3493 | extern void keys_of_cmds (void); |
| 3467 | 3494 | ||
| 3468 | /* Defined in coding.c. */ | 3495 | /* Defined in coding.c. */ |
| 3469 | extern Lisp_Object Qcharset; | ||
| 3470 | extern Lisp_Object detect_coding_system (const unsigned char *, ptrdiff_t, | 3496 | extern Lisp_Object detect_coding_system (const unsigned char *, ptrdiff_t, |
| 3471 | ptrdiff_t, bool, bool, Lisp_Object); | 3497 | ptrdiff_t, bool, bool, Lisp_Object); |
| 3472 | extern void init_coding (void); | 3498 | extern void init_coding (void); |
| @@ -3490,14 +3516,10 @@ extern void init_syntax_once (void); | |||
| 3490 | extern void syms_of_syntax (void); | 3516 | extern void syms_of_syntax (void); |
| 3491 | 3517 | ||
| 3492 | /* Defined in fns.c. */ | 3518 | /* Defined in fns.c. */ |
| 3493 | extern Lisp_Object QCrehash_size, QCrehash_threshold; | ||
| 3494 | enum { NEXT_ALMOST_PRIME_LIMIT = 11 }; | 3519 | enum { NEXT_ALMOST_PRIME_LIMIT = 11 }; |
| 3495 | extern EMACS_INT next_almost_prime (EMACS_INT) ATTRIBUTE_CONST; | 3520 | extern EMACS_INT next_almost_prime (EMACS_INT) ATTRIBUTE_CONST; |
| 3496 | extern Lisp_Object larger_vector (Lisp_Object, ptrdiff_t, ptrdiff_t); | 3521 | extern Lisp_Object larger_vector (Lisp_Object, ptrdiff_t, ptrdiff_t); |
| 3497 | extern void sweep_weak_hash_tables (void); | 3522 | extern void sweep_weak_hash_tables (void); |
| 3498 | extern Lisp_Object Qcursor_in_echo_area; | ||
| 3499 | extern Lisp_Object Qstring_lessp; | ||
| 3500 | extern Lisp_Object QCsize, QCtest, QCweakness, Qequal, Qeq; | ||
| 3501 | EMACS_UINT hash_string (char const *, ptrdiff_t); | 3523 | EMACS_UINT hash_string (char const *, ptrdiff_t); |
| 3502 | EMACS_UINT sxhash (Lisp_Object, int); | 3524 | EMACS_UINT sxhash (Lisp_Object, int); |
| 3503 | Lisp_Object make_hash_table (struct hash_table_test, Lisp_Object, Lisp_Object, | 3525 | Lisp_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. */ |
| 3540 | extern Lisp_Object QCascent, QCmargin, QCrelief; | ||
| 3541 | extern Lisp_Object QCconversion; | ||
| 3542 | extern int x_bitmap_mask (struct frame *, ptrdiff_t); | 3562 | extern int x_bitmap_mask (struct frame *, ptrdiff_t); |
| 3543 | extern void reset_image_types (void); | 3563 | extern void reset_image_types (void); |
| 3544 | extern void syms_of_image (void); | 3564 | extern void syms_of_image (void); |
| 3545 | 3565 | ||
| 3546 | /* Defined in insdel.c. */ | 3566 | /* Defined in insdel.c. */ |
| 3547 | extern Lisp_Object Qinhibit_modification_hooks; | ||
| 3548 | extern Lisp_Object Qregion_extract_function; | ||
| 3549 | extern void move_gap_both (ptrdiff_t, ptrdiff_t); | 3567 | extern void move_gap_both (ptrdiff_t, ptrdiff_t); |
| 3550 | extern _Noreturn void buffer_overflow (void); | 3568 | extern _Noreturn void buffer_overflow (void); |
| 3551 | extern void make_gap (ptrdiff_t); | 3569 | extern void make_gap (ptrdiff_t); |
| @@ -3600,18 +3618,6 @@ extern Lisp_Object Vwindow_system; | |||
| 3600 | extern Lisp_Object sit_for (Lisp_Object, bool, int); | 3618 | extern Lisp_Object sit_for (Lisp_Object, bool, int); |
| 3601 | 3619 | ||
| 3602 | /* Defined in xdisp.c. */ | 3620 | /* Defined in xdisp.c. */ |
| 3603 | extern Lisp_Object Qinhibit_point_motion_hooks; | ||
| 3604 | extern Lisp_Object Qinhibit_redisplay; | ||
| 3605 | extern Lisp_Object Qmenu_bar_update_hook; | ||
| 3606 | extern Lisp_Object Qwindow_scroll_functions; | ||
| 3607 | extern Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map; | ||
| 3608 | extern Lisp_Object Qtext, Qboth, Qboth_horiz, Qtext_image_horiz; | ||
| 3609 | extern Lisp_Object Qspace, Qcenter, QCalign_to; | ||
| 3610 | extern Lisp_Object Qbar, Qhbar, Qhollow; | ||
| 3611 | extern Lisp_Object Qleft_margin, Qright_margin; | ||
| 3612 | extern Lisp_Object QCdata, QCfile; | ||
| 3613 | extern Lisp_Object QCmap; | ||
| 3614 | extern Lisp_Object Qrisky_local_variable; | ||
| 3615 | extern bool noninteractive_need_newline; | 3621 | extern bool noninteractive_need_newline; |
| 3616 | extern Lisp_Object echo_area_buffer[2]; | 3622 | extern Lisp_Object echo_area_buffer[2]; |
| 3617 | extern void add_to_log (const char *, Lisp_Object, Lisp_Object); | 3623 | extern void add_to_log (const char *, Lisp_Object, Lisp_Object); |
| @@ -3745,8 +3751,6 @@ build_string (const char *str) | |||
| 3745 | 3751 | ||
| 3746 | extern Lisp_Object pure_cons (Lisp_Object, Lisp_Object); | 3752 | extern Lisp_Object pure_cons (Lisp_Object, Lisp_Object); |
| 3747 | extern void make_byte_code (struct Lisp_Vector *); | 3753 | extern void make_byte_code (struct Lisp_Vector *); |
| 3748 | extern Lisp_Object Qautomatic_gc; | ||
| 3749 | extern Lisp_Object Qchar_table_extra_slots; | ||
| 3750 | extern struct Lisp_Vector *allocate_vector (EMACS_INT); | 3754 | extern 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. */ |
| 3851 | extern Lisp_Object Vprin1_to_string_buffer; | 3855 | extern Lisp_Object Vprin1_to_string_buffer; |
| 3852 | extern void debug_print (Lisp_Object) EXTERNALLY_VISIBLE; | 3856 | extern void debug_print (Lisp_Object) EXTERNALLY_VISIBLE; |
| 3853 | extern Lisp_Object Qstandard_output; | ||
| 3854 | extern Lisp_Object Qexternal_debugging_output; | ||
| 3855 | extern void temp_output_buffer_setup (const char *); | 3857 | extern void temp_output_buffer_setup (const char *); |
| 3856 | extern int print_level; | 3858 | extern int print_level; |
| 3857 | extern Lisp_Object Qprint_escape_newlines; | ||
| 3858 | extern void write_string (const char *, int); | 3859 | extern void write_string (const char *, int); |
| 3859 | extern void print_error_message (Lisp_Object, Lisp_Object, const char *, | 3860 | extern 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. */ |
| 3881 | extern Lisp_Object Qsize, Qvariable_documentation, Qstandard_input; | ||
| 3882 | extern Lisp_Object Qbackquote, Qcomma, Qcomma_at, Qcomma_dot, Qfunction; | ||
| 3883 | extern Lisp_Object Qlexical_binding; | ||
| 3884 | extern Lisp_Object check_obarray (Lisp_Object); | 3882 | extern Lisp_Object check_obarray (Lisp_Object); |
| 3885 | extern Lisp_Object intern_1 (const char *, ptrdiff_t); | 3883 | extern Lisp_Object intern_1 (const char *, ptrdiff_t); |
| 3886 | extern Lisp_Object intern_c_string_1 (const char *, ptrdiff_t); | 3884 | extern Lisp_Object intern_c_string_1 (const char *, ptrdiff_t); |
| 3887 | extern Lisp_Object intern_driver (Lisp_Object, Lisp_Object, ptrdiff_t); | 3885 | extern Lisp_Object intern_driver (Lisp_Object, Lisp_Object, Lisp_Object); |
| 3886 | extern void init_symbol (Lisp_Object, Lisp_Object); | ||
| 3888 | extern Lisp_Object oblookup (Lisp_Object, const char *, ptrdiff_t, ptrdiff_t); | 3887 | extern Lisp_Object oblookup (Lisp_Object, const char *, ptrdiff_t, ptrdiff_t); |
| 3889 | INLINE void | 3888 | INLINE void |
| 3890 | LOADHIST_ATTACH (Lisp_Object x) | 3889 | LOADHIST_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. */ |
| 3918 | extern EMACS_INT lisp_eval_depth; | 3917 | extern EMACS_INT lisp_eval_depth; |
| 3919 | extern Lisp_Object Qexit, Qinteractive, Qcommandp, Qmacro; | ||
| 3920 | extern Lisp_Object Qinhibit_quit, Qinternal_interpreter_environment, Qclosure; | ||
| 3921 | extern Lisp_Object Qand_rest; | ||
| 3922 | extern Lisp_Object Vautoload_queue; | 3918 | extern Lisp_Object Vautoload_queue; |
| 3919 | extern Lisp_Object Vrun_hooks; | ||
| 3923 | extern Lisp_Object Vsignaling_function; | 3920 | extern Lisp_Object Vsignaling_function; |
| 3924 | extern Lisp_Object inhibit_lisp_code; | 3921 | extern Lisp_Object inhibit_lisp_code; |
| 3925 | extern struct handler *handlerlist; | 3922 | extern 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. */ |
| 3934 | extern Lisp_Object Vrun_hooks; | 3931 | extern void run_hook (Lisp_Object); |
| 3935 | extern void run_hook_with_args_2 (Lisp_Object, Lisp_Object, Lisp_Object); | 3932 | extern void run_hook_with_args_2 (Lisp_Object, Lisp_Object, Lisp_Object); |
| 3936 | extern Lisp_Object run_hook_with_args (ptrdiff_t nargs, Lisp_Object *args, | 3933 | extern 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. */ |
| 3995 | extern Lisp_Object Qfield; | ||
| 3996 | extern void insert1 (Lisp_Object); | 3992 | extern void insert1 (Lisp_Object); |
| 3997 | extern Lisp_Object format2 (const char *, Lisp_Object, Lisp_Object); | 3993 | extern Lisp_Object format2 (const char *, Lisp_Object, Lisp_Object); |
| 3998 | extern Lisp_Object save_excursion_save (void); | 3994 | extern 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 | ||
| 4042 | extern Lisp_Object Qfile_error; | ||
| 4043 | extern Lisp_Object Qfile_notify_error; | ||
| 4044 | extern Lisp_Object Qfile_exists_p; | ||
| 4045 | extern Lisp_Object Qfile_directory_p; | ||
| 4046 | extern Lisp_Object Qinsert_file_contents; | ||
| 4047 | extern Lisp_Object Qfile_name_history; | ||
| 4048 | extern Lisp_Object expand_and_dir_to_file (Lisp_Object, Lisp_Object); | 4038 | extern Lisp_Object expand_and_dir_to_file (Lisp_Object, Lisp_Object); |
| 4049 | extern Lisp_Object write_region (Lisp_Object, Lisp_Object, Lisp_Object, | 4039 | extern 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); | |||
| 4061 | extern void init_fileio (void); | 4051 | extern void init_fileio (void); |
| 4062 | extern void syms_of_fileio (void); | 4052 | extern void syms_of_fileio (void); |
| 4063 | extern Lisp_Object make_temp_name (Lisp_Object, bool); | 4053 | extern Lisp_Object make_temp_name (Lisp_Object, bool); |
| 4064 | extern Lisp_Object Qdelete_file; | ||
| 4065 | 4054 | ||
| 4066 | /* Defined in search.c. */ | 4055 | /* Defined in search.c. */ |
| 4067 | extern void shrink_regexp_cache (void); | 4056 | extern 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 | ||
| 4094 | extern Lisp_Object Qcompletion_ignore_case; | ||
| 4095 | extern Lisp_Object Vminibuffer_list; | 4083 | extern Lisp_Object Vminibuffer_list; |
| 4096 | extern Lisp_Object last_minibuf_string; | 4084 | extern Lisp_Object last_minibuf_string; |
| 4097 | extern Lisp_Object get_minibuffer (EMACS_INT); | 4085 | extern 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 | ||
| 4103 | extern Lisp_Object Qminus, Qplus; | ||
| 4104 | extern Lisp_Object Qprogn; | ||
| 4105 | extern Lisp_Object Qwhen; | ||
| 4106 | extern Lisp_Object Qmouse_leave_buffer_hook; | ||
| 4107 | extern void syms_of_callint (void); | 4091 | extern void syms_of_callint (void); |
| 4108 | 4092 | ||
| 4109 | /* Defined in casefiddle.c. */ | 4093 | /* Defined in casefiddle.c. */ |
| 4110 | 4094 | ||
| 4111 | extern Lisp_Object Qidentity; | ||
| 4112 | extern void syms_of_casefiddle (void); | 4095 | extern void syms_of_casefiddle (void); |
| 4113 | extern void keys_of_casefiddle (void); | 4096 | extern void keys_of_casefiddle (void); |
| 4114 | 4097 | ||
| @@ -4122,8 +4105,6 @@ extern void syms_of_casetab (void); | |||
| 4122 | extern Lisp_Object echo_message_buffer; | 4105 | extern Lisp_Object echo_message_buffer; |
| 4123 | extern struct kboard *echo_kboard; | 4106 | extern struct kboard *echo_kboard; |
| 4124 | extern void cancel_echoing (void); | 4107 | extern void cancel_echoing (void); |
| 4125 | extern Lisp_Object Qdisabled, QCfilter; | ||
| 4126 | extern Lisp_Object Qup, Qdown; | ||
| 4127 | extern Lisp_Object last_undo_boundary; | 4108 | extern Lisp_Object last_undo_boundary; |
| 4128 | extern bool input_pending; | 4109 | extern 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); | |||
| 4157 | extern void syms_of_indent (void); | 4138 | extern void syms_of_indent (void); |
| 4158 | 4139 | ||
| 4159 | /* Defined in frame.c. */ | 4140 | /* Defined in frame.c. */ |
| 4160 | extern Lisp_Object Qonly, Qnone; | ||
| 4161 | extern void store_frame_param (struct frame *, Lisp_Object, Lisp_Object); | 4141 | extern void store_frame_param (struct frame *, Lisp_Object, Lisp_Object); |
| 4162 | extern void store_in_alist (Lisp_Object *, Lisp_Object, Lisp_Object); | 4142 | extern void store_in_alist (Lisp_Object *, Lisp_Object, Lisp_Object); |
| 4163 | extern Lisp_Object do_switch_frame (Lisp_Object, int, int, Lisp_Object); | 4143 | extern Lisp_Object do_switch_frame (Lisp_Object, int, int, Lisp_Object); |
| @@ -4173,9 +4153,7 @@ extern bool display_arg; | |||
| 4173 | #endif | 4153 | #endif |
| 4174 | extern Lisp_Object decode_env_path (const char *, const char *, bool); | 4154 | extern Lisp_Object decode_env_path (const char *, const char *, bool); |
| 4175 | extern Lisp_Object empty_unibyte_string, empty_multibyte_string; | 4155 | extern Lisp_Object empty_unibyte_string, empty_multibyte_string; |
| 4176 | extern Lisp_Object Qfile_name_handler_alist; | ||
| 4177 | extern _Noreturn void terminate_due_to_signal (int, int); | 4156 | extern _Noreturn void terminate_due_to_signal (int, int); |
| 4178 | extern Lisp_Object Qkill_emacs; | ||
| 4179 | #ifdef WINDOWSNT | 4157 | #ifdef WINDOWSNT |
| 4180 | extern Lisp_Object Vlibrary_cache; | 4158 | extern Lisp_Object Vlibrary_cache; |
| 4181 | #endif | 4159 | #endif |
| @@ -4210,7 +4188,6 @@ extern bool inhibit_window_system; | |||
| 4210 | extern bool running_asynch_code; | 4188 | extern bool running_asynch_code; |
| 4211 | 4189 | ||
| 4212 | /* Defined in process.c. */ | 4190 | /* Defined in process.c. */ |
| 4213 | extern Lisp_Object QCtype, Qlocal; | ||
| 4214 | extern void kill_buffer_processes (Lisp_Object); | 4191 | extern void kill_buffer_processes (Lisp_Object); |
| 4215 | extern int wait_reading_process_output (intmax_t, int, int, bool, Lisp_Object, | 4192 | extern 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); | |||
| 4246 | extern void syms_of_callproc (void); | 4223 | extern void syms_of_callproc (void); |
| 4247 | 4224 | ||
| 4248 | /* Defined in doc.c. */ | 4225 | /* Defined in doc.c. */ |
| 4249 | extern Lisp_Object Qfunction_documentation; | ||
| 4250 | extern Lisp_Object read_doc_string (Lisp_Object); | 4226 | extern Lisp_Object read_doc_string (Lisp_Object); |
| 4251 | extern Lisp_Object get_doc_string (Lisp_Object, bool, bool); | 4227 | extern Lisp_Object get_doc_string (Lisp_Object, bool, bool); |
| 4252 | extern void syms_of_doc (void); | 4228 | extern void syms_of_doc (void); |
| @@ -4267,8 +4243,6 @@ extern void init_macros (void); | |||
| 4267 | extern void syms_of_macros (void); | 4243 | extern void syms_of_macros (void); |
| 4268 | 4244 | ||
| 4269 | /* Defined in undo.c. */ | 4245 | /* Defined in undo.c. */ |
| 4270 | extern Lisp_Object Qapply; | ||
| 4271 | extern Lisp_Object Qinhibit_read_only; | ||
| 4272 | extern void truncate_undo_list (struct buffer *); | 4246 | extern void truncate_undo_list (struct buffer *); |
| 4273 | extern void record_insert (ptrdiff_t, ptrdiff_t); | 4247 | extern void record_insert (ptrdiff_t, ptrdiff_t); |
| 4274 | extern void record_delete (ptrdiff_t, Lisp_Object, bool); | 4248 | extern 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); |
| 4280 | extern void syms_of_undo (void); | 4254 | extern void syms_of_undo (void); |
| 4281 | /* Defined in textprop.c. */ | ||
| 4282 | extern Lisp_Object Qmouse_face; | ||
| 4283 | extern Lisp_Object Qinsert_in_front_hooks, Qinsert_behind_hooks; | ||
| 4284 | extern Lisp_Object Qminibuffer_prompt; | ||
| 4285 | 4255 | ||
| 4256 | /* Defined in textprop.c. */ | ||
| 4286 | extern void report_interval_modification (Lisp_Object, Lisp_Object); | 4257 | extern 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. */ |
| 4368 | extern void syms_of_fontset (void); | 4339 | extern void syms_of_fontset (void); |
| 4369 | |||
| 4370 | /* Defined in xfns.c, w32fns.c, or macfns.c. */ | ||
| 4371 | extern 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. */ |
| 4391 | extern Lisp_Object Qdefault, Qfringe; | ||
| 4392 | extern Lisp_Object Qscroll_bar, Qcursor; | ||
| 4393 | extern Lisp_Object Qmode_line_inactive; | ||
| 4394 | extern Lisp_Object Qface; | ||
| 4395 | extern Lisp_Object Qnormal; | ||
| 4396 | extern Lisp_Object QCfamily, QCweight, QCslant; | ||
| 4397 | extern Lisp_Object QCheight, QCname, QCwidth, QCforeground, QCbackground; | ||
| 4398 | extern Lisp_Object Qextra_light, Qlight, Qsemi_light, Qsemi_bold; | ||
| 4399 | extern Lisp_Object Qbold, Qextra_bold, Qultra_bold; | ||
| 4400 | extern Lisp_Object Qoblique, Qitalic; | ||
| 4401 | extern Lisp_Object Vface_alternative_font_family_alist; | 4359 | extern Lisp_Object Vface_alternative_font_family_alist; |
| 4402 | extern Lisp_Object Vface_alternative_font_registry_alist; | 4360 | extern Lisp_Object Vface_alternative_font_registry_alist; |
| 4403 | extern void syms_of_xfaces (void); | 4361 | extern void syms_of_xfaces (void); |