diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 24 | ||||
| -rw-r--r-- | src/alloc.c | 15 | ||||
| -rw-r--r-- | src/bidi.c | 6 | ||||
| -rw-r--r-- | src/buffer.c | 12 | ||||
| -rw-r--r-- | src/data.c | 3 | ||||
| -rw-r--r-- | src/lisp.h | 156 | ||||
| -rw-r--r-- | src/nsfns.m | 3 | ||||
| -rw-r--r-- | src/nsmenu.m | 3 | ||||
| -rw-r--r-- | src/nsselect.m | 8 |
9 files changed, 128 insertions, 102 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 359dca97f48..5bab023fd86 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,27 @@ | |||
| 1 | 2014-12-19 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Minor cleanups for Lisp objects and symbols | ||
| 4 | * alloc.c (next_vector, set_next_vector): | ||
| 5 | * lisp.h (lisp_h_INTEGERP, make_number, XFASTINT, make_natnum): | ||
| 6 | (lisp_h_make_number) [USE_LSB_TAG]: | ||
| 7 | Use Lisp_Int0 instead of the mystery constant 0. | ||
| 8 | * alloc.c (mark_object): Always set and use po; that's simpler. | ||
| 9 | (CHECK_LIVE, CHECK_ALLOCATED_AND_LIVE): | ||
| 10 | Properly parenthesize definientia. | ||
| 11 | * bidi.c (bidi_initialize): | ||
| 12 | * buffer.c (init_buffer_once): | ||
| 13 | * nsfns.m (syms_of_nsfns): | ||
| 14 | * nsmenu.m (syms_of_nsmenu): | ||
| 15 | * nsselect.m (syms_of_nsselect): | ||
| 16 | Prefer DEFSYM to defining by hand. | ||
| 17 | * data.c: Fix too-long line. | ||
| 18 | * lisp.h (DECLARE_GDB_SYM): New macro. | ||
| 19 | (DEFINE_GDB_SYMBOL_BEGIN): Use it. | ||
| 20 | (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END) [!MAIN_PROGRAM]: | ||
| 21 | Declare the symbol, so it's visible to everywhere lisp.h is included. | ||
| 22 | Move forward decls as far forward as they can go, | ||
| 23 | to allow future changes to use them. | ||
| 24 | |||
| 1 | 2014-12-18 Paul Eggert <eggert@cs.ucla.edu> | 25 | 2014-12-18 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 26 | ||
| 3 | * gnutls.c: Include gnutls.h. | 27 | * gnutls.c: Include gnutls.h. |
diff --git a/src/alloc.c b/src/alloc.c index 43287457c8d..eada96c0c10 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -2719,13 +2719,13 @@ DEFUN ("make-list", Fmake_list, Smake_list, 2, 2, 0, | |||
| 2719 | static struct Lisp_Vector * | 2719 | static struct Lisp_Vector * |
| 2720 | next_vector (struct Lisp_Vector *v) | 2720 | next_vector (struct Lisp_Vector *v) |
| 2721 | { | 2721 | { |
| 2722 | return XUNTAG (v->contents[0], 0); | 2722 | return XUNTAG (v->contents[0], Lisp_Int0); |
| 2723 | } | 2723 | } |
| 2724 | 2724 | ||
| 2725 | static void | 2725 | static void |
| 2726 | set_next_vector (struct Lisp_Vector *v, struct Lisp_Vector *p) | 2726 | set_next_vector (struct Lisp_Vector *v, struct Lisp_Vector *p) |
| 2727 | { | 2727 | { |
| 2728 | v->contents[0] = make_lisp_ptr (p, 0); | 2728 | v->contents[0] = make_lisp_ptr (p, Lisp_Int0); |
| 2729 | } | 2729 | } |
| 2730 | 2730 | ||
| 2731 | /* This value is balanced well enough to avoid too much internal overhead | 2731 | /* This value is balanced well enough to avoid too much internal overhead |
| @@ -6155,15 +6155,16 @@ void | |||
| 6155 | mark_object (Lisp_Object arg) | 6155 | mark_object (Lisp_Object arg) |
| 6156 | { | 6156 | { |
| 6157 | register Lisp_Object obj = arg; | 6157 | register Lisp_Object obj = arg; |
| 6158 | #ifdef GC_CHECK_MARKED_OBJECTS | ||
| 6159 | void *po; | 6158 | void *po; |
| 6159 | #ifdef GC_CHECK_MARKED_OBJECTS | ||
| 6160 | struct mem_node *m; | 6160 | struct mem_node *m; |
| 6161 | #endif | 6161 | #endif |
| 6162 | ptrdiff_t cdr_count = 0; | 6162 | ptrdiff_t cdr_count = 0; |
| 6163 | 6163 | ||
| 6164 | loop: | 6164 | loop: |
| 6165 | 6165 | ||
| 6166 | if (PURE_POINTER_P (XPNTR (obj))) | 6166 | po = XPNTR (obj); |
| 6167 | if (PURE_POINTER_P (po)) | ||
| 6167 | return; | 6168 | return; |
| 6168 | 6169 | ||
| 6169 | last_marked[last_marked_index++] = obj; | 6170 | last_marked[last_marked_index++] = obj; |
| @@ -6175,8 +6176,6 @@ mark_object (Lisp_Object arg) | |||
| 6175 | by ~80%, and requires compilation with GC_MARK_STACK != 0. */ | 6176 | by ~80%, and requires compilation with GC_MARK_STACK != 0. */ |
| 6176 | #ifdef GC_CHECK_MARKED_OBJECTS | 6177 | #ifdef GC_CHECK_MARKED_OBJECTS |
| 6177 | 6178 | ||
| 6178 | po = (void *) XPNTR (obj); | ||
| 6179 | |||
| 6180 | /* Check that the object pointed to by PO is known to be a Lisp | 6179 | /* Check that the object pointed to by PO is known to be a Lisp |
| 6181 | structure allocated from the heap. */ | 6180 | structure allocated from the heap. */ |
| 6182 | #define CHECK_ALLOCATED() \ | 6181 | #define CHECK_ALLOCATED() \ |
| @@ -6203,8 +6202,8 @@ mark_object (Lisp_Object arg) | |||
| 6203 | 6202 | ||
| 6204 | #else /* not GC_CHECK_MARKED_OBJECTS */ | 6203 | #else /* not GC_CHECK_MARKED_OBJECTS */ |
| 6205 | 6204 | ||
| 6206 | #define CHECK_LIVE(LIVEP) (void) 0 | 6205 | #define CHECK_LIVE(LIVEP) ((void) 0) |
| 6207 | #define CHECK_ALLOCATED_AND_LIVE(LIVEP) (void) 0 | 6206 | #define CHECK_ALLOCATED_AND_LIVE(LIVEP) ((void) 0) |
| 6208 | 6207 | ||
| 6209 | #endif /* not GC_CHECK_MARKED_OBJECTS */ | 6208 | #endif /* not GC_CHECK_MARKED_OBJECTS */ |
| 6210 | 6209 | ||
diff --git a/src/bidi.c b/src/bidi.c index 0d291fcb033..45385452755 100644 --- a/src/bidi.c +++ b/src/bidi.c | |||
| @@ -1108,14 +1108,12 @@ bidi_initialize (void) | |||
| 1108 | emacs_abort (); | 1108 | emacs_abort (); |
| 1109 | staticpro (&bidi_brackets_table); | 1109 | staticpro (&bidi_brackets_table); |
| 1110 | 1110 | ||
| 1111 | Qparagraph_start = intern ("paragraph-start"); | 1111 | DEFSYM (Qparagraph_start, "paragraph-start"); |
| 1112 | staticpro (&Qparagraph_start); | ||
| 1113 | paragraph_start_re = Fsymbol_value (Qparagraph_start); | 1112 | paragraph_start_re = Fsymbol_value (Qparagraph_start); |
| 1114 | if (!STRINGP (paragraph_start_re)) | 1113 | if (!STRINGP (paragraph_start_re)) |
| 1115 | paragraph_start_re = build_string ("\f\\|[ \t]*$"); | 1114 | paragraph_start_re = build_string ("\f\\|[ \t]*$"); |
| 1116 | staticpro (¶graph_start_re); | 1115 | staticpro (¶graph_start_re); |
| 1117 | Qparagraph_separate = intern ("paragraph-separate"); | 1116 | DEFSYM (Qparagraph_separate, "paragraph-separate"); |
| 1118 | staticpro (&Qparagraph_separate); | ||
| 1119 | paragraph_separate_re = Fsymbol_value (Qparagraph_separate); | 1117 | paragraph_separate_re = Fsymbol_value (Qparagraph_separate); |
| 1120 | if (!STRINGP (paragraph_separate_re)) | 1118 | if (!STRINGP (paragraph_separate_re)) |
| 1121 | paragraph_separate_re = build_string ("[ \t\f]*$"); | 1119 | paragraph_separate_re = build_string ("[ \t\f]*$"); |
diff --git a/src/buffer.c b/src/buffer.c index 9bdbfb830fd..ba3245fa5ad 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -5224,16 +5224,14 @@ init_buffer_once (void) | |||
| 5224 | 5224 | ||
| 5225 | QSFundamental = build_pure_c_string ("Fundamental"); | 5225 | QSFundamental = build_pure_c_string ("Fundamental"); |
| 5226 | 5226 | ||
| 5227 | Qfundamental_mode = intern_c_string ("fundamental-mode"); | 5227 | DEFSYM (Qfundamental_mode, "fundamental-mode"); |
| 5228 | bset_major_mode (&buffer_defaults, Qfundamental_mode); | 5228 | bset_major_mode (&buffer_defaults, Qfundamental_mode); |
| 5229 | 5229 | ||
| 5230 | Qmode_class = intern_c_string ("mode-class"); | 5230 | DEFSYM (Qmode_class, "mode-class"); |
| 5231 | DEFSYM (Qprotected_field, "protected-field"); | ||
| 5231 | 5232 | ||
| 5232 | Qprotected_field = intern_c_string ("protected-field"); | 5233 | DEFSYM (Qpermanent_local, "permanent-local"); |
| 5233 | 5234 | DEFSYM (Qkill_buffer_hook, "kill-buffer-hook"); | |
| 5234 | Qpermanent_local = intern_c_string ("permanent-local"); | ||
| 5235 | |||
| 5236 | Qkill_buffer_hook = intern_c_string ("kill-buffer-hook"); | ||
| 5237 | Fput (Qkill_buffer_hook, Qpermanent_local, Qt); | 5235 | Fput (Qkill_buffer_hook, Qpermanent_local, Qt); |
| 5238 | 5236 | ||
| 5239 | /* super-magic invisible buffer */ | 5237 | /* super-magic invisible buffer */ |
diff --git a/src/data.c b/src/data.c index b48dbbebabc..7151d220b05 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -89,7 +89,8 @@ static Lisp_Object Qdefun; | |||
| 89 | Lisp_Object Qinteractive_form; | 89 | Lisp_Object Qinteractive_form; |
| 90 | static Lisp_Object Qdefalias_fset_function; | 90 | static Lisp_Object Qdefalias_fset_function; |
| 91 | 91 | ||
| 92 | static void swap_in_symval_forwarding (struct Lisp_Symbol *, struct Lisp_Buffer_Local_Value *); | 92 | static void swap_in_symval_forwarding (struct Lisp_Symbol *, |
| 93 | struct Lisp_Buffer_Local_Value *); | ||
| 93 | 94 | ||
| 94 | static bool | 95 | static bool |
| 95 | BOOLFWDP (union Lisp_Fwd *a) | 96 | BOOLFWDP (union Lisp_Fwd *a) |
diff --git a/src/lisp.h b/src/lisp.h index 37172c6b049..3a6d247f6d5 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -44,12 +44,13 @@ INLINE_HEADER_BEGIN | |||
| 44 | definitions or enums visible to the debugger. It's used for symbols | 44 | definitions or enums visible to the debugger. It's used for symbols |
| 45 | that .gdbinit needs. */ | 45 | that .gdbinit needs. */ |
| 46 | 46 | ||
| 47 | #define DECLARE_GDB_SYM(type, id) type const id EXTERNALLY_VISIBLE | ||
| 47 | #ifdef MAIN_PROGRAM | 48 | #ifdef MAIN_PROGRAM |
| 48 | # define DEFINE_GDB_SYMBOL_BEGIN(type, id) type const id EXTERNALLY_VISIBLE | 49 | # define DEFINE_GDB_SYMBOL_BEGIN(type, id) DECLARE_GDB_SYM (type, id) |
| 49 | # define DEFINE_GDB_SYMBOL_END(id) = id; | 50 | # define DEFINE_GDB_SYMBOL_END(id) = id; |
| 50 | #else | 51 | #else |
| 51 | # define DEFINE_GDB_SYMBOL_BEGIN(type, id) | 52 | # define DEFINE_GDB_SYMBOL_BEGIN(type, id) extern DECLARE_GDB_SYM (type, id) |
| 52 | # define DEFINE_GDB_SYMBOL_END(val) | 53 | # define DEFINE_GDB_SYMBOL_END(val) ; |
| 53 | #endif | 54 | #endif |
| 54 | 55 | ||
| 55 | /* The ubiquitous max and min macros. */ | 56 | /* The ubiquitous max and min macros. */ |
| @@ -337,7 +338,7 @@ error !; | |||
| 337 | #define lisp_h_CONSP(x) (XTYPE (x) == Lisp_Cons) | 338 | #define lisp_h_CONSP(x) (XTYPE (x) == Lisp_Cons) |
| 338 | #define lisp_h_EQ(x, y) (XLI (x) == XLI (y)) | 339 | #define lisp_h_EQ(x, y) (XLI (x) == XLI (y)) |
| 339 | #define lisp_h_FLOATP(x) (XTYPE (x) == Lisp_Float) | 340 | #define lisp_h_FLOATP(x) (XTYPE (x) == Lisp_Float) |
| 340 | #define lisp_h_INTEGERP(x) ((XTYPE (x) & ~Lisp_Int1) == 0) | 341 | #define lisp_h_INTEGERP(x) ((XTYPE (x) & (Lisp_Int0 | ~Lisp_Int1)) == Lisp_Int0) |
| 341 | #define lisp_h_MARKERP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Marker) | 342 | #define lisp_h_MARKERP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Marker) |
| 342 | #define lisp_h_MISCP(x) (XTYPE (x) == Lisp_Misc) | 343 | #define lisp_h_MISCP(x) (XTYPE (x) == Lisp_Misc) |
| 343 | #define lisp_h_NILP(x) EQ (x, Qnil) | 344 | #define lisp_h_NILP(x) EQ (x, Qnil) |
| @@ -361,7 +362,7 @@ error !; | |||
| 361 | #endif | 362 | #endif |
| 362 | #if USE_LSB_TAG | 363 | #if USE_LSB_TAG |
| 363 | # define lisp_h_make_number(n) \ | 364 | # define lisp_h_make_number(n) \ |
| 364 | XIL ((EMACS_INT) ((EMACS_UINT) (n) << INTTYPEBITS)) | 365 | XIL ((EMACS_INT) (((EMACS_UINT) (n) << INTTYPEBITS) + Lisp_Int0)) |
| 365 | # define lisp_h_XFASTINT(a) XINT (a) | 366 | # define lisp_h_XFASTINT(a) XINT (a) |
| 366 | # define lisp_h_XINT(a) (XLI (a) >> INTTYPEBITS) | 367 | # define lisp_h_XINT(a) (XLI (a) >> INTTYPEBITS) |
| 367 | # define lisp_h_XTYPE(a) ((enum Lisp_Type) (XLI (a) & ~VALMASK)) | 368 | # define lisp_h_XTYPE(a) ((enum Lisp_Type) (XLI (a) & ~VALMASK)) |
| @@ -573,7 +574,73 @@ typedef EMACS_INT Lisp_Object; | |||
| 573 | #define LISP_INITIALLY_ZERO 0 | 574 | #define LISP_INITIALLY_ZERO 0 |
| 574 | enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = false }; | 575 | enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = false }; |
| 575 | #endif /* CHECK_LISP_OBJECT_TYPE */ | 576 | #endif /* CHECK_LISP_OBJECT_TYPE */ |
| 577 | |||
| 578 | /* Forward declarations. */ | ||
| 579 | |||
| 580 | /* Defined in this file. */ | ||
| 581 | union Lisp_Fwd; | ||
| 582 | INLINE bool BOOL_VECTOR_P (Lisp_Object); | ||
| 583 | INLINE bool BUFFER_OBJFWDP (union Lisp_Fwd *); | ||
| 584 | INLINE bool BUFFERP (Lisp_Object); | ||
| 585 | INLINE bool CHAR_TABLE_P (Lisp_Object); | ||
| 586 | INLINE Lisp_Object CHAR_TABLE_REF_ASCII (Lisp_Object, ptrdiff_t); | ||
| 587 | INLINE bool (CONSP) (Lisp_Object); | ||
| 588 | INLINE bool (FLOATP) (Lisp_Object); | ||
| 589 | INLINE bool functionp (Lisp_Object); | ||
| 590 | INLINE bool (INTEGERP) (Lisp_Object); | ||
| 591 | INLINE bool (MARKERP) (Lisp_Object); | ||
| 592 | INLINE bool (MISCP) (Lisp_Object); | ||
| 593 | INLINE bool (NILP) (Lisp_Object); | ||
| 594 | INLINE bool OVERLAYP (Lisp_Object); | ||
| 595 | INLINE bool PROCESSP (Lisp_Object); | ||
| 596 | INLINE bool PSEUDOVECTORP (Lisp_Object, int); | ||
| 597 | INLINE bool SAVE_VALUEP (Lisp_Object); | ||
| 598 | INLINE void set_sub_char_table_contents (Lisp_Object, ptrdiff_t, | ||
| 599 | Lisp_Object); | ||
| 600 | INLINE bool STRINGP (Lisp_Object); | ||
| 601 | INLINE bool SUB_CHAR_TABLE_P (Lisp_Object); | ||
| 602 | INLINE bool SUBRP (Lisp_Object); | ||
| 603 | INLINE bool (SYMBOLP) (Lisp_Object); | ||
| 604 | INLINE bool (VECTORLIKEP) (Lisp_Object); | ||
| 605 | INLINE bool WINDOWP (Lisp_Object); | ||
| 606 | INLINE struct Lisp_Save_Value *XSAVE_VALUE (Lisp_Object); | ||
| 607 | |||
| 608 | /* Defined in chartab.c. */ | ||
| 609 | extern Lisp_Object char_table_ref (Lisp_Object, int); | ||
| 610 | extern void char_table_set (Lisp_Object, int, Lisp_Object); | ||
| 576 | 611 | ||
| 612 | /* 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); | ||
| 620 | extern _Noreturn void wrong_choice (Lisp_Object, Lisp_Object); | ||
| 621 | |||
| 622 | /* Defined in emacs.c. */ | ||
| 623 | extern bool might_dump; | ||
| 624 | /* True means Emacs has already been initialized. | ||
| 625 | Used during startup to detect startup of dumped Emacs. */ | ||
| 626 | extern bool initialized; | ||
| 627 | |||
| 628 | /* Defined in eval.c. */ | ||
| 629 | extern Lisp_Object Qautoload; | ||
| 630 | |||
| 631 | /* Defined in floatfns.c. */ | ||
| 632 | extern double extract_float (Lisp_Object); | ||
| 633 | |||
| 634 | /* Defined in process.c. */ | ||
| 635 | extern Lisp_Object Qprocessp; | ||
| 636 | |||
| 637 | /* Defined in window.c. */ | ||
| 638 | extern Lisp_Object Qwindowp; | ||
| 639 | |||
| 640 | /* Defined in xdisp.c. */ | ||
| 641 | extern Lisp_Object Qimage; | ||
| 642 | extern Lisp_Object Qfontification_functions; | ||
| 643 | |||
| 577 | /* Convert a Lisp_Object to the corresponding EMACS_INT and vice versa. | 644 | /* Convert a Lisp_Object to the corresponding EMACS_INT and vice versa. |
| 578 | At the machine level, these operations are no-ops. */ | 645 | At the machine level, these operations are no-ops. */ |
| 579 | LISP_MACRO_DEFUN (XLI, EMACS_INT, (Lisp_Object o), (o)) | 646 | LISP_MACRO_DEFUN (XLI, EMACS_INT, (Lisp_Object o), (o)) |
| @@ -673,13 +740,18 @@ LISP_MACRO_DEFUN (XUNTAG, void *, (Lisp_Object a, int type), (a, type)) | |||
| 673 | INLINE Lisp_Object | 740 | INLINE Lisp_Object |
| 674 | make_number (EMACS_INT n) | 741 | make_number (EMACS_INT n) |
| 675 | { | 742 | { |
| 743 | EMACS_INT int0 = Lisp_Int0; | ||
| 676 | if (USE_LSB_TAG) | 744 | if (USE_LSB_TAG) |
| 677 | { | 745 | { |
| 678 | EMACS_UINT u = n; | 746 | EMACS_UINT u = n; |
| 679 | n = u << INTTYPEBITS; | 747 | n = u << INTTYPEBITS; |
| 748 | n += int0; | ||
| 680 | } | 749 | } |
| 681 | else | 750 | else |
| 682 | n &= INTMASK; | 751 | { |
| 752 | n &= INTMASK; | ||
| 753 | n += (int0 << VALBITS); | ||
| 754 | } | ||
| 683 | return XIL (n); | 755 | return XIL (n); |
| 684 | } | 756 | } |
| 685 | 757 | ||
| @@ -702,7 +774,8 @@ XINT (Lisp_Object a) | |||
| 702 | INLINE EMACS_INT | 774 | INLINE EMACS_INT |
| 703 | XFASTINT (Lisp_Object a) | 775 | XFASTINT (Lisp_Object a) |
| 704 | { | 776 | { |
| 705 | EMACS_INT n = USE_LSB_TAG ? XINT (a) : XLI (a); | 777 | EMACS_INT int0 = Lisp_Int0; |
| 778 | EMACS_INT n = USE_LSB_TAG ? XINT (a) : XLI (a) - (int0 << VALBITS); | ||
| 706 | eassert (0 <= n); | 779 | eassert (0 <= n); |
| 707 | return n; | 780 | return n; |
| 708 | } | 781 | } |
| @@ -747,7 +820,8 @@ INLINE Lisp_Object | |||
| 747 | make_natnum (EMACS_INT n) | 820 | make_natnum (EMACS_INT n) |
| 748 | { | 821 | { |
| 749 | eassert (0 <= n && n <= MOST_POSITIVE_FIXNUM); | 822 | eassert (0 <= n && n <= MOST_POSITIVE_FIXNUM); |
| 750 | return USE_LSB_TAG ? make_number (n) : XIL (n); | 823 | EMACS_INT int0 = Lisp_Int0; |
| 824 | return USE_LSB_TAG ? make_number (n) : XIL (n + (int0 << VALBITS)); | ||
| 751 | } | 825 | } |
| 752 | 826 | ||
| 753 | /* Return true if X and Y are the same object. */ | 827 | /* Return true if X and Y are the same object. */ |
| @@ -766,72 +840,6 @@ clip_to_bounds (ptrdiff_t lower, EMACS_INT num, ptrdiff_t upper) | |||
| 766 | return num < lower ? lower : num <= upper ? num : upper; | 840 | return num < lower ? lower : num <= upper ? num : upper; |
| 767 | } | 841 | } |
| 768 | 842 | ||
| 769 | /* Forward declarations. */ | ||
| 770 | |||
| 771 | /* Defined in this file. */ | ||
| 772 | union Lisp_Fwd; | ||
| 773 | INLINE bool BOOL_VECTOR_P (Lisp_Object); | ||
| 774 | INLINE bool BUFFER_OBJFWDP (union Lisp_Fwd *); | ||
| 775 | INLINE bool BUFFERP (Lisp_Object); | ||
| 776 | INLINE bool CHAR_TABLE_P (Lisp_Object); | ||
| 777 | INLINE Lisp_Object CHAR_TABLE_REF_ASCII (Lisp_Object, ptrdiff_t); | ||
| 778 | INLINE bool (CONSP) (Lisp_Object); | ||
| 779 | INLINE bool (FLOATP) (Lisp_Object); | ||
| 780 | INLINE bool functionp (Lisp_Object); | ||
| 781 | INLINE bool (INTEGERP) (Lisp_Object); | ||
| 782 | INLINE bool (MARKERP) (Lisp_Object); | ||
| 783 | INLINE bool (MISCP) (Lisp_Object); | ||
| 784 | INLINE bool (NILP) (Lisp_Object); | ||
| 785 | INLINE bool OVERLAYP (Lisp_Object); | ||
| 786 | INLINE bool PROCESSP (Lisp_Object); | ||
| 787 | INLINE bool PSEUDOVECTORP (Lisp_Object, int); | ||
| 788 | INLINE bool SAVE_VALUEP (Lisp_Object); | ||
| 789 | INLINE void set_sub_char_table_contents (Lisp_Object, ptrdiff_t, | ||
| 790 | Lisp_Object); | ||
| 791 | INLINE bool STRINGP (Lisp_Object); | ||
| 792 | INLINE bool SUB_CHAR_TABLE_P (Lisp_Object); | ||
| 793 | INLINE bool SUBRP (Lisp_Object); | ||
| 794 | INLINE bool (SYMBOLP) (Lisp_Object); | ||
| 795 | INLINE bool (VECTORLIKEP) (Lisp_Object); | ||
| 796 | INLINE bool WINDOWP (Lisp_Object); | ||
| 797 | INLINE struct Lisp_Save_Value *XSAVE_VALUE (Lisp_Object); | ||
| 798 | |||
| 799 | /* Defined in chartab.c. */ | ||
| 800 | extern Lisp_Object char_table_ref (Lisp_Object, int); | ||
| 801 | extern void char_table_set (Lisp_Object, int, Lisp_Object); | ||
| 802 | |||
| 803 | /* Defined in data.c. */ | ||
| 804 | extern Lisp_Object Qarrayp, Qbufferp, Qbuffer_or_string_p, Qchar_table_p; | ||
| 805 | extern Lisp_Object Qconsp, Qfloatp, Qintegerp, Qlambda, Qlistp, Qmarkerp, Qnil; | ||
| 806 | extern Lisp_Object Qnumberp, Qstringp, Qsymbolp, Qt, Qvectorp; | ||
| 807 | extern Lisp_Object Qbool_vector_p; | ||
| 808 | extern Lisp_Object Qvector_or_char_table_p, Qwholenump; | ||
| 809 | extern Lisp_Object Qwindow; | ||
| 810 | extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object); | ||
| 811 | extern _Noreturn void wrong_choice (Lisp_Object, Lisp_Object); | ||
| 812 | |||
| 813 | /* Defined in emacs.c. */ | ||
| 814 | extern bool might_dump; | ||
| 815 | /* True means Emacs has already been initialized. | ||
| 816 | Used during startup to detect startup of dumped Emacs. */ | ||
| 817 | extern bool initialized; | ||
| 818 | |||
| 819 | /* Defined in eval.c. */ | ||
| 820 | extern Lisp_Object Qautoload; | ||
| 821 | |||
| 822 | /* Defined in floatfns.c. */ | ||
| 823 | extern double extract_float (Lisp_Object); | ||
| 824 | |||
| 825 | /* Defined in process.c. */ | ||
| 826 | extern Lisp_Object Qprocessp; | ||
| 827 | |||
| 828 | /* Defined in window.c. */ | ||
| 829 | extern Lisp_Object Qwindowp; | ||
| 830 | |||
| 831 | /* Defined in xdisp.c. */ | ||
| 832 | extern Lisp_Object Qimage; | ||
| 833 | extern Lisp_Object Qfontification_functions; | ||
| 834 | |||
| 835 | 843 | ||
| 836 | /* Extract a value or address from a Lisp_Object. */ | 844 | /* Extract a value or address from a Lisp_Object. */ |
| 837 | 845 | ||
diff --git a/src/nsfns.m b/src/nsfns.m index a5ff6346d74..578ec12588c 100644 --- a/src/nsfns.m +++ b/src/nsfns.m | |||
| @@ -2971,8 +2971,7 @@ handlePanelKeys (NSSavePanel *panel, NSEvent *theEvent) | |||
| 2971 | void | 2971 | void |
| 2972 | syms_of_nsfns (void) | 2972 | syms_of_nsfns (void) |
| 2973 | { | 2973 | { |
| 2974 | Qfontsize = intern_c_string ("fontsize"); | 2974 | DEFSYM (Qfontsize, "fontsize"); |
| 2975 | staticpro (&Qfontsize); | ||
| 2976 | 2975 | ||
| 2977 | DEFVAR_LISP ("ns-icon-type-alist", Vns_icon_type_alist, | 2976 | DEFVAR_LISP ("ns-icon-type-alist", Vns_icon_type_alist, |
| 2978 | doc: /* Alist of elements (REGEXP . IMAGE) for images of icons associated to frames. | 2977 | doc: /* Alist of elements (REGEXP . IMAGE) for images of icons associated to frames. |
diff --git a/src/nsmenu.m b/src/nsmenu.m index 0e8b68b38f1..ffd1e4db78a 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m | |||
| @@ -1876,6 +1876,5 @@ syms_of_nsmenu (void) | |||
| 1876 | defsubr (&Sns_reset_menu); | 1876 | defsubr (&Sns_reset_menu); |
| 1877 | defsubr (&Smenu_or_popup_active_p); | 1877 | defsubr (&Smenu_or_popup_active_p); |
| 1878 | 1878 | ||
| 1879 | Qdebug_on_next_call = intern_c_string ("debug-on-next-call"); | 1879 | DEFSYM (Qdebug_on_next_call, "debug-on-next-call"); |
| 1880 | staticpro (&Qdebug_on_next_call); | ||
| 1881 | } | 1880 | } |
diff --git a/src/nsselect.m b/src/nsselect.m index bcf2ac1fe63..3b33a97ca73 100644 --- a/src/nsselect.m +++ b/src/nsselect.m | |||
| @@ -504,10 +504,10 @@ nxatoms_of_nsselect (void) | |||
| 504 | void | 504 | void |
| 505 | syms_of_nsselect (void) | 505 | syms_of_nsselect (void) |
| 506 | { | 506 | { |
| 507 | QCLIPBOARD = intern_c_string ("CLIPBOARD"); staticpro (&QCLIPBOARD); | 507 | DEFSYM (QCLIPBOARD, "CLIPBOARD"); |
| 508 | QSECONDARY = intern_c_string ("SECONDARY"); staticpro (&QSECONDARY); | 508 | DEFSYM (QSECONDARY, "SECONDARY"); |
| 509 | QTEXT = intern_c_string ("TEXT"); staticpro (&QTEXT); | 509 | DEFSYM (QTEXT, "TEXT"); |
| 510 | QFILE_NAME = intern_c_string ("FILE_NAME"); staticpro (&QFILE_NAME); | 510 | DEFSYM (QFILE_NAME, "FILE_NAME"); |
| 511 | 511 | ||
| 512 | defsubr (&Sns_disown_selection_internal); | 512 | defsubr (&Sns_disown_selection_internal); |
| 513 | defsubr (&Sns_get_selection); | 513 | defsubr (&Sns_get_selection); |