aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2014-12-18 18:12:01 -0800
committerPaul Eggert2014-12-18 18:12:24 -0800
commitad013ba63134d4fe6470665abf2f9e33a595848a (patch)
tree595bcf2e2228e833fac882aeb60a8793b057f024 /src
parent83299b940dd211f4e142d754b93ea592e9f67974 (diff)
downloademacs-ad013ba63134d4fe6470665abf2f9e33a595848a.tar.gz
emacs-ad013ba63134d4fe6470665abf2f9e33a595848a.zip
Minor cleanups for Lisp objects and symbols
* alloc.c (next_vector, set_next_vector): * lisp.h (lisp_h_INTEGERP, make_number, XFASTINT, make_natnum): (lisp_h_make_number) [USE_LSB_TAG]: Use Lisp_Int0 instead of the mystery constant 0. * alloc.c (mark_object): Always set and use po; that's simpler. (CHECK_LIVE, CHECK_ALLOCATED_AND_LIVE): Properly parenthesize definientia. * bidi.c (bidi_initialize): * buffer.c (init_buffer_once): * nsfns.m (syms_of_nsfns): * nsmenu.m (syms_of_nsmenu): * nsselect.m (syms_of_nsselect): Prefer DEFSYM to defining by hand. * data.c: Fix too-long line. * lisp.h (DECLARE_GDB_SYM): New macro. (DEFINE_GDB_SYMBOL_BEGIN): Use it. (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END) [!MAIN_PROGRAM]: Declare the symbol, so it's visible to everywhere lisp.h is included. Move forward decls as far forward as they can go, to allow future changes to use them.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog24
-rw-r--r--src/alloc.c15
-rw-r--r--src/bidi.c6
-rw-r--r--src/buffer.c12
-rw-r--r--src/data.c3
-rw-r--r--src/lisp.h156
-rw-r--r--src/nsfns.m3
-rw-r--r--src/nsmenu.m3
-rw-r--r--src/nsselect.m8
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 @@
12014-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
12014-12-18 Paul Eggert <eggert@cs.ucla.edu> 252014-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,
2719static struct Lisp_Vector * 2719static struct Lisp_Vector *
2720next_vector (struct Lisp_Vector *v) 2720next_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
2725static void 2725static void
2726set_next_vector (struct Lisp_Vector *v, struct Lisp_Vector *p) 2726set_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
6155mark_object (Lisp_Object arg) 6155mark_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 (&paragraph_start_re); 1115 staticpro (&paragraph_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;
89Lisp_Object Qinteractive_form; 89Lisp_Object Qinteractive_form;
90static Lisp_Object Qdefalias_fset_function; 90static Lisp_Object Qdefalias_fset_function;
91 91
92static void swap_in_symval_forwarding (struct Lisp_Symbol *, struct Lisp_Buffer_Local_Value *); 92static void swap_in_symval_forwarding (struct Lisp_Symbol *,
93 struct Lisp_Buffer_Local_Value *);
93 94
94static bool 95static bool
95BOOLFWDP (union Lisp_Fwd *a) 96BOOLFWDP (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
574enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = false }; 575enum 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. */
581union Lisp_Fwd;
582INLINE bool BOOL_VECTOR_P (Lisp_Object);
583INLINE bool BUFFER_OBJFWDP (union Lisp_Fwd *);
584INLINE bool BUFFERP (Lisp_Object);
585INLINE bool CHAR_TABLE_P (Lisp_Object);
586INLINE Lisp_Object CHAR_TABLE_REF_ASCII (Lisp_Object, ptrdiff_t);
587INLINE bool (CONSP) (Lisp_Object);
588INLINE bool (FLOATP) (Lisp_Object);
589INLINE bool functionp (Lisp_Object);
590INLINE bool (INTEGERP) (Lisp_Object);
591INLINE bool (MARKERP) (Lisp_Object);
592INLINE bool (MISCP) (Lisp_Object);
593INLINE bool (NILP) (Lisp_Object);
594INLINE bool OVERLAYP (Lisp_Object);
595INLINE bool PROCESSP (Lisp_Object);
596INLINE bool PSEUDOVECTORP (Lisp_Object, int);
597INLINE bool SAVE_VALUEP (Lisp_Object);
598INLINE void set_sub_char_table_contents (Lisp_Object, ptrdiff_t,
599 Lisp_Object);
600INLINE bool STRINGP (Lisp_Object);
601INLINE bool SUB_CHAR_TABLE_P (Lisp_Object);
602INLINE bool SUBRP (Lisp_Object);
603INLINE bool (SYMBOLP) (Lisp_Object);
604INLINE bool (VECTORLIKEP) (Lisp_Object);
605INLINE bool WINDOWP (Lisp_Object);
606INLINE struct Lisp_Save_Value *XSAVE_VALUE (Lisp_Object);
607
608/* Defined in chartab.c. */
609extern Lisp_Object char_table_ref (Lisp_Object, int);
610extern void char_table_set (Lisp_Object, int, Lisp_Object);
576 611
612/* Defined in data.c. */
613extern Lisp_Object Qarrayp, Qbufferp, Qbuffer_or_string_p, Qchar_table_p;
614extern Lisp_Object Qconsp, Qfloatp, Qintegerp, Qlambda, Qlistp, Qmarkerp, Qnil;
615extern Lisp_Object Qnumberp, Qstringp, Qsymbolp, Qt, Qvectorp;
616extern Lisp_Object Qbool_vector_p;
617extern Lisp_Object Qvector_or_char_table_p, Qwholenump;
618extern Lisp_Object Qwindow;
619extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object);
620extern _Noreturn void wrong_choice (Lisp_Object, Lisp_Object);
621
622/* Defined in emacs.c. */
623extern bool might_dump;
624/* True means Emacs has already been initialized.
625 Used during startup to detect startup of dumped Emacs. */
626extern bool initialized;
627
628/* Defined in eval.c. */
629extern Lisp_Object Qautoload;
630
631/* Defined in floatfns.c. */
632extern double extract_float (Lisp_Object);
633
634/* Defined in process.c. */
635extern Lisp_Object Qprocessp;
636
637/* Defined in window.c. */
638extern Lisp_Object Qwindowp;
639
640/* Defined in xdisp.c. */
641extern Lisp_Object Qimage;
642extern 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. */
579LISP_MACRO_DEFUN (XLI, EMACS_INT, (Lisp_Object o), (o)) 646LISP_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))
673INLINE Lisp_Object 740INLINE Lisp_Object
674make_number (EMACS_INT n) 741make_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)
702INLINE EMACS_INT 774INLINE EMACS_INT
703XFASTINT (Lisp_Object a) 775XFASTINT (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
747make_natnum (EMACS_INT n) 820make_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. */
772union Lisp_Fwd;
773INLINE bool BOOL_VECTOR_P (Lisp_Object);
774INLINE bool BUFFER_OBJFWDP (union Lisp_Fwd *);
775INLINE bool BUFFERP (Lisp_Object);
776INLINE bool CHAR_TABLE_P (Lisp_Object);
777INLINE Lisp_Object CHAR_TABLE_REF_ASCII (Lisp_Object, ptrdiff_t);
778INLINE bool (CONSP) (Lisp_Object);
779INLINE bool (FLOATP) (Lisp_Object);
780INLINE bool functionp (Lisp_Object);
781INLINE bool (INTEGERP) (Lisp_Object);
782INLINE bool (MARKERP) (Lisp_Object);
783INLINE bool (MISCP) (Lisp_Object);
784INLINE bool (NILP) (Lisp_Object);
785INLINE bool OVERLAYP (Lisp_Object);
786INLINE bool PROCESSP (Lisp_Object);
787INLINE bool PSEUDOVECTORP (Lisp_Object, int);
788INLINE bool SAVE_VALUEP (Lisp_Object);
789INLINE void set_sub_char_table_contents (Lisp_Object, ptrdiff_t,
790 Lisp_Object);
791INLINE bool STRINGP (Lisp_Object);
792INLINE bool SUB_CHAR_TABLE_P (Lisp_Object);
793INLINE bool SUBRP (Lisp_Object);
794INLINE bool (SYMBOLP) (Lisp_Object);
795INLINE bool (VECTORLIKEP) (Lisp_Object);
796INLINE bool WINDOWP (Lisp_Object);
797INLINE struct Lisp_Save_Value *XSAVE_VALUE (Lisp_Object);
798
799/* Defined in chartab.c. */
800extern Lisp_Object char_table_ref (Lisp_Object, int);
801extern void char_table_set (Lisp_Object, int, Lisp_Object);
802
803/* Defined in data.c. */
804extern Lisp_Object Qarrayp, Qbufferp, Qbuffer_or_string_p, Qchar_table_p;
805extern Lisp_Object Qconsp, Qfloatp, Qintegerp, Qlambda, Qlistp, Qmarkerp, Qnil;
806extern Lisp_Object Qnumberp, Qstringp, Qsymbolp, Qt, Qvectorp;
807extern Lisp_Object Qbool_vector_p;
808extern Lisp_Object Qvector_or_char_table_p, Qwholenump;
809extern Lisp_Object Qwindow;
810extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object);
811extern _Noreturn void wrong_choice (Lisp_Object, Lisp_Object);
812
813/* Defined in emacs.c. */
814extern bool might_dump;
815/* True means Emacs has already been initialized.
816 Used during startup to detect startup of dumped Emacs. */
817extern bool initialized;
818
819/* Defined in eval.c. */
820extern Lisp_Object Qautoload;
821
822/* Defined in floatfns.c. */
823extern double extract_float (Lisp_Object);
824
825/* Defined in process.c. */
826extern Lisp_Object Qprocessp;
827
828/* Defined in window.c. */
829extern Lisp_Object Qwindowp;
830
831/* Defined in xdisp.c. */
832extern Lisp_Object Qimage;
833extern 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)
2971void 2971void
2972syms_of_nsfns (void) 2972syms_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)
504void 504void
505syms_of_nsselect (void) 505syms_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);