diff options
Diffstat (limited to 'src/lisp.h')
| -rw-r--r-- | src/lisp.h | 288 |
1 files changed, 138 insertions, 150 deletions
diff --git a/src/lisp.h b/src/lisp.h index b906e4a1dfd..3a473a60b48 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -20,6 +20,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 20 | #ifndef EMACS_LISP_H | 20 | #ifndef EMACS_LISP_H |
| 21 | #define EMACS_LISP_H | 21 | #define EMACS_LISP_H |
| 22 | 22 | ||
| 23 | #include <setjmp.h> | ||
| 23 | #include <stdalign.h> | 24 | #include <stdalign.h> |
| 24 | #include <stdarg.h> | 25 | #include <stdarg.h> |
| 25 | #include <stdbool.h> | 26 | #include <stdbool.h> |
| @@ -325,7 +326,7 @@ enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = 1 }; | |||
| 325 | typedef EMACS_INT Lisp_Object; | 326 | typedef EMACS_INT Lisp_Object; |
| 326 | #define XLI(o) (o) | 327 | #define XLI(o) (o) |
| 327 | #define XIL(i) (i) | 328 | #define XIL(i) (i) |
| 328 | #define LISP_MAKE_RVALUE(o) (0+(o)) | 329 | #define LISP_MAKE_RVALUE(o) (0 + (o)) |
| 329 | #define LISP_INITIALLY_ZERO 0 | 330 | #define LISP_INITIALLY_ZERO 0 |
| 330 | enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = 0 }; | 331 | enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = 0 }; |
| 331 | #endif /* CHECK_LISP_OBJECT_TYPE */ | 332 | #endif /* CHECK_LISP_OBJECT_TYPE */ |
| @@ -417,9 +418,9 @@ enum lsb_bits | |||
| 417 | #define XINT(a) (XLI (a) >> INTTYPEBITS) | 418 | #define XINT(a) (XLI (a) >> INTTYPEBITS) |
| 418 | #define XUINT(a) ((EMACS_UINT) XLI (a) >> INTTYPEBITS) | 419 | #define XUINT(a) ((EMACS_UINT) XLI (a) >> INTTYPEBITS) |
| 419 | #define make_number(N) XIL ((EMACS_INT) (N) << INTTYPEBITS) | 420 | #define make_number(N) XIL ((EMACS_INT) (N) << INTTYPEBITS) |
| 420 | #define XSET(var, type, ptr) \ | 421 | #define make_lisp_ptr(ptr, type) \ |
| 421 | (eassert (XTYPE (XIL ((intptr_t) (ptr))) == 0), /* Check alignment. */ \ | 422 | (eassert (XTYPE (XIL ((intptr_t) (ptr))) == 0), /* Check alignment. */ \ |
| 422 | (var) = XIL ((type) | (intptr_t) (ptr))) | 423 | XIL ((type) | (intptr_t) (ptr))) |
| 423 | 424 | ||
| 424 | #define XPNTR(a) ((intptr_t) (XLI (a) & ~TYPEMASK)) | 425 | #define XPNTR(a) ((intptr_t) (XLI (a) & ~TYPEMASK)) |
| 425 | #define XUNTAG(a, type) ((intptr_t) (XLI (a) - (type))) | 426 | #define XUNTAG(a, type) ((intptr_t) (XLI (a) - (type))) |
| @@ -444,13 +445,13 @@ static EMACS_INT const VALMASK | |||
| 444 | #define XUINT(a) ((EMACS_UINT) (XLI (a) & INTMASK)) | 445 | #define XUINT(a) ((EMACS_UINT) (XLI (a) & INTMASK)) |
| 445 | #define make_number(N) XIL ((EMACS_INT) (N) & INTMASK) | 446 | #define make_number(N) XIL ((EMACS_INT) (N) & INTMASK) |
| 446 | 447 | ||
| 447 | #define XSET(var, type, ptr) \ | 448 | #define make_lisp_ptr(ptr, type) \ |
| 448 | ((var) = XIL ((EMACS_INT) ((EMACS_UINT) (type) << VALBITS) \ | 449 | (XIL ((EMACS_INT) ((EMACS_UINT) (type) << VALBITS) \ |
| 449 | + ((intptr_t) (ptr) & VALMASK))) | 450 | + ((intptr_t) (ptr) & VALMASK))) |
| 450 | 451 | ||
| 451 | #if DATA_SEG_BITS | 452 | #if DATA_SEG_BITS |
| 452 | /* DATA_SEG_BITS forces extra bits to be or'd in with any pointers | 453 | /* DATA_SEG_BITS forces extra bits to be or'd in with any pointers |
| 453 | which were stored in a Lisp_Object */ | 454 | which were stored in a Lisp_Object. */ |
| 454 | #define XPNTR(a) ((uintptr_t) ((XLI (a) & VALMASK)) | DATA_SEG_BITS)) | 455 | #define XPNTR(a) ((uintptr_t) ((XLI (a) & VALMASK)) | DATA_SEG_BITS)) |
| 455 | #else | 456 | #else |
| 456 | #define XPNTR(a) ((uintptr_t) (XLI (a) & VALMASK)) | 457 | #define XPNTR(a) ((uintptr_t) (XLI (a) & VALMASK)) |
| @@ -554,16 +555,16 @@ clip_to_bounds (ptrdiff_t lower, EMACS_INT num, ptrdiff_t upper) | |||
| 554 | 555 | ||
| 555 | /* Construct a Lisp_Object from a value or address. */ | 556 | /* Construct a Lisp_Object from a value or address. */ |
| 556 | 557 | ||
| 557 | #define XSETINT(a, b) (a) = make_number (b) | 558 | #define XSETINT(a, b) ((a) = make_number (b)) |
| 558 | #define XSETCONS(a, b) XSET (a, Lisp_Cons, b) | 559 | #define XSETCONS(a, b) ((a) = make_lisp_ptr (b, Lisp_Cons)) |
| 559 | #define XSETVECTOR(a, b) XSET (a, Lisp_Vectorlike, b) | 560 | #define XSETVECTOR(a, b) ((a) = make_lisp_ptr (b, Lisp_Vectorlike)) |
| 560 | #define XSETSTRING(a, b) XSET (a, Lisp_String, b) | 561 | #define XSETSTRING(a, b) ((a) = make_lisp_ptr (b, Lisp_String)) |
| 561 | #define XSETSYMBOL(a, b) XSET (a, Lisp_Symbol, b) | 562 | #define XSETSYMBOL(a, b) ((a) = make_lisp_ptr (b, Lisp_Symbol)) |
| 562 | #define XSETFLOAT(a, b) XSET (a, Lisp_Float, b) | 563 | #define XSETFLOAT(a, b) ((a) = make_lisp_ptr (b, Lisp_Float)) |
| 563 | 564 | ||
| 564 | /* Misc types. */ | 565 | /* Misc types. */ |
| 565 | 566 | ||
| 566 | #define XSETMISC(a, b) XSET (a, Lisp_Misc, b) | 567 | #define XSETMISC(a, b) ((a) = make_lisp_ptr (b, Lisp_Misc)) |
| 567 | #define XSETMARKER(a, b) (XSETMISC (a, b), XMISCTYPE (a) = Lisp_Misc_Marker) | 568 | #define XSETMARKER(a, b) (XSETMISC (a, b), XMISCTYPE (a) = Lisp_Misc_Marker) |
| 568 | 569 | ||
| 569 | /* Pseudovector types. */ | 570 | /* Pseudovector types. */ |
| @@ -909,14 +910,6 @@ enum | |||
| 909 | (ASCII_CHAR_P (IDX) ? CHAR_TABLE_REF_ASCII ((CT), (IDX)) \ | 910 | (ASCII_CHAR_P (IDX) ? CHAR_TABLE_REF_ASCII ((CT), (IDX)) \ |
| 910 | : char_table_ref ((CT), (IDX))) | 911 | : char_table_ref ((CT), (IDX))) |
| 911 | 912 | ||
| 912 | /* Almost equivalent to Faref (CT, IDX). However, if the result is | ||
| 913 | not a character, return IDX. | ||
| 914 | |||
| 915 | For these characters, do not check validity of CT | ||
| 916 | and do not follow parent. */ | ||
| 917 | #define CHAR_TABLE_TRANSLATE(CT, IDX) \ | ||
| 918 | char_table_translate (CT, IDX) | ||
| 919 | |||
| 920 | /* Equivalent to Faset (CT, IDX, VAL) with optimization for ASCII and | 913 | /* Equivalent to Faset (CT, IDX, VAL) with optimization for ASCII and |
| 921 | 8-bit European characters. Do not check validity of CT. */ | 914 | 8-bit European characters. Do not check validity of CT. */ |
| 922 | #define CHAR_TABLE_SET(CT, IDX, VAL) \ | 915 | #define CHAR_TABLE_SET(CT, IDX, VAL) \ |
| @@ -1205,9 +1198,9 @@ struct Lisp_Hash_Table | |||
| 1205 | struct Lisp_Hash_Table *next_weak; | 1198 | struct Lisp_Hash_Table *next_weak; |
| 1206 | 1199 | ||
| 1207 | /* C function to compare two keys. */ | 1200 | /* C function to compare two keys. */ |
| 1208 | int (*cmpfn) (struct Lisp_Hash_Table *, | 1201 | bool (*cmpfn) (struct Lisp_Hash_Table *, |
| 1209 | Lisp_Object, EMACS_UINT, | 1202 | Lisp_Object, EMACS_UINT, |
| 1210 | Lisp_Object, EMACS_UINT); | 1203 | Lisp_Object, EMACS_UINT); |
| 1211 | 1204 | ||
| 1212 | /* C function to compute hash code. */ | 1205 | /* C function to compute hash code. */ |
| 1213 | EMACS_UINT (*hashfn) (struct Lisp_Hash_Table *, Lisp_Object); | 1206 | EMACS_UINT (*hashfn) (struct Lisp_Hash_Table *, Lisp_Object); |
| @@ -1627,7 +1620,7 @@ typedef struct { | |||
| 1627 | int mouse_face_image_state; | 1620 | int mouse_face_image_state; |
| 1628 | } Mouse_HLInfo; | 1621 | } Mouse_HLInfo; |
| 1629 | 1622 | ||
| 1630 | /* Data type checking */ | 1623 | /* Data type checking. */ |
| 1631 | 1624 | ||
| 1632 | #define NILP(x) EQ (x, Qnil) | 1625 | #define NILP(x) EQ (x, Qnil) |
| 1633 | 1626 | ||
| @@ -1971,7 +1964,25 @@ extern void defvar_kboard (struct Lisp_Kboard_Objfwd *, const char *, int); | |||
| 1971 | static struct Lisp_Kboard_Objfwd ko_fwd; \ | 1964 | static struct Lisp_Kboard_Objfwd ko_fwd; \ |
| 1972 | defvar_kboard (&ko_fwd, lname, offsetof (KBOARD, vname ## _)); \ | 1965 | defvar_kboard (&ko_fwd, lname, offsetof (KBOARD, vname ## _)); \ |
| 1973 | } while (0) | 1966 | } while (0) |
| 1974 | 1967 | ||
| 1968 | /* Save and restore the instruction and environment pointers, | ||
| 1969 | without affecting the signal mask. */ | ||
| 1970 | |||
| 1971 | #ifdef HAVE__SETJMP | ||
| 1972 | typedef jmp_buf sys_jmp_buf; | ||
| 1973 | # define sys_setjmp(j) _setjmp (j) | ||
| 1974 | # define sys_longjmp(j, v) _longjmp (j, v) | ||
| 1975 | #elif defined HAVE_SIGSETJMP | ||
| 1976 | typedef sigjmp_buf sys_jmp_buf; | ||
| 1977 | # define sys_setjmp(j) sigsetjmp (j, 0) | ||
| 1978 | # define sys_longjmp(j, v) siglongjmp (j, v) | ||
| 1979 | #else | ||
| 1980 | /* A platform that uses neither _longjmp nor siglongjmp; assume | ||
| 1981 | longjmp does not affect the sigmask. */ | ||
| 1982 | typedef jmp_buf sys_jmp_buf; | ||
| 1983 | # define sys_setjmp(j) setjmp (j) | ||
| 1984 | # define sys_longjmp(j, v) longjmp (j, v) | ||
| 1985 | #endif | ||
| 1975 | 1986 | ||
| 1976 | 1987 | ||
| 1977 | /* Structure for recording Lisp call stack for backtrace purposes. */ | 1988 | /* Structure for recording Lisp call stack for backtrace purposes. */ |
| @@ -2000,7 +2011,7 @@ struct specbinding | |||
| 2000 | { | 2011 | { |
| 2001 | Lisp_Object symbol, old_value; | 2012 | Lisp_Object symbol, old_value; |
| 2002 | specbinding_func func; | 2013 | specbinding_func func; |
| 2003 | Lisp_Object unused; /* Dividing by 16 is faster than by 12 */ | 2014 | Lisp_Object unused; /* Dividing by 16 is faster than by 12. */ |
| 2004 | }; | 2015 | }; |
| 2005 | 2016 | ||
| 2006 | extern struct specbinding *specpdl; | 2017 | extern struct specbinding *specpdl; |
| @@ -2009,7 +2020,10 @@ extern ptrdiff_t specpdl_size; | |||
| 2009 | 2020 | ||
| 2010 | #define SPECPDL_INDEX() (specpdl_ptr - specpdl) | 2021 | #define SPECPDL_INDEX() (specpdl_ptr - specpdl) |
| 2011 | 2022 | ||
| 2012 | /* Everything needed to describe an active condition case. */ | 2023 | /* Everything needed to describe an active condition case. |
| 2024 | |||
| 2025 | Members are volatile if their values need to survive _longjmp when | ||
| 2026 | a 'struct handler' is a local variable. */ | ||
| 2013 | struct handler | 2027 | struct handler |
| 2014 | { | 2028 | { |
| 2015 | /* The handler clauses and variable from the condition-case form. */ | 2029 | /* The handler clauses and variable from the condition-case form. */ |
| @@ -2020,10 +2034,12 @@ struct handler | |||
| 2020 | error: handle all conditions, and errors can run the debugger | 2034 | error: handle all conditions, and errors can run the debugger |
| 2021 | or display a backtrace. */ | 2035 | or display a backtrace. */ |
| 2022 | Lisp_Object handler; | 2036 | Lisp_Object handler; |
| 2023 | Lisp_Object var; | 2037 | |
| 2038 | Lisp_Object volatile var; | ||
| 2039 | |||
| 2024 | /* Fsignal stores here the condition-case clause that applies, | 2040 | /* Fsignal stores here the condition-case clause that applies, |
| 2025 | and Fcondition_case thus knows which clause to run. */ | 2041 | and Fcondition_case thus knows which clause to run. */ |
| 2026 | Lisp_Object chosen_clause; | 2042 | Lisp_Object volatile chosen_clause; |
| 2027 | 2043 | ||
| 2028 | /* Used to effect the longjump out to the handler. */ | 2044 | /* Used to effect the longjump out to the handler. */ |
| 2029 | struct catchtag *tag; | 2045 | struct catchtag *tag; |
| @@ -2049,19 +2065,21 @@ struct handler | |||
| 2049 | of the catch form. | 2065 | of the catch form. |
| 2050 | 2066 | ||
| 2051 | All the other members are concerned with restoring the interpreter | 2067 | All the other members are concerned with restoring the interpreter |
| 2052 | state. */ | 2068 | state. |
| 2053 | 2069 | ||
| 2070 | Members are volatile if their values need to survive _longjmp when | ||
| 2071 | a 'struct catchtag' is a local variable. */ | ||
| 2054 | struct catchtag | 2072 | struct catchtag |
| 2055 | { | 2073 | { |
| 2056 | Lisp_Object tag; | 2074 | Lisp_Object tag; |
| 2057 | Lisp_Object val; | 2075 | Lisp_Object volatile val; |
| 2058 | struct catchtag *next; | 2076 | struct catchtag *volatile next; |
| 2059 | struct gcpro *gcpro; | 2077 | struct gcpro *gcpro; |
| 2060 | jmp_buf jmp; | 2078 | sys_jmp_buf jmp; |
| 2061 | struct backtrace *backlist; | 2079 | struct backtrace *backlist; |
| 2062 | struct handler *handlerlist; | 2080 | struct handler *handlerlist; |
| 2063 | EMACS_INT lisp_eval_depth; | 2081 | EMACS_INT lisp_eval_depth; |
| 2064 | ptrdiff_t pdlcount; | 2082 | ptrdiff_t volatile pdlcount; |
| 2065 | int poll_suppress_count; | 2083 | int poll_suppress_count; |
| 2066 | int interrupt_input_blocked; | 2084 | int interrupt_input_blocked; |
| 2067 | struct byte_stack *byte_stack; | 2085 | struct byte_stack *byte_stack; |
| @@ -2089,22 +2107,16 @@ extern char *stack_bottom; | |||
| 2089 | If quit-flag is set to `kill-emacs' the SIGINT handler has received | 2107 | If quit-flag is set to `kill-emacs' the SIGINT handler has received |
| 2090 | a request to exit Emacs when it is safe to do. */ | 2108 | a request to exit Emacs when it is safe to do. */ |
| 2091 | 2109 | ||
| 2092 | #ifdef SYNC_INPUT | ||
| 2093 | extern void process_pending_signals (void); | 2110 | extern void process_pending_signals (void); |
| 2094 | extern int pending_signals; | 2111 | extern int pending_signals; |
| 2095 | #define ELSE_PENDING_SIGNALS \ | ||
| 2096 | else if (pending_signals) \ | ||
| 2097 | process_pending_signals (); | ||
| 2098 | #else /* not SYNC_INPUT */ | ||
| 2099 | #define ELSE_PENDING_SIGNALS | ||
| 2100 | #endif /* not SYNC_INPUT */ | ||
| 2101 | 2112 | ||
| 2102 | extern void process_quit_flag (void); | 2113 | extern void process_quit_flag (void); |
| 2103 | #define QUIT \ | 2114 | #define QUIT \ |
| 2104 | do { \ | 2115 | do { \ |
| 2105 | if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \ | 2116 | if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \ |
| 2106 | process_quit_flag (); \ | 2117 | process_quit_flag (); \ |
| 2107 | ELSE_PENDING_SIGNALS \ | 2118 | else if (pending_signals) \ |
| 2119 | process_pending_signals (); \ | ||
| 2108 | } while (0) | 2120 | } while (0) |
| 2109 | 2121 | ||
| 2110 | 2122 | ||
| @@ -2288,7 +2300,7 @@ extern int gcpro_level; | |||
| 2288 | 2300 | ||
| 2289 | #define UNGCPRO \ | 2301 | #define UNGCPRO \ |
| 2290 | ((--gcpro_level != gcpro1.level) \ | 2302 | ((--gcpro_level != gcpro1.level) \ |
| 2291 | ? (abort (), 0) \ | 2303 | ? (emacs_abort (), 0) \ |
| 2292 | : ((gcprolist = gcpro1.next), 0)) | 2304 | : ((gcprolist = gcpro1.next), 0)) |
| 2293 | 2305 | ||
| 2294 | #endif /* DEBUG_GCPRO */ | 2306 | #endif /* DEBUG_GCPRO */ |
| @@ -2567,8 +2579,7 @@ extern Lisp_Object Qchar_table_p, Qvector_or_char_table_p; | |||
| 2567 | 2579 | ||
| 2568 | extern Lisp_Object Qcdr; | 2580 | extern Lisp_Object Qcdr; |
| 2569 | 2581 | ||
| 2570 | extern Lisp_Object Qrange_error, Qdomain_error, Qsingularity_error; | 2582 | extern Lisp_Object Qrange_error, Qoverflow_error; |
| 2571 | extern Lisp_Object Qoverflow_error, Qunderflow_error; | ||
| 2572 | 2583 | ||
| 2573 | extern Lisp_Object Qfloatp; | 2584 | extern Lisp_Object Qfloatp; |
| 2574 | extern Lisp_Object Qnumberp, Qnumber_or_marker_p; | 2585 | extern Lisp_Object Qnumberp, Qnumber_or_marker_p; |
| @@ -2579,10 +2590,10 @@ extern Lisp_Object Qfont_spec, Qfont_entity, Qfont_object; | |||
| 2579 | 2590 | ||
| 2580 | EXFUN (Fbyteorder, 0) ATTRIBUTE_CONST; | 2591 | EXFUN (Fbyteorder, 0) ATTRIBUTE_CONST; |
| 2581 | 2592 | ||
| 2582 | /* Defined in frame.c */ | 2593 | /* Defined in frame.c. */ |
| 2583 | extern Lisp_Object Qframep; | 2594 | extern Lisp_Object Qframep; |
| 2584 | 2595 | ||
| 2585 | /* Defined in data.c */ | 2596 | /* Defined in data.c. */ |
| 2586 | extern Lisp_Object indirect_function (Lisp_Object); | 2597 | extern Lisp_Object indirect_function (Lisp_Object); |
| 2587 | extern Lisp_Object find_symbol_value (Lisp_Object); | 2598 | extern Lisp_Object find_symbol_value (Lisp_Object); |
| 2588 | 2599 | ||
| @@ -2629,7 +2640,7 @@ extern void swap_in_global_binding (struct Lisp_Symbol *); | |||
| 2629 | extern void syms_of_cmds (void); | 2640 | extern void syms_of_cmds (void); |
| 2630 | extern void keys_of_cmds (void); | 2641 | extern void keys_of_cmds (void); |
| 2631 | 2642 | ||
| 2632 | /* Defined in coding.c */ | 2643 | /* Defined in coding.c. */ |
| 2633 | extern Lisp_Object Qcharset; | 2644 | extern Lisp_Object Qcharset; |
| 2634 | extern Lisp_Object detect_coding_system (const unsigned char *, ptrdiff_t, | 2645 | extern Lisp_Object detect_coding_system (const unsigned char *, ptrdiff_t, |
| 2635 | ptrdiff_t, bool, bool, Lisp_Object); | 2646 | ptrdiff_t, bool, bool, Lisp_Object); |
| @@ -2637,7 +2648,7 @@ extern void init_coding (void); | |||
| 2637 | extern void init_coding_once (void); | 2648 | extern void init_coding_once (void); |
| 2638 | extern void syms_of_coding (void); | 2649 | extern void syms_of_coding (void); |
| 2639 | 2650 | ||
| 2640 | /* Defined in character.c */ | 2651 | /* Defined in character.c. */ |
| 2641 | EXFUN (Fmax_char, 0) ATTRIBUTE_CONST; | 2652 | EXFUN (Fmax_char, 0) ATTRIBUTE_CONST; |
| 2642 | extern ptrdiff_t chars_in_text (const unsigned char *, ptrdiff_t); | 2653 | extern ptrdiff_t chars_in_text (const unsigned char *, ptrdiff_t); |
| 2643 | extern ptrdiff_t multibyte_chars_in_text (const unsigned char *, ptrdiff_t); | 2654 | extern ptrdiff_t multibyte_chars_in_text (const unsigned char *, ptrdiff_t); |
| @@ -2645,21 +2656,21 @@ extern int multibyte_char_to_unibyte (int) ATTRIBUTE_CONST; | |||
| 2645 | extern int multibyte_char_to_unibyte_safe (int) ATTRIBUTE_CONST; | 2656 | extern int multibyte_char_to_unibyte_safe (int) ATTRIBUTE_CONST; |
| 2646 | extern void syms_of_character (void); | 2657 | extern void syms_of_character (void); |
| 2647 | 2658 | ||
| 2648 | /* Defined in charset.c */ | 2659 | /* Defined in charset.c. */ |
| 2649 | extern void init_charset (void); | 2660 | extern void init_charset (void); |
| 2650 | extern void init_charset_once (void); | 2661 | extern void init_charset_once (void); |
| 2651 | extern void syms_of_charset (void); | 2662 | extern void syms_of_charset (void); |
| 2652 | /* Structure forward declarations. */ | 2663 | /* Structure forward declarations. */ |
| 2653 | struct charset; | 2664 | struct charset; |
| 2654 | 2665 | ||
| 2655 | /* Defined in composite.c */ | 2666 | /* Defined in composite.c. */ |
| 2656 | extern void syms_of_composite (void); | 2667 | extern void syms_of_composite (void); |
| 2657 | 2668 | ||
| 2658 | /* Defined in syntax.c */ | 2669 | /* Defined in syntax.c. */ |
| 2659 | extern void init_syntax_once (void); | 2670 | extern void init_syntax_once (void); |
| 2660 | extern void syms_of_syntax (void); | 2671 | extern void syms_of_syntax (void); |
| 2661 | 2672 | ||
| 2662 | /* Defined in fns.c */ | 2673 | /* Defined in fns.c. */ |
| 2663 | extern Lisp_Object QCrehash_size, QCrehash_threshold; | 2674 | extern Lisp_Object QCrehash_size, QCrehash_threshold; |
| 2664 | enum { NEXT_ALMOST_PRIME_LIMIT = 11 }; | 2675 | enum { NEXT_ALMOST_PRIME_LIMIT = 11 }; |
| 2665 | EXFUN (Fidentity, 1) ATTRIBUTE_CONST; | 2676 | EXFUN (Fidentity, 1) ATTRIBUTE_CONST; |
| @@ -2693,13 +2704,12 @@ extern Lisp_Object string_to_multibyte (Lisp_Object); | |||
| 2693 | extern Lisp_Object string_make_unibyte (Lisp_Object); | 2704 | extern Lisp_Object string_make_unibyte (Lisp_Object); |
| 2694 | extern void syms_of_fns (void); | 2705 | extern void syms_of_fns (void); |
| 2695 | 2706 | ||
| 2696 | /* Defined in floatfns.c */ | 2707 | /* Defined in floatfns.c. */ |
| 2697 | extern double extract_float (Lisp_Object); | 2708 | extern double extract_float (Lisp_Object); |
| 2698 | extern void init_floatfns (void); | ||
| 2699 | extern void syms_of_floatfns (void); | 2709 | extern void syms_of_floatfns (void); |
| 2700 | extern Lisp_Object fmod_float (Lisp_Object x, Lisp_Object y); | 2710 | extern Lisp_Object fmod_float (Lisp_Object x, Lisp_Object y); |
| 2701 | 2711 | ||
| 2702 | /* Defined in fringe.c */ | 2712 | /* Defined in fringe.c. */ |
| 2703 | extern void syms_of_fringe (void); | 2713 | extern void syms_of_fringe (void); |
| 2704 | extern void init_fringe (void); | 2714 | extern void init_fringe (void); |
| 2705 | #ifdef HAVE_WINDOW_SYSTEM | 2715 | #ifdef HAVE_WINDOW_SYSTEM |
| @@ -2707,13 +2717,13 @@ extern void mark_fringe_data (void); | |||
| 2707 | extern void init_fringe_once (void); | 2717 | extern void init_fringe_once (void); |
| 2708 | #endif /* HAVE_WINDOW_SYSTEM */ | 2718 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 2709 | 2719 | ||
| 2710 | /* Defined in image.c */ | 2720 | /* Defined in image.c. */ |
| 2711 | extern Lisp_Object QCascent, QCmargin, QCrelief; | 2721 | extern Lisp_Object QCascent, QCmargin, QCrelief; |
| 2712 | extern Lisp_Object QCconversion; | 2722 | extern Lisp_Object QCconversion; |
| 2713 | extern int x_bitmap_mask (struct frame *, ptrdiff_t); | 2723 | extern int x_bitmap_mask (struct frame *, ptrdiff_t); |
| 2714 | extern void syms_of_image (void); | 2724 | extern void syms_of_image (void); |
| 2715 | 2725 | ||
| 2716 | /* Defined in insdel.c */ | 2726 | /* Defined in insdel.c. */ |
| 2717 | extern Lisp_Object Qinhibit_modification_hooks; | 2727 | extern Lisp_Object Qinhibit_modification_hooks; |
| 2718 | extern void move_gap (ptrdiff_t); | 2728 | extern void move_gap (ptrdiff_t); |
| 2719 | extern void move_gap_both (ptrdiff_t, ptrdiff_t); | 2729 | extern void move_gap_both (ptrdiff_t, ptrdiff_t); |
| @@ -2759,7 +2769,7 @@ extern void replace_range_2 (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t, | |||
| 2759 | const char *, ptrdiff_t, ptrdiff_t, bool); | 2769 | const char *, ptrdiff_t, ptrdiff_t, bool); |
| 2760 | extern void syms_of_insdel (void); | 2770 | extern void syms_of_insdel (void); |
| 2761 | 2771 | ||
| 2762 | /* Defined in dispnew.c */ | 2772 | /* Defined in dispnew.c. */ |
| 2763 | #if (defined PROFILING \ | 2773 | #if (defined PROFILING \ |
| 2764 | && (defined __FreeBSD__ || defined GNU_LINUX || defined __MINGW32__)) | 2774 | && (defined __FreeBSD__ || defined GNU_LINUX || defined __MINGW32__)) |
| 2765 | _Noreturn void __executable_start (void); | 2775 | _Noreturn void __executable_start (void); |
| @@ -2770,7 +2780,7 @@ extern Lisp_Object sit_for (Lisp_Object, bool, int); | |||
| 2770 | extern void init_display (void); | 2780 | extern void init_display (void); |
| 2771 | extern void syms_of_display (void); | 2781 | extern void syms_of_display (void); |
| 2772 | 2782 | ||
| 2773 | /* Defined in xdisp.c */ | 2783 | /* Defined in xdisp.c. */ |
| 2774 | extern Lisp_Object Qinhibit_point_motion_hooks; | 2784 | extern Lisp_Object Qinhibit_point_motion_hooks; |
| 2775 | extern Lisp_Object Qinhibit_redisplay, Qdisplay; | 2785 | extern Lisp_Object Qinhibit_redisplay, Qdisplay; |
| 2776 | extern Lisp_Object Qmenu_bar_update_hook; | 2786 | extern Lisp_Object Qmenu_bar_update_hook; |
| @@ -2821,17 +2831,15 @@ extern Lisp_Object safe_eval (Lisp_Object); | |||
| 2821 | extern int pos_visible_p (struct window *, ptrdiff_t, int *, | 2831 | extern int pos_visible_p (struct window *, ptrdiff_t, int *, |
| 2822 | int *, int *, int *, int *, int *); | 2832 | int *, int *, int *, int *, int *); |
| 2823 | 2833 | ||
| 2824 | /* Defined in xsettings.c */ | 2834 | /* Defined in xsettings.c. */ |
| 2825 | extern void syms_of_xsettings (void); | 2835 | extern void syms_of_xsettings (void); |
| 2826 | 2836 | ||
| 2827 | /* Defined in vm-limit.c. */ | 2837 | /* Defined in vm-limit.c. */ |
| 2828 | extern void memory_warnings (void *, void (*warnfun) (const char *)); | 2838 | extern void memory_warnings (void *, void (*warnfun) (const char *)); |
| 2829 | 2839 | ||
| 2830 | /* Defined in alloc.c */ | 2840 | /* Defined in alloc.c. */ |
| 2831 | extern void check_pure_size (void); | 2841 | extern void check_pure_size (void); |
| 2832 | extern void allocate_string_data (struct Lisp_String *, EMACS_INT, EMACS_INT); | 2842 | extern void allocate_string_data (struct Lisp_String *, EMACS_INT, EMACS_INT); |
| 2833 | extern void reset_malloc_hooks (void); | ||
| 2834 | extern void uninterrupt_malloc (void); | ||
| 2835 | extern void malloc_warning (const char *); | 2843 | extern void malloc_warning (const char *); |
| 2836 | extern _Noreturn void memory_full (size_t); | 2844 | extern _Noreturn void memory_full (size_t); |
| 2837 | extern _Noreturn void buffer_memory_full (ptrdiff_t); | 2845 | extern _Noreturn void buffer_memory_full (ptrdiff_t); |
| @@ -2930,7 +2938,7 @@ extern void check_cons_list (void); | |||
| 2930 | #endif | 2938 | #endif |
| 2931 | 2939 | ||
| 2932 | #ifdef REL_ALLOC | 2940 | #ifdef REL_ALLOC |
| 2933 | /* Defined in ralloc.c */ | 2941 | /* Defined in ralloc.c. */ |
| 2934 | extern void *r_alloc (void **, size_t); | 2942 | extern void *r_alloc (void **, size_t); |
| 2935 | extern void r_alloc_free (void **); | 2943 | extern void r_alloc_free (void **); |
| 2936 | extern void *r_re_alloc (void **, size_t); | 2944 | extern void *r_re_alloc (void **, size_t); |
| @@ -2938,7 +2946,7 @@ extern void r_alloc_reset_variable (void **, void **); | |||
| 2938 | extern void r_alloc_inhibit_buffer_relocation (int); | 2946 | extern void r_alloc_inhibit_buffer_relocation (int); |
| 2939 | #endif | 2947 | #endif |
| 2940 | 2948 | ||
| 2941 | /* Defined in chartab.c */ | 2949 | /* Defined in chartab.c. */ |
| 2942 | extern Lisp_Object copy_char_table (Lisp_Object); | 2950 | extern Lisp_Object copy_char_table (Lisp_Object); |
| 2943 | extern Lisp_Object char_table_ref (Lisp_Object, int); | 2951 | extern Lisp_Object char_table_ref (Lisp_Object, int); |
| 2944 | extern Lisp_Object char_table_ref_and_range (Lisp_Object, int, | 2952 | extern Lisp_Object char_table_ref_and_range (Lisp_Object, int, |
| @@ -2956,7 +2964,7 @@ extern void map_char_table_for_charset (void (*c_function) (Lisp_Object, Lisp_Ob | |||
| 2956 | extern Lisp_Object uniprop_table (Lisp_Object); | 2964 | extern Lisp_Object uniprop_table (Lisp_Object); |
| 2957 | extern void syms_of_chartab (void); | 2965 | extern void syms_of_chartab (void); |
| 2958 | 2966 | ||
| 2959 | /* Defined in print.c */ | 2967 | /* Defined in print.c. */ |
| 2960 | extern Lisp_Object Vprin1_to_string_buffer; | 2968 | extern Lisp_Object Vprin1_to_string_buffer; |
| 2961 | extern void debug_print (Lisp_Object) EXTERNALLY_VISIBLE; | 2969 | extern void debug_print (Lisp_Object) EXTERNALLY_VISIBLE; |
| 2962 | extern Lisp_Object Qstandard_output; | 2970 | extern Lisp_Object Qstandard_output; |
| @@ -2973,7 +2981,7 @@ enum FLOAT_TO_STRING_BUFSIZE { FLOAT_TO_STRING_BUFSIZE = 350 }; | |||
| 2973 | extern int float_to_string (char *, double); | 2981 | extern int float_to_string (char *, double); |
| 2974 | extern void syms_of_print (void); | 2982 | extern void syms_of_print (void); |
| 2975 | 2983 | ||
| 2976 | /* Defined in doprnt.c */ | 2984 | /* Defined in doprnt.c. */ |
| 2977 | extern ptrdiff_t doprnt (char *, ptrdiff_t, const char *, const char *, | 2985 | extern ptrdiff_t doprnt (char *, ptrdiff_t, const char *, const char *, |
| 2978 | va_list); | 2986 | va_list); |
| 2979 | extern ptrdiff_t esprintf (char *, char const *, ...) | 2987 | extern ptrdiff_t esprintf (char *, char const *, ...) |
| @@ -2988,6 +2996,7 @@ extern ptrdiff_t evxprintf (char **, ptrdiff_t *, char const *, ptrdiff_t, | |||
| 2988 | /* Defined in lread.c. */ | 2996 | /* Defined in lread.c. */ |
| 2989 | extern Lisp_Object Qvariable_documentation, Qstandard_input; | 2997 | extern Lisp_Object Qvariable_documentation, Qstandard_input; |
| 2990 | extern Lisp_Object Qbackquote, Qcomma, Qcomma_at, Qcomma_dot, Qfunction; | 2998 | extern Lisp_Object Qbackquote, Qcomma, Qcomma_at, Qcomma_dot, Qfunction; |
| 2999 | extern Lisp_Object Qlexical_binding; | ||
| 2991 | extern Lisp_Object check_obarray (Lisp_Object); | 3000 | extern Lisp_Object check_obarray (Lisp_Object); |
| 2992 | extern Lisp_Object intern_1 (const char *, ptrdiff_t); | 3001 | extern Lisp_Object intern_1 (const char *, ptrdiff_t); |
| 2993 | extern Lisp_Object intern_c_string_1 (const char *, ptrdiff_t); | 3002 | extern Lisp_Object intern_c_string_1 (const char *, ptrdiff_t); |
| @@ -3021,12 +3030,11 @@ intern_c_string (const char *str) | |||
| 3021 | 3030 | ||
| 3022 | /* Defined in eval.c. */ | 3031 | /* Defined in eval.c. */ |
| 3023 | extern Lisp_Object Qautoload, Qexit, Qinteractive, Qcommandp, Qmacro; | 3032 | extern Lisp_Object Qautoload, Qexit, Qinteractive, Qcommandp, Qmacro; |
| 3024 | extern Lisp_Object Qinhibit_quit, Qclosure; | 3033 | extern Lisp_Object Qinhibit_quit, Qinternal_interpreter_environment, Qclosure; |
| 3025 | extern Lisp_Object Qand_rest; | 3034 | extern Lisp_Object Qand_rest; |
| 3026 | extern Lisp_Object Vautoload_queue; | 3035 | extern Lisp_Object Vautoload_queue; |
| 3027 | extern Lisp_Object Vsignaling_function; | 3036 | extern Lisp_Object Vsignaling_function; |
| 3028 | extern Lisp_Object inhibit_lisp_code; | 3037 | extern Lisp_Object inhibit_lisp_code; |
| 3029 | extern int handling_signal; | ||
| 3030 | #if BYTE_MARK_STACK | 3038 | #if BYTE_MARK_STACK |
| 3031 | extern struct catchtag *catchlist; | 3039 | extern struct catchtag *catchlist; |
| 3032 | extern struct handler *handlerlist; | 3040 | extern struct handler *handlerlist; |
| @@ -3075,6 +3083,7 @@ extern _Noreturn void error (const char *, ...) ATTRIBUTE_FORMAT_PRINTF (1, 2); | |||
| 3075 | extern _Noreturn void verror (const char *, va_list) | 3083 | extern _Noreturn void verror (const char *, va_list) |
| 3076 | ATTRIBUTE_FORMAT_PRINTF (1, 0); | 3084 | ATTRIBUTE_FORMAT_PRINTF (1, 0); |
| 3077 | extern Lisp_Object un_autoload (Lisp_Object); | 3085 | extern Lisp_Object un_autoload (Lisp_Object); |
| 3086 | extern Lisp_Object call_debugger (Lisp_Object arg); | ||
| 3078 | extern void init_eval_once (void); | 3087 | extern void init_eval_once (void); |
| 3079 | extern Lisp_Object safe_call (ptrdiff_t, Lisp_Object, ...); | 3088 | extern Lisp_Object safe_call (ptrdiff_t, Lisp_Object, ...); |
| 3080 | extern Lisp_Object safe_call1 (Lisp_Object, Lisp_Object); | 3089 | extern Lisp_Object safe_call1 (Lisp_Object, Lisp_Object); |
| @@ -3137,7 +3146,7 @@ extern Lisp_Object set_marker_restricted_both (Lisp_Object, Lisp_Object, | |||
| 3137 | extern Lisp_Object build_marker (struct buffer *, ptrdiff_t, ptrdiff_t); | 3146 | extern Lisp_Object build_marker (struct buffer *, ptrdiff_t, ptrdiff_t); |
| 3138 | extern void syms_of_marker (void); | 3147 | extern void syms_of_marker (void); |
| 3139 | 3148 | ||
| 3140 | /* Defined in fileio.c */ | 3149 | /* Defined in fileio.c. */ |
| 3141 | 3150 | ||
| 3142 | extern Lisp_Object Qfile_error; | 3151 | extern Lisp_Object Qfile_error; |
| 3143 | extern Lisp_Object Qfile_exists_p; | 3152 | extern Lisp_Object Qfile_exists_p; |
| @@ -3145,16 +3154,16 @@ extern Lisp_Object Qfile_directory_p; | |||
| 3145 | extern Lisp_Object Qinsert_file_contents; | 3154 | extern Lisp_Object Qinsert_file_contents; |
| 3146 | extern Lisp_Object Qfile_name_history; | 3155 | extern Lisp_Object Qfile_name_history; |
| 3147 | extern Lisp_Object expand_and_dir_to_file (Lisp_Object, Lisp_Object); | 3156 | extern Lisp_Object expand_and_dir_to_file (Lisp_Object, Lisp_Object); |
| 3148 | EXFUN (Fread_file_name, 6); /* not a normal DEFUN */ | 3157 | EXFUN (Fread_file_name, 6); /* Not a normal DEFUN. */ |
| 3149 | extern Lisp_Object close_file_unwind (Lisp_Object); | 3158 | extern Lisp_Object close_file_unwind (Lisp_Object); |
| 3150 | extern Lisp_Object restore_point_unwind (Lisp_Object); | 3159 | extern Lisp_Object restore_point_unwind (Lisp_Object); |
| 3151 | extern _Noreturn void report_file_error (const char *, Lisp_Object); | 3160 | extern _Noreturn void report_file_error (const char *, Lisp_Object); |
| 3152 | extern int internal_delete_file (Lisp_Object); | 3161 | extern void internal_delete_file (Lisp_Object); |
| 3153 | extern void syms_of_fileio (void); | 3162 | extern void syms_of_fileio (void); |
| 3154 | extern Lisp_Object make_temp_name (Lisp_Object, int); | 3163 | extern Lisp_Object make_temp_name (Lisp_Object, bool); |
| 3155 | extern Lisp_Object Qdelete_file; | 3164 | extern Lisp_Object Qdelete_file; |
| 3156 | 3165 | ||
| 3157 | /* Defined in search.c */ | 3166 | /* Defined in search.c. */ |
| 3158 | extern void shrink_regexp_cache (void); | 3167 | extern void shrink_regexp_cache (void); |
| 3159 | extern void restore_search_regs (void); | 3168 | extern void restore_search_regs (void); |
| 3160 | extern void record_unwind_save_match_data (void); | 3169 | extern void record_unwind_save_match_data (void); |
| @@ -3227,9 +3236,7 @@ extern void cmd_error_internal (Lisp_Object, const char *); | |||
| 3227 | extern Lisp_Object command_loop_1 (void); | 3236 | extern Lisp_Object command_loop_1 (void); |
| 3228 | extern Lisp_Object recursive_edit_1 (void); | 3237 | extern Lisp_Object recursive_edit_1 (void); |
| 3229 | extern void record_auto_save (void); | 3238 | extern void record_auto_save (void); |
| 3230 | #ifdef SIGDANGER | ||
| 3231 | extern void force_auto_save_soon (void); | 3239 | extern void force_auto_save_soon (void); |
| 3232 | #endif | ||
| 3233 | extern void init_keyboard (void); | 3240 | extern void init_keyboard (void); |
| 3234 | extern void syms_of_keyboard (void); | 3241 | extern void syms_of_keyboard (void); |
| 3235 | extern void keys_of_keyboard (void); | 3242 | extern void keys_of_keyboard (void); |
| @@ -3257,14 +3264,12 @@ extern void syms_of_frame (void); | |||
| 3257 | extern char **initial_argv; | 3264 | extern char **initial_argv; |
| 3258 | extern int initial_argc; | 3265 | extern int initial_argc; |
| 3259 | #if defined (HAVE_X_WINDOWS) || defined (HAVE_NS) | 3266 | #if defined (HAVE_X_WINDOWS) || defined (HAVE_NS) |
| 3260 | extern int display_arg; | 3267 | extern bool display_arg; |
| 3261 | #endif | 3268 | #endif |
| 3262 | extern Lisp_Object decode_env_path (const char *, const char *); | 3269 | extern Lisp_Object decode_env_path (const char *, const char *); |
| 3263 | extern Lisp_Object empty_unibyte_string, empty_multibyte_string; | 3270 | extern Lisp_Object empty_unibyte_string, empty_multibyte_string; |
| 3264 | extern Lisp_Object Qfile_name_handler_alist; | 3271 | extern Lisp_Object Qfile_name_handler_alist; |
| 3265 | #ifdef FLOAT_CATCH_SIGILL | 3272 | extern _Noreturn void fatal_error_backtrace (int, int); |
| 3266 | extern void fatal_error_signal (int); | ||
| 3267 | #endif | ||
| 3268 | extern Lisp_Object Qkill_emacs; | 3273 | extern Lisp_Object Qkill_emacs; |
| 3269 | #if HAVE_SETLOCALE | 3274 | #if HAVE_SETLOCALE |
| 3270 | void fixup_locale (void); | 3275 | void fixup_locale (void); |
| @@ -3276,22 +3281,26 @@ void synchronize_system_time_locale (void); | |||
| 3276 | #define synchronize_system_messages_locale() | 3281 | #define synchronize_system_messages_locale() |
| 3277 | #define synchronize_system_time_locale() | 3282 | #define synchronize_system_time_locale() |
| 3278 | #endif | 3283 | #endif |
| 3279 | void shut_down_emacs (int, int, Lisp_Object); | 3284 | extern void shut_down_emacs (int, Lisp_Object); |
| 3280 | /* Nonzero means don't do interactive redisplay and don't change tty modes. */ | ||
| 3281 | extern int noninteractive; | ||
| 3282 | 3285 | ||
| 3283 | /* Nonzero means remove site-lisp directories from load-path. */ | 3286 | /* True means don't do interactive redisplay and don't change tty modes. */ |
| 3284 | extern int no_site_lisp; | 3287 | extern bool noninteractive; |
| 3288 | |||
| 3289 | /* True means remove site-lisp directories from load-path. */ | ||
| 3290 | extern bool no_site_lisp; | ||
| 3285 | 3291 | ||
| 3286 | /* Pipe used to send exit notification to the daemon parent at | 3292 | /* Pipe used to send exit notification to the daemon parent at |
| 3287 | startup. */ | 3293 | startup. */ |
| 3288 | extern int daemon_pipe[2]; | 3294 | extern int daemon_pipe[2]; |
| 3289 | #define IS_DAEMON (daemon_pipe[1] != 0) | 3295 | #define IS_DAEMON (daemon_pipe[1] != 0) |
| 3290 | 3296 | ||
| 3291 | /* Nonzero means don't do use window-system-specific display code. */ | 3297 | /* True if handling a fatal error already. */ |
| 3292 | extern int inhibit_window_system; | 3298 | extern bool fatal_error_in_progress; |
| 3293 | /* Nonzero means that a filter or a sentinel is running. */ | 3299 | |
| 3294 | extern int running_asynch_code; | 3300 | /* True means don't do use window-system-specific display code. */ |
| 3301 | extern bool inhibit_window_system; | ||
| 3302 | /* True means that a filter or a sentinel is running. */ | ||
| 3303 | extern bool running_asynch_code; | ||
| 3295 | 3304 | ||
| 3296 | /* Defined in process.c. */ | 3305 | /* Defined in process.c. */ |
| 3297 | extern Lisp_Object QCtype, Qlocal; | 3306 | extern Lisp_Object QCtype, Qlocal; |
| @@ -3329,14 +3338,14 @@ extern void init_callproc (void); | |||
| 3329 | extern void set_initial_environment (void); | 3338 | extern void set_initial_environment (void); |
| 3330 | extern void syms_of_callproc (void); | 3339 | extern void syms_of_callproc (void); |
| 3331 | 3340 | ||
| 3332 | /* Defined in doc.c */ | 3341 | /* Defined in doc.c. */ |
| 3333 | extern Lisp_Object Qfunction_documentation; | 3342 | extern Lisp_Object Qfunction_documentation; |
| 3334 | extern Lisp_Object read_doc_string (Lisp_Object); | 3343 | extern Lisp_Object read_doc_string (Lisp_Object); |
| 3335 | extern Lisp_Object get_doc_string (Lisp_Object, bool, bool); | 3344 | extern Lisp_Object get_doc_string (Lisp_Object, bool, bool); |
| 3336 | extern void syms_of_doc (void); | 3345 | extern void syms_of_doc (void); |
| 3337 | extern int read_bytecode_char (bool); | 3346 | extern int read_bytecode_char (bool); |
| 3338 | 3347 | ||
| 3339 | /* Defined in bytecode.c */ | 3348 | /* Defined in bytecode.c. */ |
| 3340 | extern Lisp_Object Qbytecode; | 3349 | extern Lisp_Object Qbytecode; |
| 3341 | extern void syms_of_bytecode (void); | 3350 | extern void syms_of_bytecode (void); |
| 3342 | extern struct byte_stack *byte_stack_list; | 3351 | extern struct byte_stack *byte_stack_list; |
| @@ -3347,12 +3356,12 @@ extern void unmark_byte_stack (void); | |||
| 3347 | extern Lisp_Object exec_byte_code (Lisp_Object, Lisp_Object, Lisp_Object, | 3356 | extern Lisp_Object exec_byte_code (Lisp_Object, Lisp_Object, Lisp_Object, |
| 3348 | Lisp_Object, ptrdiff_t, Lisp_Object *); | 3357 | Lisp_Object, ptrdiff_t, Lisp_Object *); |
| 3349 | 3358 | ||
| 3350 | /* Defined in macros.c */ | 3359 | /* Defined in macros.c. */ |
| 3351 | extern Lisp_Object Qexecute_kbd_macro; | 3360 | extern Lisp_Object Qexecute_kbd_macro; |
| 3352 | extern void init_macros (void); | 3361 | extern void init_macros (void); |
| 3353 | extern void syms_of_macros (void); | 3362 | extern void syms_of_macros (void); |
| 3354 | 3363 | ||
| 3355 | /* Defined in undo.c */ | 3364 | /* Defined in undo.c. */ |
| 3356 | extern Lisp_Object Qapply; | 3365 | extern Lisp_Object Qapply; |
| 3357 | extern Lisp_Object Qinhibit_read_only; | 3366 | extern Lisp_Object Qinhibit_read_only; |
| 3358 | extern void truncate_undo_list (struct buffer *); | 3367 | extern void truncate_undo_list (struct buffer *); |
| @@ -3365,7 +3374,7 @@ extern void record_property_change (ptrdiff_t, ptrdiff_t, | |||
| 3365 | Lisp_Object, Lisp_Object, | 3374 | Lisp_Object, Lisp_Object, |
| 3366 | Lisp_Object); | 3375 | Lisp_Object); |
| 3367 | extern void syms_of_undo (void); | 3376 | extern void syms_of_undo (void); |
| 3368 | /* Defined in textprop.c */ | 3377 | /* Defined in textprop.c. */ |
| 3369 | extern Lisp_Object Qfont, Qmouse_face; | 3378 | extern Lisp_Object Qfont, Qmouse_face; |
| 3370 | extern Lisp_Object Qinsert_in_front_hooks, Qinsert_behind_hooks; | 3379 | extern Lisp_Object Qinsert_in_front_hooks, Qinsert_behind_hooks; |
| 3371 | extern Lisp_Object Qfront_sticky, Qrear_nonsticky; | 3380 | extern Lisp_Object Qfront_sticky, Qrear_nonsticky; |
| @@ -3373,19 +3382,19 @@ extern Lisp_Object Qminibuffer_prompt; | |||
| 3373 | 3382 | ||
| 3374 | extern void report_interval_modification (Lisp_Object, Lisp_Object); | 3383 | extern void report_interval_modification (Lisp_Object, Lisp_Object); |
| 3375 | 3384 | ||
| 3376 | /* Defined in menu.c */ | 3385 | /* Defined in menu.c. */ |
| 3377 | extern void syms_of_menu (void); | 3386 | extern void syms_of_menu (void); |
| 3378 | 3387 | ||
| 3379 | /* Defined in xmenu.c */ | 3388 | /* Defined in xmenu.c. */ |
| 3380 | extern void syms_of_xmenu (void); | 3389 | extern void syms_of_xmenu (void); |
| 3381 | 3390 | ||
| 3382 | /* Defined in termchar.h */ | 3391 | /* Defined in termchar.h. */ |
| 3383 | struct tty_display_info; | 3392 | struct tty_display_info; |
| 3384 | 3393 | ||
| 3385 | /* Defined in termhooks.h */ | 3394 | /* Defined in termhooks.h. */ |
| 3386 | struct terminal; | 3395 | struct terminal; |
| 3387 | 3396 | ||
| 3388 | /* Defined in sysdep.c */ | 3397 | /* Defined in sysdep.c. */ |
| 3389 | #ifndef HAVE_GET_CURRENT_DIR_NAME | 3398 | #ifndef HAVE_GET_CURRENT_DIR_NAME |
| 3390 | extern char *get_current_dir_name (void); | 3399 | extern char *get_current_dir_name (void); |
| 3391 | #endif | 3400 | #endif |
| @@ -3407,6 +3416,8 @@ extern int set_window_size (int, int, int); | |||
| 3407 | extern EMACS_INT get_random (void); | 3416 | extern EMACS_INT get_random (void); |
| 3408 | extern void seed_random (void *, ptrdiff_t); | 3417 | extern void seed_random (void *, ptrdiff_t); |
| 3409 | extern void init_random (void); | 3418 | extern void init_random (void); |
| 3419 | extern void emacs_backtrace (int); | ||
| 3420 | extern _Noreturn void emacs_abort (void) NO_INLINE; | ||
| 3410 | extern int emacs_open (const char *, int, int); | 3421 | extern int emacs_open (const char *, int, int); |
| 3411 | extern int emacs_close (int); | 3422 | extern int emacs_close (int); |
| 3412 | extern ptrdiff_t emacs_read (int, char *, ptrdiff_t); | 3423 | extern ptrdiff_t emacs_read (int, char *, ptrdiff_t); |
| @@ -3420,45 +3431,45 @@ extern void unlock_file (Lisp_Object); | |||
| 3420 | extern void unlock_buffer (struct buffer *); | 3431 | extern void unlock_buffer (struct buffer *); |
| 3421 | extern void syms_of_filelock (void); | 3432 | extern void syms_of_filelock (void); |
| 3422 | 3433 | ||
| 3423 | /* Defined in sound.c */ | 3434 | /* Defined in sound.c. */ |
| 3424 | extern void syms_of_sound (void); | 3435 | extern void syms_of_sound (void); |
| 3425 | 3436 | ||
| 3426 | /* Defined in category.c */ | 3437 | /* Defined in category.c. */ |
| 3427 | extern void init_category_once (void); | 3438 | extern void init_category_once (void); |
| 3428 | extern Lisp_Object char_category_set (int); | 3439 | extern Lisp_Object char_category_set (int); |
| 3429 | extern void syms_of_category (void); | 3440 | extern void syms_of_category (void); |
| 3430 | 3441 | ||
| 3431 | /* Defined in ccl.c */ | 3442 | /* Defined in ccl.c. */ |
| 3432 | extern void syms_of_ccl (void); | 3443 | extern void syms_of_ccl (void); |
| 3433 | 3444 | ||
| 3434 | /* Defined in dired.c */ | 3445 | /* Defined in dired.c. */ |
| 3435 | extern void syms_of_dired (void); | 3446 | extern void syms_of_dired (void); |
| 3436 | extern Lisp_Object directory_files_internal (Lisp_Object, Lisp_Object, | 3447 | extern Lisp_Object directory_files_internal (Lisp_Object, Lisp_Object, |
| 3437 | Lisp_Object, Lisp_Object, | 3448 | Lisp_Object, Lisp_Object, |
| 3438 | bool, Lisp_Object); | 3449 | bool, Lisp_Object); |
| 3439 | 3450 | ||
| 3440 | /* Defined in term.c */ | 3451 | /* Defined in term.c. */ |
| 3441 | extern int *char_ins_del_vector; | 3452 | extern int *char_ins_del_vector; |
| 3442 | extern void syms_of_term (void); | 3453 | extern void syms_of_term (void); |
| 3443 | extern _Noreturn void fatal (const char *msgid, ...) | 3454 | extern _Noreturn void fatal (const char *msgid, ...) |
| 3444 | ATTRIBUTE_FORMAT_PRINTF (1, 2); | 3455 | ATTRIBUTE_FORMAT_PRINTF (1, 2); |
| 3445 | 3456 | ||
| 3446 | /* Defined in terminal.c */ | 3457 | /* Defined in terminal.c. */ |
| 3447 | extern void syms_of_terminal (void); | 3458 | extern void syms_of_terminal (void); |
| 3448 | 3459 | ||
| 3449 | /* Defined in font.c */ | 3460 | /* Defined in font.c. */ |
| 3450 | extern void syms_of_font (void); | 3461 | extern void syms_of_font (void); |
| 3451 | extern void init_font (void); | 3462 | extern void init_font (void); |
| 3452 | 3463 | ||
| 3453 | #ifdef HAVE_WINDOW_SYSTEM | 3464 | #ifdef HAVE_WINDOW_SYSTEM |
| 3454 | /* Defined in fontset.c */ | 3465 | /* Defined in fontset.c. */ |
| 3455 | extern void syms_of_fontset (void); | 3466 | extern void syms_of_fontset (void); |
| 3456 | 3467 | ||
| 3457 | /* Defined in xfns.c, w32fns.c, or macfns.c */ | 3468 | /* Defined in xfns.c, w32fns.c, or macfns.c. */ |
| 3458 | extern Lisp_Object Qfont_param; | 3469 | extern Lisp_Object Qfont_param; |
| 3459 | #endif | 3470 | #endif |
| 3460 | 3471 | ||
| 3461 | /* Defined in xfaces.c */ | 3472 | /* Defined in xfaces.c. */ |
| 3462 | extern Lisp_Object Qdefault, Qtool_bar, Qfringe; | 3473 | extern Lisp_Object Qdefault, Qtool_bar, Qfringe; |
| 3463 | extern Lisp_Object Qheader_line, Qscroll_bar, Qcursor; | 3474 | extern Lisp_Object Qheader_line, Qscroll_bar, Qcursor; |
| 3464 | extern Lisp_Object Qmode_line_inactive; | 3475 | extern Lisp_Object Qmode_line_inactive; |
| @@ -3466,31 +3477,34 @@ extern Lisp_Object Qface; | |||
| 3466 | extern Lisp_Object Qnormal; | 3477 | extern Lisp_Object Qnormal; |
| 3467 | extern Lisp_Object QCfamily, QCweight, QCslant; | 3478 | extern Lisp_Object QCfamily, QCweight, QCslant; |
| 3468 | extern Lisp_Object QCheight, QCname, QCwidth, QCforeground, QCbackground; | 3479 | extern Lisp_Object QCheight, QCname, QCwidth, QCforeground, QCbackground; |
| 3480 | extern Lisp_Object Qextra_light, Qlight, Qsemi_light, Qsemi_bold; | ||
| 3481 | extern Lisp_Object Qbold, Qextra_bold, Qultra_bold; | ||
| 3482 | extern Lisp_Object Qoblique, Qitalic; | ||
| 3469 | extern Lisp_Object Vface_alternative_font_family_alist; | 3483 | extern Lisp_Object Vface_alternative_font_family_alist; |
| 3470 | extern Lisp_Object Vface_alternative_font_registry_alist; | 3484 | extern Lisp_Object Vface_alternative_font_registry_alist; |
| 3471 | extern void syms_of_xfaces (void); | 3485 | extern void syms_of_xfaces (void); |
| 3472 | 3486 | ||
| 3473 | #ifdef HAVE_X_WINDOWS | 3487 | #ifdef HAVE_X_WINDOWS |
| 3474 | /* Defined in xfns.c */ | 3488 | /* Defined in xfns.c. */ |
| 3475 | extern void syms_of_xfns (void); | 3489 | extern void syms_of_xfns (void); |
| 3476 | 3490 | ||
| 3477 | /* Defined in xsmfns.c */ | 3491 | /* Defined in xsmfns.c. */ |
| 3478 | extern void syms_of_xsmfns (void); | 3492 | extern void syms_of_xsmfns (void); |
| 3479 | 3493 | ||
| 3480 | /* Defined in xselect.c */ | 3494 | /* Defined in xselect.c. */ |
| 3481 | extern void syms_of_xselect (void); | 3495 | extern void syms_of_xselect (void); |
| 3482 | 3496 | ||
| 3483 | /* Defined in xterm.c */ | 3497 | /* Defined in xterm.c. */ |
| 3484 | extern void syms_of_xterm (void); | 3498 | extern void syms_of_xterm (void); |
| 3485 | #endif /* HAVE_X_WINDOWS */ | 3499 | #endif /* HAVE_X_WINDOWS */ |
| 3486 | 3500 | ||
| 3487 | #ifdef HAVE_WINDOW_SYSTEM | 3501 | #ifdef HAVE_WINDOW_SYSTEM |
| 3488 | /* Defined in xterm.c, nsterm.m, w32term.c */ | 3502 | /* Defined in xterm.c, nsterm.m, w32term.c. */ |
| 3489 | extern char *x_get_keysym_name (int); | 3503 | extern char *x_get_keysym_name (int); |
| 3490 | #endif /* HAVE_WINDOW_SYSTEM */ | 3504 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 3491 | 3505 | ||
| 3492 | #ifdef HAVE_LIBXML2 | 3506 | #ifdef HAVE_LIBXML2 |
| 3493 | /* Defined in xml.c */ | 3507 | /* Defined in xml.c. */ |
| 3494 | extern void syms_of_xml (void); | 3508 | extern void syms_of_xml (void); |
| 3495 | extern void xml_cleanup_parser (void); | 3509 | extern void xml_cleanup_parser (void); |
| 3496 | #endif | 3510 | #endif |
| @@ -3501,20 +3515,20 @@ extern int have_menus_p (void); | |||
| 3501 | #endif | 3515 | #endif |
| 3502 | 3516 | ||
| 3503 | #ifdef HAVE_DBUS | 3517 | #ifdef HAVE_DBUS |
| 3504 | /* Defined in dbusbind.c */ | 3518 | /* Defined in dbusbind.c. */ |
| 3505 | void syms_of_dbusbind (void); | 3519 | void syms_of_dbusbind (void); |
| 3506 | #endif | 3520 | #endif |
| 3507 | 3521 | ||
| 3508 | #ifdef DOS_NT | 3522 | #ifdef DOS_NT |
| 3509 | /* Defined in msdos.c, w32.c */ | 3523 | /* Defined in msdos.c, w32.c. */ |
| 3510 | extern char *emacs_root_dir (void); | 3524 | extern char *emacs_root_dir (void); |
| 3511 | #endif /* DOS_NT */ | 3525 | #endif /* DOS_NT */ |
| 3512 | 3526 | ||
| 3513 | /* Nonzero means Emacs has already been initialized. | 3527 | /* True means Emacs has already been initialized. |
| 3514 | Used during startup to detect startup of dumped Emacs. */ | 3528 | Used during startup to detect startup of dumped Emacs. */ |
| 3515 | extern int initialized; | 3529 | extern bool initialized; |
| 3516 | 3530 | ||
| 3517 | extern int immediate_quit; /* Nonzero means ^G can quit instantly */ | 3531 | extern int immediate_quit; /* Nonzero means ^G can quit instantly. */ |
| 3518 | 3532 | ||
| 3519 | extern void *xmalloc (size_t); | 3533 | extern void *xmalloc (size_t); |
| 3520 | extern void *xzalloc (size_t); | 3534 | extern void *xzalloc (size_t); |
| @@ -3544,36 +3558,10 @@ extern void init_system_name (void); | |||
| 3544 | #define make_fixnum_or_float(val) \ | 3558 | #define make_fixnum_or_float(val) \ |
| 3545 | (FIXNUM_OVERFLOW_P (val) ? make_float (val) : make_number (val)) | 3559 | (FIXNUM_OVERFLOW_P (val) ? make_float (val) : make_number (val)) |
| 3546 | 3560 | ||
| 3547 | |||
| 3548 | /* Checks the `cycle check' variable CHECK to see if it indicates that | ||
| 3549 | EL is part of a cycle; CHECK must be either Qnil or a value returned | ||
| 3550 | by an earlier use of CYCLE_CHECK. SUSPICIOUS is the number of | ||
| 3551 | elements after which a cycle might be suspected; after that many | ||
| 3552 | elements, this macro begins consing in order to keep more precise | ||
| 3553 | track of elements. | ||
| 3554 | |||
| 3555 | Returns nil if a cycle was detected, otherwise a new value for CHECK | ||
| 3556 | that includes EL. | ||
| 3557 | |||
| 3558 | CHECK is evaluated multiple times, EL and SUSPICIOUS 0 or 1 times, so | ||
| 3559 | the caller should make sure that's ok. */ | ||
| 3560 | |||
| 3561 | #define CYCLE_CHECK(check, el, suspicious) \ | ||
| 3562 | (NILP (check) \ | ||
| 3563 | ? make_number (0) \ | ||
| 3564 | : (INTEGERP (check) \ | ||
| 3565 | ? (XFASTINT (check) < (suspicious) \ | ||
| 3566 | ? make_number (XFASTINT (check) + 1) \ | ||
| 3567 | : Fcons (el, Qnil)) \ | ||
| 3568 | : (!NILP (Fmemq ((el), (check))) \ | ||
| 3569 | ? Qnil \ | ||
| 3570 | : Fcons ((el), (check))))) | ||
| 3571 | |||
| 3572 | |||
| 3573 | /* SAFE_ALLOCA normally allocates memory on the stack, but if size is | 3561 | /* SAFE_ALLOCA normally allocates memory on the stack, but if size is |
| 3574 | larger than MAX_ALLOCA, use xmalloc to avoid overflowing the stack. */ | 3562 | larger than MAX_ALLOCA, use xmalloc to avoid overflowing the stack. */ |
| 3575 | 3563 | ||
| 3576 | enum MAX_ALLOCA { MAX_ALLOCA = 16*1024 }; | 3564 | enum MAX_ALLOCA { MAX_ALLOCA = 16 * 1024 }; |
| 3577 | 3565 | ||
| 3578 | extern Lisp_Object safe_alloca_unwind (Lisp_Object); | 3566 | extern Lisp_Object safe_alloca_unwind (Lisp_Object); |
| 3579 | extern void *record_xmalloc (size_t); | 3567 | extern void *record_xmalloc (size_t); |