aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog72
-rw-r--r--src/alloc.c147
-rw-r--r--src/bidi.c1
-rw-r--r--src/buffer.c41
-rw-r--r--src/buffer.h6
-rw-r--r--src/bytecode.c1
-rw-r--r--src/callint.c14
-rw-r--r--src/casefiddle.c2
-rw-r--r--src/casetab.c1
-rw-r--r--src/category.c2
-rw-r--r--src/ccl.c24
-rw-r--r--src/ccl.h2
-rw-r--r--src/character.c6
-rw-r--r--src/character.h1
-rw-r--r--src/charset.c20
-rw-r--r--src/charset.h3
-rw-r--r--src/chartab.c4
-rw-r--r--src/cmds.c13
-rw-r--r--src/coding.c51
-rw-r--r--src/coding.h19
-rw-r--r--src/composite.c4
-rw-r--r--src/composite.h1
-rw-r--r--src/data.c56
-rw-r--r--src/dbusbind.c39
-rw-r--r--src/decompress.c2
-rw-r--r--src/dired.c8
-rw-r--r--src/dispextern.h7
-rw-r--r--src/dispnew.c4
-rw-r--r--src/disptab.h3
-rw-r--r--src/doc.c2
-rw-r--r--src/dosfns.c2
-rw-r--r--src/editfns.c24
-rw-r--r--src/emacs.c9
-rw-r--r--src/eval.c38
-rw-r--r--src/fileio.c99
-rw-r--r--src/fns.c22
-rw-r--r--src/font.c68
-rw-r--r--src/font.h16
-rw-r--r--src/fontset.c5
-rw-r--r--src/fontset.h1
-rw-r--r--src/frame.c186
-rw-r--r--src/frame.h51
-rw-r--r--src/fringe.c4
-rw-r--r--src/ftfont.c9
-rw-r--r--src/ftxfont.c2
-rw-r--r--src/gfilenotify.c40
-rw-r--r--src/gnutls.c23
-rw-r--r--src/image.c104
-rw-r--r--src/inotify.c81
-rw-r--r--src/insdel.c6
-rw-r--r--src/intervals.h16
-rw-r--r--src/keyboard.c241
-rw-r--r--src/keyboard.h31
-rw-r--r--src/keymap.c19
-rw-r--r--src/keymap.h3
-rw-r--r--src/lisp.h345
-rw-r--r--src/lread.c101
-rw-r--r--src/macfont.m24
-rw-r--r--src/macros.c5
-rw-r--r--src/menu.h4
-rw-r--r--src/minibuf.c36
-rw-r--r--src/nsfns.m29
-rw-r--r--src/nsfont.m7
-rw-r--r--src/nsimage.m2
-rw-r--r--src/nsmenu.m6
-rw-r--r--src/nsselect.m2
-rw-r--r--src/nsterm.h1
-rw-r--r--src/nsterm.m8
-rw-r--r--src/print.c20
-rw-r--r--src/process.c32
-rw-r--r--src/process.h9
-rw-r--r--src/profiler.c1
-rw-r--r--src/search.c9
-rw-r--r--src/sound.c6
-rw-r--r--src/syntax.c8
-rw-r--r--src/term.c9
-rw-r--r--src/terminal.c4
-rw-r--r--src/textprop.c22
-rw-r--r--src/undo.c8
-rw-r--r--src/w32font.c2
-rw-r--r--src/window.c22
-rw-r--r--src/window.h1
-rw-r--r--src/xdisp.c164
-rw-r--r--src/xfaces.c111
-rw-r--r--src/xfns.c4
-rw-r--r--src/xftfont.c3
-rw-r--r--src/xmenu.c3
-rw-r--r--src/xml.c2
-rw-r--r--src/xselect.c16
-rw-r--r--src/xsettings.c2
-rw-r--r--src/xterm.c8
-rw-r--r--src/xterm.h3
92 files changed, 791 insertions, 1904 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 8cf269680de..62737994747 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,75 @@
12015-01-05 Paul Eggert <eggert@cs.ucla.edu>
2
3 Compute C decls for DEFSYMs automatically
4 Fixes Bug#15880.
5 This patch also makes Q constants (e.g., Qnil) constant addresses
6 from the C point of view.
7 * alloc.c, bidi.c, buffer.c, bytecode.c, callint.c, casefiddle:
8 * casetab.c, category.c, ccl.c, charset.c, chartab.c, cmds.c, coding.c:
9 * composite.c, data.c, dbusbind.c, decompress.c, dired.c, dispnew.c:
10 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, fns.c, font.c, fontset.c:
11 * frame.c, fringe.c, ftfont.c, ftxfont.c, gfilenotify.c, gnutls.c:
12 * image.c, inotify.c, insdel.c, keyboard.c, keymap.c, lread.c:
13 * macfont.m, macros.c, minibuf.c, nsfns.m, nsfont.m, nsimage.m:
14 * nsmenu.m, nsselect.m, nsterm.m, print.c, process.c, profiler.c:
15 * search.c, sound.c, syntax.c, term.c, terminal.c, textprop.c, undo.c:
16 * window.c, xdisp.c, xfaces.c, xfns.c, xftfont.c, xmenu.c, xml.c:
17 * xselect.c, xsettings.c, xterm.c:
18 Remove Q vars that represent symbols (e.g., Qnil, Qt, Qemacs).
19 These names are now defined automatically by make-docfile.
20 * alloc.c (init_symbol): New function.
21 (Fmake_symbol): Use it.
22 (c_symbol_p): New function.
23 (valid_lisp_object_p, purecopy): Use it.
24 * alloc.c (marked_pinned_symbols):
25 Use make_lisp_symbol instead of make_lisp_ptr.
26 (garbage_collect_1): Mark lispsym symbols.
27 (CHECK_ALLOCATED_AND_LIVE_SYMBOL): New macro.
28 (mark_object): Use it.
29 (sweep_symbols): Sweep lispsym symbols.
30 (symbol_uses_obj): New function.
31 (which_symbols): Use it. Work for lispsym symbols, too.
32 (init_alloc_once): Initialize Vpurify_flag here; no need to wait,
33 since Qt's address is already known now.
34 (syms_of_alloc): Add lispsym count to symbols_consed.
35 * buffer.c (init_buffer_once): Compare to Qnil, not to make_number (0),
36 when testing whether storage is all bits zero.
37 * dispextern (struct image_type):
38 * font.c (font_property_table):
39 * frame.c (struct frame_parm_table, frame_parms):
40 * keyboard.c (scroll_bar_parts, struct event_head):
41 * xdisp.c (struct props):
42 Use XSYMBOL_INIT (Qfoo) and struct Lisp_Symbol * rather than &Qfoo and
43 Lisp_Object *, since Qfoo is no longer an object whose address can be
44 taken. All uses changed.
45 * eval.c (run_hook): New function. Most uses of Frun_hooks changed to
46 use it, so that they no longer need to take the address of a Lisp sym.
47 (syms_of_eval): Don't use DEFSYM on Vrun_hooks, as it's a variable.
48 * frame.c (syms_of_frame): Add defsyms for the frame_parms table.
49 * keyboard.c (syms_of_keyboard): Don't DEFSYM Qmenu_bar here.
50 DEFSYM Qdeactivate_mark before the corresponding var.
51 * keymap.c (syms_of_keymap): Use DEFSYM for Qmenu_bar and Qmode_line
52 instead of interning their symbols; this avoids duplicates.
53 (LISP_INITIALLY, TAG_PTR)
54 (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END, XSYMBOL_INIT):
55 New macros.
56 (LISP_INITIALLY_ZERO): Use it.
57 (enum symbol_interned, enum symbol_redirect, struct Lisp_Symbol)
58 (EXFUN, DEFUN_ARGS_MANY, DEFUN_ARGS_UNEVALLED, DEFUN_ARGS_*):
59 Move decls up, to avoid forward uses. Include globals.h earlier, too.
60 (make_lisp_symbol): New function.
61 (XSETSYMBOL): Use it.
62 (DEFSYM): Now just a placeholder for make-docfile.
63 * lread.c (DEFINE_SYMBOLS): Define, for globals.h.
64 (intern_sym): New function, with body taken from old intern_driver.
65 (intern_driver): Use it. Last arg is now Lisp integer, not ptrdiff_t.
66 All uses changed.
67 (define_symbol): New function.
68 (init_obarray): Define the C symbols taken from lispsym.
69 Use plain DEFSYM for Qt and Qnil.
70 * syntax.c (init_syntax_once): No need to worry about
71 Qchar_table_extra_slots.
72
12015-01-04 Paul Eggert <eggert@cs.ucla.edu> 732015-01-04 Paul Eggert <eggert@cs.ucla.edu>
2 74
3 'temacs -nw' should not call missing functions 75 'temacs -nw' should not call missing functions
diff --git a/src/alloc.c b/src/alloc.c
index ecea3e8ac7d..712c8f771f7 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -263,23 +263,6 @@ no_sanitize_memcpy (void *dest, void const *src, size_t size)
263 263
264#endif /* MAX_SAVE_STACK > 0 */ 264#endif /* MAX_SAVE_STACK > 0 */
265 265
266static Lisp_Object Qconses;
267static Lisp_Object Qsymbols;
268static Lisp_Object Qmiscs;
269static Lisp_Object Qstrings;
270static Lisp_Object Qvectors;
271static Lisp_Object Qfloats;
272static Lisp_Object Qintervals;
273static Lisp_Object Qbuffers;
274static Lisp_Object Qstring_bytes, Qvector_slots, Qheap;
275static Lisp_Object Qgc_cons_threshold;
276Lisp_Object Qautomatic_gc;
277Lisp_Object Qchar_table_extra_slots;
278
279/* Hook run after GC has finished. */
280
281static Lisp_Object Qpost_gc_hook;
282
283static void mark_terminals (void); 266static void mark_terminals (void);
284static void gc_sweep (void); 267static void gc_sweep (void);
285static Lisp_Object make_pure_vector (ptrdiff_t); 268static Lisp_Object make_pure_vector (ptrdiff_t);
@@ -3410,13 +3393,29 @@ set_symbol_name (Lisp_Object sym, Lisp_Object name)
3410 XSYMBOL (sym)->name = name; 3393 XSYMBOL (sym)->name = name;
3411} 3394}
3412 3395
3396void
3397init_symbol (Lisp_Object val, Lisp_Object name)
3398{
3399 struct Lisp_Symbol *p = XSYMBOL (val);
3400 set_symbol_name (val, name);
3401 set_symbol_plist (val, Qnil);
3402 p->redirect = SYMBOL_PLAINVAL;
3403 SET_SYMBOL_VAL (p, Qunbound);
3404 set_symbol_function (val, Qnil);
3405 set_symbol_next (val, NULL);
3406 p->gcmarkbit = false;
3407 p->interned = SYMBOL_UNINTERNED;
3408 p->constant = 0;
3409 p->declared_special = false;
3410 p->pinned = false;
3411}
3412
3413DEFUN ("make-symbol", Fmake_symbol, Smake_symbol, 1, 1, 0, 3413DEFUN ("make-symbol", Fmake_symbol, Smake_symbol, 1, 1, 0,
3414 doc: /* Return a newly allocated uninterned symbol whose name is NAME. 3414 doc: /* Return a newly allocated uninterned symbol whose name is NAME.
3415Its value is void, and its function definition and property list are nil. */) 3415Its value is void, and its function definition and property list are nil. */)
3416 (Lisp_Object name) 3416 (Lisp_Object name)
3417{ 3417{
3418 register Lisp_Object val; 3418 Lisp_Object val;
3419 register struct Lisp_Symbol *p;
3420 3419
3421 CHECK_STRING (name); 3420 CHECK_STRING (name);
3422 3421
@@ -3444,18 +3443,7 @@ Its value is void, and its function definition and property list are nil. */)
3444 3443
3445 MALLOC_UNBLOCK_INPUT; 3444 MALLOC_UNBLOCK_INPUT;
3446 3445
3447 p = XSYMBOL (val); 3446 init_symbol (val, name);
3448 set_symbol_name (val, name);
3449 set_symbol_plist (val, Qnil);
3450 p->redirect = SYMBOL_PLAINVAL;
3451 SET_SYMBOL_VAL (p, Qunbound);
3452 set_symbol_function (val, Qnil);
3453 set_symbol_next (val, NULL);
3454 p->gcmarkbit = false;
3455 p->interned = SYMBOL_UNINTERNED;
3456 p->constant = 0;
3457 p->declared_special = false;
3458 p->pinned = false;
3459 consing_since_gc += sizeof (struct Lisp_Symbol); 3447 consing_since_gc += sizeof (struct Lisp_Symbol);
3460 symbols_consed++; 3448 symbols_consed++;
3461 total_free_symbols--; 3449 total_free_symbols--;
@@ -4925,6 +4913,14 @@ mark_stack (void *end)
4925 4913
4926#endif /* GC_MARK_STACK != 0 */ 4914#endif /* GC_MARK_STACK != 0 */
4927 4915
4916static bool
4917c_symbol_p (struct Lisp_Symbol *sym)
4918{
4919 char *lispsym_ptr = (char *) lispsym;
4920 char *sym_ptr = (char *) sym;
4921 ptrdiff_t lispsym_offset = sym_ptr - lispsym_ptr;
4922 return 0 <= lispsym_offset && lispsym_offset < sizeof lispsym;
4923}
4928 4924
4929/* Determine whether it is safe to access memory at address P. */ 4925/* Determine whether it is safe to access memory at address P. */
4930static int 4926static int
@@ -4978,6 +4974,9 @@ valid_lisp_object_p (Lisp_Object obj)
4978 if (PURE_POINTER_P (p)) 4974 if (PURE_POINTER_P (p))
4979 return 1; 4975 return 1;
4980 4976
4977 if (SYMBOLP (obj) && c_symbol_p (p))
4978 return ((char *) p - (char *) lispsym) % sizeof lispsym[0] == 0;
4979
4981 if (p == &buffer_defaults || p == &buffer_local_symbols) 4980 if (p == &buffer_defaults || p == &buffer_local_symbols)
4982 return 2; 4981 return 2;
4983 4982
@@ -5343,7 +5342,7 @@ purecopy (Lisp_Object obj)
5343 } 5342 }
5344 else if (SYMBOLP (obj)) 5343 else if (SYMBOLP (obj))
5345 { 5344 {
5346 if (!XSYMBOL (obj)->pinned) 5345 if (!XSYMBOL (obj)->pinned && !c_symbol_p (XSYMBOL (obj)))
5347 { /* We can't purify them, but they appear in many pure objects. 5346 { /* We can't purify them, but they appear in many pure objects.
5348 Mark them as `pinned' so we know to mark them at every GC cycle. */ 5347 Mark them as `pinned' so we know to mark them at every GC cycle. */
5349 XSYMBOL (obj)->pinned = true; 5348 XSYMBOL (obj)->pinned = true;
@@ -5532,7 +5531,7 @@ mark_pinned_symbols (void)
5532 union aligned_Lisp_Symbol *sym = sblk->symbols, *end = sym + lim; 5531 union aligned_Lisp_Symbol *sym = sblk->symbols, *end = sym + lim;
5533 for (; sym < end; ++sym) 5532 for (; sym < end; ++sym)
5534 if (sym->s.pinned) 5533 if (sym->s.pinned)
5535 mark_object (make_lisp_ptr (&sym->s, Lisp_Symbol)); 5534 mark_object (make_lisp_symbol (&sym->s));
5536 5535
5537 lim = SYMBOL_BLOCK_SIZE; 5536 lim = SYMBOL_BLOCK_SIZE;
5538 } 5537 }
@@ -5566,7 +5565,7 @@ garbage_collect_1 (void *end)
5566 return Qnil; 5565 return Qnil;
5567 5566
5568 /* Record this function, so it appears on the profiler's backtraces. */ 5567 /* Record this function, so it appears on the profiler's backtraces. */
5569 record_in_backtrace (Qautomatic_gc, &Qnil, 0); 5568 record_in_backtrace (Qautomatic_gc, 0, 0);
5570 5569
5571 check_cons_list (); 5570 check_cons_list ();
5572 5571
@@ -5630,6 +5629,9 @@ garbage_collect_1 (void *end)
5630 mark_buffer (&buffer_defaults); 5629 mark_buffer (&buffer_defaults);
5631 mark_buffer (&buffer_local_symbols); 5630 mark_buffer (&buffer_local_symbols);
5632 5631
5632 for (i = 0; i < ARRAYELTS (lispsym); i++)
5633 mark_object (make_lisp_symbol (&lispsym[i]));
5634
5633 for (i = 0; i < staticidx; i++) 5635 for (i = 0; i < staticidx; i++)
5634 mark_object (*staticvec[i]); 5636 mark_object (*staticvec[i]);
5635 5637
@@ -6193,17 +6195,28 @@ mark_object (Lisp_Object arg)
6193 emacs_abort (); \ 6195 emacs_abort (); \
6194 } while (0) 6196 } while (0)
6195 6197
6196 /* Check both of the above conditions. */ 6198 /* Check both of the above conditions, for non-symbols. */
6197#define CHECK_ALLOCATED_AND_LIVE(LIVEP) \ 6199#define CHECK_ALLOCATED_AND_LIVE(LIVEP) \
6198 do { \ 6200 do { \
6199 CHECK_ALLOCATED (); \ 6201 CHECK_ALLOCATED (); \
6200 CHECK_LIVE (LIVEP); \ 6202 CHECK_LIVE (LIVEP); \
6201 } while (0) \ 6203 } while (0) \
6202 6204
6205 /* Check both of the above conditions, for symbols. */
6206#define CHECK_ALLOCATED_AND_LIVE_SYMBOL() \
6207 do { \
6208 if (!c_symbol_p (ptr)) \
6209 { \
6210 CHECK_ALLOCATED (); \
6211 CHECK_LIVE (live_symbol_p); \
6212 } \
6213 } while (0) \
6214
6203#else /* not GC_CHECK_MARKED_OBJECTS */ 6215#else /* not GC_CHECK_MARKED_OBJECTS */
6204 6216
6205#define CHECK_LIVE(LIVEP) ((void) 0) 6217#define CHECK_LIVE(LIVEP) ((void) 0)
6206#define CHECK_ALLOCATED_AND_LIVE(LIVEP) ((void) 0) 6218#define CHECK_ALLOCATED_AND_LIVE(LIVEP) ((void) 0)
6219#define CHECK_ALLOCATED_AND_LIVE_SYMBOL() ((void) 0)
6207 6220
6208#endif /* not GC_CHECK_MARKED_OBJECTS */ 6221#endif /* not GC_CHECK_MARKED_OBJECTS */
6209 6222
@@ -6363,7 +6376,7 @@ mark_object (Lisp_Object arg)
6363 nextsym: 6376 nextsym:
6364 if (ptr->gcmarkbit) 6377 if (ptr->gcmarkbit)
6365 break; 6378 break;
6366 CHECK_ALLOCATED_AND_LIVE (live_symbol_p); 6379 CHECK_ALLOCATED_AND_LIVE_SYMBOL ();
6367 ptr->gcmarkbit = 1; 6380 ptr->gcmarkbit = 1;
6368 /* Attempt to catch bogus objects. */ 6381 /* Attempt to catch bogus objects. */
6369 eassert (valid_lisp_object_p (ptr->function)); 6382 eassert (valid_lisp_object_p (ptr->function));
@@ -6720,13 +6733,16 @@ NO_INLINE /* For better stack traces */
6720static void 6733static void
6721sweep_symbols (void) 6734sweep_symbols (void)
6722{ 6735{
6723 register struct symbol_block *sblk; 6736 struct symbol_block *sblk;
6724 struct symbol_block **sprev = &symbol_block; 6737 struct symbol_block **sprev = &symbol_block;
6725 register int lim = symbol_block_index; 6738 int lim = symbol_block_index;
6726 EMACS_INT num_free = 0, num_used = 0; 6739 EMACS_INT num_free = 0, num_used = ARRAYELTS (lispsym);
6727 6740
6728 symbol_free_list = NULL; 6741 symbol_free_list = NULL;
6729 6742
6743 for (int i = 0; i < ARRAYELTS (lispsym); i++)
6744 lispsym[i].gcmarkbit = 0;
6745
6730 for (sblk = symbol_block; sblk; sblk = *sprev) 6746 for (sblk = symbol_block; sblk; sblk = *sprev)
6731 { 6747 {
6732 int this_free = 0; 6748 int this_free = 0;
@@ -6974,6 +6990,21 @@ Frames, windows, buffers, and subprocesses count as vectors
6974 bounded_number (strings_consed)); 6990 bounded_number (strings_consed));
6975} 6991}
6976 6992
6993static bool
6994symbol_uses_obj (Lisp_Object symbol, Lisp_Object obj)
6995{
6996 struct Lisp_Symbol *sym = XSYMBOL (symbol);
6997 Lisp_Object val = find_symbol_value (symbol);
6998 return (EQ (val, obj)
6999 || EQ (sym->function, obj)
7000 || (!NILP (sym->function)
7001 && COMPILEDP (sym->function)
7002 && EQ (AREF (sym->function, COMPILED_BYTECODE), obj))
7003 || (!NILP (val)
7004 && COMPILEDP (val)
7005 && EQ (AREF (val, COMPILED_BYTECODE), obj)));
7006}
7007
6977/* Find at most FIND_MAX symbols which have OBJ as their value or 7008/* Find at most FIND_MAX symbols which have OBJ as their value or
6978 function. This is used in gdbinit's `xwhichsymbols' command. */ 7009 function. This is used in gdbinit's `xwhichsymbols' command. */
6979 7010
@@ -6986,6 +7017,17 @@ which_symbols (Lisp_Object obj, EMACS_INT find_max)
6986 7017
6987 if (! DEADP (obj)) 7018 if (! DEADP (obj))
6988 { 7019 {
7020 for (int i = 0; i < ARRAYELTS (lispsym); i++)
7021 {
7022 Lisp_Object sym = make_lisp_symbol (&lispsym[i]);
7023 if (symbol_uses_obj (sym, obj))
7024 {
7025 found = Fcons (sym, found);
7026 if (--find_max == 0)
7027 goto out;
7028 }
7029 }
7030
6989 for (sblk = symbol_block; sblk; sblk = sblk->next) 7031 for (sblk = symbol_block; sblk; sblk = sblk->next)
6990 { 7032 {
6991 union aligned_Lisp_Symbol *aligned_sym = sblk->symbols; 7033 union aligned_Lisp_Symbol *aligned_sym = sblk->symbols;
@@ -6993,25 +7035,13 @@ which_symbols (Lisp_Object obj, EMACS_INT find_max)
6993 7035
6994 for (bn = 0; bn < SYMBOL_BLOCK_SIZE; bn++, aligned_sym++) 7036 for (bn = 0; bn < SYMBOL_BLOCK_SIZE; bn++, aligned_sym++)
6995 { 7037 {
6996 struct Lisp_Symbol *sym = &aligned_sym->s;
6997 Lisp_Object val;
6998 Lisp_Object tem;
6999
7000 if (sblk == symbol_block && bn >= symbol_block_index) 7038 if (sblk == symbol_block && bn >= symbol_block_index)
7001 break; 7039 break;
7002 7040
7003 XSETSYMBOL (tem, sym); 7041 Lisp_Object sym = make_lisp_symbol (&aligned_sym->s);
7004 val = find_symbol_value (tem); 7042 if (symbol_uses_obj (sym, obj))
7005 if (EQ (val, obj)
7006 || EQ (sym->function, obj)
7007 || (!NILP (sym->function)
7008 && COMPILEDP (sym->function)
7009 && EQ (AREF (sym->function, COMPILED_BYTECODE), obj))
7010 || (!NILP (val)
7011 && COMPILEDP (val)
7012 && EQ (AREF (val, COMPILED_BYTECODE), obj)))
7013 { 7043 {
7014 found = Fcons (tem, found); 7044 found = Fcons (sym, found);
7015 if (--find_max == 0) 7045 if (--find_max == 0)
7016 goto out; 7046 goto out;
7017 } 7047 }
@@ -7154,7 +7184,9 @@ verify_alloca (void)
7154void 7184void
7155init_alloc_once (void) 7185init_alloc_once (void)
7156{ 7186{
7157 /* Used to do Vpurify_flag = Qt here, but Qt isn't set up yet! */ 7187 /* Even though Qt's contents are not set up, its address is known. */
7188 Vpurify_flag = Qt;
7189
7158 purebeg = PUREBEG; 7190 purebeg = PUREBEG;
7159 pure_size = PURESIZE; 7191 pure_size = PURESIZE;
7160 7192
@@ -7230,6 +7262,7 @@ If this portion is smaller than `gc-cons-threshold', this is ignored. */);
7230 7262
7231 DEFVAR_INT ("symbols-consed", symbols_consed, 7263 DEFVAR_INT ("symbols-consed", symbols_consed,
7232 doc: /* Number of symbols that have been consed so far. */); 7264 doc: /* Number of symbols that have been consed so far. */);
7265 symbols_consed += ARRAYELTS (lispsym);
7233 7266
7234 DEFVAR_INT ("string-chars-consed", string_chars_consed, 7267 DEFVAR_INT ("string-chars-consed", string_chars_consed,
7235 doc: /* Number of string characters that have been consed so far. */); 7268 doc: /* Number of string characters that have been consed so far. */);
diff --git a/src/bidi.c b/src/bidi.c
index ef0092f3d93..cbc1820c2a5 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -262,7 +262,6 @@ typedef enum {
262} bidi_category_t; 262} bidi_category_t;
263 263
264static Lisp_Object paragraph_start_re, paragraph_separate_re; 264static Lisp_Object paragraph_start_re, paragraph_separate_re;
265static Lisp_Object Qparagraph_start, Qparagraph_separate;
266 265
267 266
268/*********************************************************************** 267/***********************************************************************
diff --git a/src/buffer.c b/src/buffer.c
index 0daa2325795..e0843723232 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -115,41 +115,8 @@ static void reset_buffer_local_variables (struct buffer *, bool);
115 due to user rplac'ing this alist or its elements. */ 115 due to user rplac'ing this alist or its elements. */
116Lisp_Object Vbuffer_alist; 116Lisp_Object Vbuffer_alist;
117 117
118static Lisp_Object Qkill_buffer_query_functions;
119
120/* Hook run before changing a major mode. */
121static Lisp_Object Qchange_major_mode_hook;
122
123Lisp_Object Qfirst_change_hook;
124Lisp_Object Qbefore_change_functions;
125Lisp_Object Qafter_change_functions;
126
127static Lisp_Object Qfundamental_mode, Qmode_class, Qpermanent_local;
128static Lisp_Object Qpermanent_local_hook;
129
130static Lisp_Object Qprotected_field;
131
132static Lisp_Object QSFundamental; /* A string "Fundamental". */ 118static Lisp_Object QSFundamental; /* A string "Fundamental". */
133 119
134static Lisp_Object Qkill_buffer_hook;
135static Lisp_Object Qbuffer_list_update_hook;
136
137static Lisp_Object Qget_file_buffer;
138
139static Lisp_Object Qoverlayp;
140
141Lisp_Object Qpriority, Qbefore_string, Qafter_string;
142
143static Lisp_Object Qevaporate;
144
145Lisp_Object Qmodification_hooks;
146Lisp_Object Qinsert_in_front_hooks;
147Lisp_Object Qinsert_behind_hooks;
148
149Lisp_Object Qchoice, Qrange, Qleft, Qright;
150Lisp_Object Qvertical_scroll_bar, Qhorizontal_scroll_bar;
151static Lisp_Object Qoverwrite_mode, Qfraction;
152
153static void alloc_buffer_text (struct buffer *, ptrdiff_t); 120static void alloc_buffer_text (struct buffer *, ptrdiff_t);
154static void free_buffer_text (struct buffer *b); 121static void free_buffer_text (struct buffer *b);
155static struct Lisp_Overlay * copy_overlays (struct buffer *, struct Lisp_Overlay *); 122static struct Lisp_Overlay * copy_overlays (struct buffer *, struct Lisp_Overlay *);
@@ -1716,7 +1683,7 @@ cleaning up all windows currently displaying the buffer to be killed. */)
1716 return unbind_to (count, Qt); 1683 return unbind_to (count, Qt);
1717 1684
1718 /* Then run the hooks. */ 1685 /* Then run the hooks. */
1719 Frun_hooks (1, &Qkill_buffer_hook); 1686 run_hook (Qkill_buffer_hook);
1720 unbind_to (count, Qnil); 1687 unbind_to (count, Qnil);
1721 } 1688 }
1722 1689
@@ -2740,7 +2707,7 @@ The first thing this function does is run
2740the normal hook `change-major-mode-hook'. */) 2707the normal hook `change-major-mode-hook'. */)
2741 (void) 2708 (void)
2742{ 2709{
2743 Frun_hooks (1, &Qchange_major_mode_hook); 2710 run_hook (Qchange_major_mode_hook);
2744 2711
2745 /* Make sure none of the bindings in local_var_alist 2712 /* Make sure none of the bindings in local_var_alist
2746 remain swapped in, in their symbols. */ 2713 remain swapped in, in their symbols. */
@@ -5063,9 +5030,9 @@ init_buffer_once (void)
5063 /* Make sure all markable slots in buffer_defaults 5030 /* Make sure all markable slots in buffer_defaults
5064 are initialized reasonably, so mark_buffer won't choke. */ 5031 are initialized reasonably, so mark_buffer won't choke. */
5065 reset_buffer (&buffer_defaults); 5032 reset_buffer (&buffer_defaults);
5066 eassert (EQ (BVAR (&buffer_defaults, name), make_number (0))); 5033 eassert (NILP (BVAR (&buffer_defaults, name)));
5067 reset_buffer_local_variables (&buffer_defaults, 1); 5034 reset_buffer_local_variables (&buffer_defaults, 1);
5068 eassert (EQ (BVAR (&buffer_local_symbols, name), make_number (0))); 5035 eassert (NILP (BVAR (&buffer_local_symbols, name)));
5069 reset_buffer (&buffer_local_symbols); 5036 reset_buffer (&buffer_local_symbols);
5070 reset_buffer_local_variables (&buffer_local_symbols, 1); 5037 reset_buffer_local_variables (&buffer_local_symbols, 1);
5071 /* Prevent GC from getting confused. */ 5038 /* Prevent GC from getting confused. */
diff --git a/src/buffer.h b/src/buffer.h
index 1b2b5b6a1b1..81852cae505 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -1141,12 +1141,6 @@ record_unwind_current_buffer (void)
1141 } while (false) 1141 } while (false)
1142 1142
1143extern Lisp_Object Vbuffer_alist; 1143extern Lisp_Object Vbuffer_alist;
1144extern Lisp_Object Qbefore_change_functions;
1145extern Lisp_Object Qafter_change_functions;
1146extern Lisp_Object Qfirst_change_hook;
1147extern Lisp_Object Qpriority, Qbefore_string, Qafter_string;
1148extern Lisp_Object Qchoice, Qrange, Qleft, Qright;
1149extern Lisp_Object Qvertical_scroll_bar, Qhorizontal_scroll_bar;
1150 1144
1151/* FOR_EACH_LIVE_BUFFER (LIST_VAR, BUF_VAR) followed by a statement is 1145/* FOR_EACH_LIVE_BUFFER (LIST_VAR, BUF_VAR) followed by a statement is
1152 a `for' loop which iterates over the buffers from Vbuffer_alist. */ 1146 a `for' loop which iterates over the buffers from Vbuffer_alist. */
diff --git a/src/bytecode.c b/src/bytecode.c
index 1d89d02e28f..b4583676835 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -69,7 +69,6 @@ by Hallvard:
69 69
70#ifdef BYTE_CODE_METER 70#ifdef BYTE_CODE_METER
71 71
72Lisp_Object Qbyte_code_meter;
73#define METER_2(code1, code2) AREF (AREF (Vbyte_code_meter, code1), code2) 72#define METER_2(code1, code2) AREF (AREF (Vbyte_code_meter, code1), code2)
74#define METER_1(code) METER_2 (0, code) 73#define METER_1(code) METER_2 (0, code)
75 74
diff --git a/src/callint.c b/src/callint.c
index 200c9ed9d7d..25955039ac7 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -28,18 +28,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
28#include "window.h" 28#include "window.h"
29#include "keymap.h" 29#include "keymap.h"
30 30
31Lisp_Object Qminus, Qplus;
32static Lisp_Object Qfuncall_interactively;
33static Lisp_Object Qcommand_debug_status;
34static Lisp_Object Qenable_recursive_minibuffers;
35
36static Lisp_Object Qhandle_shift_selection;
37static Lisp_Object Qread_number;
38
39Lisp_Object Qmouse_leave_buffer_hook;
40
41static Lisp_Object Qlist, Qlet, Qletx, Qsave_excursion, Qif;
42Lisp_Object Qwhen, Qprogn;
43static Lisp_Object preserved_fns; 31static Lisp_Object preserved_fns;
44 32
45/* Marker used within call-interactively to refer to point. */ 33/* Marker used within call-interactively to refer to point. */
@@ -477,7 +465,7 @@ invoke it. If KEYS is omitted or nil, the return value of
477 error ("Attempt to select inactive minibuffer window"); 465 error ("Attempt to select inactive minibuffer window");
478 466
479 /* If the current buffer wants to clean up, let it. */ 467 /* If the current buffer wants to clean up, let it. */
480 Frun_hooks (1, &Qmouse_leave_buffer_hook); 468 run_hook (Qmouse_leave_buffer_hook);
481 469
482 Fselect_window (w, Qnil); 470 Fselect_window (w, Qnil);
483 } 471 }
diff --git a/src/casefiddle.c b/src/casefiddle.c
index 22680032c0d..8755353240a 100644
--- a/src/casefiddle.c
+++ b/src/casefiddle.c
@@ -30,8 +30,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
30#include "keymap.h" 30#include "keymap.h"
31 31
32enum case_action {CASE_UP, CASE_DOWN, CASE_CAPITALIZE, CASE_CAPITALIZE_UP}; 32enum case_action {CASE_UP, CASE_DOWN, CASE_CAPITALIZE, CASE_CAPITALIZE_UP};
33
34Lisp_Object Qidentity;
35 33
36static Lisp_Object 34static Lisp_Object
37casify_object (enum case_action flag, Lisp_Object obj) 35casify_object (enum case_action flag, Lisp_Object obj)
diff --git a/src/casetab.c b/src/casetab.c
index 4bedc1771ce..b086abc0125 100644
--- a/src/casetab.c
+++ b/src/casetab.c
@@ -24,7 +24,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
24#include "character.h" 24#include "character.h"
25#include "buffer.h" 25#include "buffer.h"
26 26
27static Lisp_Object Qcase_table_p, Qcase_table;
28Lisp_Object Vascii_downcase_table; 27Lisp_Object Vascii_downcase_table;
29static Lisp_Object Vascii_upcase_table; 28static Lisp_Object Vascii_upcase_table;
30Lisp_Object Vascii_canon_table; 29Lisp_Object Vascii_canon_table;
diff --git a/src/category.c b/src/category.c
index 09c78240a59..b20493e5949 100644
--- a/src/category.c
+++ b/src/category.c
@@ -53,8 +53,6 @@ bset_category_table (struct buffer *b, Lisp_Object val)
53 53
54 For the moment, we are not using this feature. */ 54 For the moment, we are not using this feature. */
55static int category_table_version; 55static int category_table_version;
56
57static Lisp_Object Qcategory_table, Qcategoryp, Qcategorysetp, Qcategory_table_p;
58 56
59/* Category set staff. */ 57/* Category set staff. */
60 58
diff --git a/src/ccl.c b/src/ccl.c
index 109d6c0948c..053544c8274 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -34,21 +34,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
34#include "ccl.h" 34#include "ccl.h"
35#include "coding.h" 35#include "coding.h"
36 36
37Lisp_Object Qccl, Qcclp;
38
39/* This symbol is a property which associates with ccl program vector.
40 Ex: (get 'ccl-big5-encoder 'ccl-program) returns ccl program vector. */
41static Lisp_Object Qccl_program;
42
43/* These symbols are properties which associate with code conversion
44 map and their ID respectively. */
45static Lisp_Object Qcode_conversion_map;
46static Lisp_Object Qcode_conversion_map_id;
47
48/* Symbols of ccl program have this property, a value of the property
49 is an index for Vccl_program_table. */
50static Lisp_Object Qccl_program_idx;
51
52/* Table of registered CCL programs. Each element is a vector of 37/* Table of registered CCL programs. Each element is a vector of
53 NAME, CCL_PROG, RESOLVEDP, and UPDATEDP, where NAME (symbol) is the 38 NAME, CCL_PROG, RESOLVEDP, and UPDATEDP, where NAME (symbol) is the
54 name of the program, CCL_PROG (vector) is the compiled code of the 39 name of the program, CCL_PROG (vector) is the compiled code of the
@@ -2297,8 +2282,17 @@ syms_of_ccl (void)
2297 2282
2298 DEFSYM (Qccl, "ccl"); 2283 DEFSYM (Qccl, "ccl");
2299 DEFSYM (Qcclp, "cclp"); 2284 DEFSYM (Qcclp, "cclp");
2285
2286 /* This symbol is a property which associates with ccl program vector.
2287 Ex: (get 'ccl-big5-encoder 'ccl-program) returns ccl program vector. */
2300 DEFSYM (Qccl_program, "ccl-program"); 2288 DEFSYM (Qccl_program, "ccl-program");
2289
2290 /* Symbols of ccl program have this property, a value of the property
2291 is an index for Vccl_program_table. */
2301 DEFSYM (Qccl_program_idx, "ccl-program-idx"); 2292 DEFSYM (Qccl_program_idx, "ccl-program-idx");
2293
2294 /* These symbols are properties which associate with code conversion
2295 map and their ID respectively. */
2302 DEFSYM (Qcode_conversion_map, "code-conversion-map"); 2296 DEFSYM (Qcode_conversion_map, "code-conversion-map");
2303 DEFSYM (Qcode_conversion_map_id, "code-conversion-map-id"); 2297 DEFSYM (Qcode_conversion_map_id, "code-conversion-map-id");
2304 2298
diff --git a/src/ccl.h b/src/ccl.h
index b01a73f3a2d..7b72dc74104 100644
--- a/src/ccl.h
+++ b/src/ccl.h
@@ -81,8 +81,6 @@ extern bool setup_ccl_program (struct ccl_program *, Lisp_Object);
81extern void ccl_driver (struct ccl_program *, int *, int *, int, int, 81extern void ccl_driver (struct ccl_program *, int *, int *, int, int,
82 Lisp_Object); 82 Lisp_Object);
83 83
84extern Lisp_Object Qccl, Qcclp;
85
86#define CHECK_CCL_PROGRAM(x) \ 84#define CHECK_CCL_PROGRAM(x) \
87 do { \ 85 do { \
88 if (NILP (Fccl_program_p (x))) \ 86 if (NILP (Fccl_program_p (x))) \
diff --git a/src/character.c b/src/character.c
index ad3fe129a33..4a5c7ec3156 100644
--- a/src/character.c
+++ b/src/character.c
@@ -48,16 +48,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
48 48
49#endif /* emacs */ 49#endif /* emacs */
50 50
51Lisp_Object Qcharacterp;
52
53static Lisp_Object Qauto_fill_chars;
54
55/* Char-table of information about which character to unify to which 51/* Char-table of information about which character to unify to which
56 Unicode character. Mainly used by the macro MAYBE_UNIFY_CHAR. */ 52 Unicode character. Mainly used by the macro MAYBE_UNIFY_CHAR. */
57Lisp_Object Vchar_unify_table; 53Lisp_Object Vchar_unify_table;
58 54
59static Lisp_Object Qchar_script_table;
60
61 55
62 56
63/* If character code C has modifier masks, reflect them to the 57/* If character code C has modifier masks, reflect them to the
diff --git a/src/character.h b/src/character.h
index 624f4fff3f0..5043880cb42 100644
--- a/src/character.h
+++ b/src/character.h
@@ -657,7 +657,6 @@ extern ptrdiff_t c_string_width (const unsigned char *, ptrdiff_t, int,
657extern ptrdiff_t lisp_string_width (Lisp_Object, ptrdiff_t, 657extern ptrdiff_t lisp_string_width (Lisp_Object, ptrdiff_t,
658 ptrdiff_t *, ptrdiff_t *); 658 ptrdiff_t *, ptrdiff_t *);
659 659
660extern Lisp_Object Qcharacterp;
661extern Lisp_Object Vchar_unify_table; 660extern Lisp_Object Vchar_unify_table;
662extern Lisp_Object string_escape_byte8 (Lisp_Object); 661extern Lisp_Object string_escape_byte8 (Lisp_Object);
663 662
diff --git a/src/charset.c b/src/charset.c
index 33436d53f63..ea1480e806a 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -66,16 +66,7 @@ struct charset *charset_table;
66static ptrdiff_t charset_table_size; 66static ptrdiff_t charset_table_size;
67static int charset_table_used; 67static int charset_table_used;
68 68
69Lisp_Object Qcharsetp; 69/* Special charsets corresponding to symbols. */
70
71/* Special charset symbols. */
72Lisp_Object Qascii;
73static Lisp_Object Qeight_bit;
74static Lisp_Object Qiso_8859_1;
75static Lisp_Object Qunicode;
76static Lisp_Object Qemacs;
77
78/* The corresponding charsets. */
79int charset_ascii; 70int charset_ascii;
80int charset_eight_bit; 71int charset_eight_bit;
81static int charset_iso_8859_1; 72static int charset_iso_8859_1;
@@ -88,9 +79,6 @@ int charset_jisx0208_1978;
88int charset_jisx0208; 79int charset_jisx0208;
89int charset_ksc5601; 80int charset_ksc5601;
90 81
91/* Value of charset attribute `charset-iso-plane'. */
92static Lisp_Object Qgl, Qgr;
93
94/* Charset of unibyte characters. */ 82/* Charset of unibyte characters. */
95int charset_unibyte; 83int charset_unibyte;
96 84
@@ -2344,12 +2332,14 @@ syms_of_charset (void)
2344{ 2332{
2345 DEFSYM (Qcharsetp, "charsetp"); 2333 DEFSYM (Qcharsetp, "charsetp");
2346 2334
2335 /* Special charset symbols. */
2347 DEFSYM (Qascii, "ascii"); 2336 DEFSYM (Qascii, "ascii");
2348 DEFSYM (Qunicode, "unicode"); 2337 DEFSYM (Qunicode, "unicode");
2349 DEFSYM (Qemacs, "emacs"); 2338 DEFSYM (Qemacs, "emacs");
2350 DEFSYM (Qeight_bit, "eight-bit"); 2339 DEFSYM (Qeight_bit, "eight-bit");
2351 DEFSYM (Qiso_8859_1, "iso-8859-1"); 2340 DEFSYM (Qiso_8859_1, "iso-8859-1");
2352 2341
2342 /* Value of charset attribute `charset-iso-plane'. */
2353 DEFSYM (Qgl, "gl"); 2343 DEFSYM (Qgl, "gl");
2354 DEFSYM (Qgr, "gr"); 2344 DEFSYM (Qgr, "gr");
2355 2345
@@ -2362,10 +2352,6 @@ syms_of_charset (void)
2362 staticpro (&Vemacs_mule_charset_list); 2352 staticpro (&Vemacs_mule_charset_list);
2363 Vemacs_mule_charset_list = Qnil; 2353 Vemacs_mule_charset_list = Qnil;
2364 2354
2365 /* Don't staticpro them here. It's done in syms_of_fns. */
2366 QCtest = intern_c_string (":test");
2367 Qeq = intern_c_string ("eq");
2368
2369 staticpro (&Vcharset_hash_table); 2355 staticpro (&Vcharset_hash_table);
2370 { 2356 {
2371 Lisp_Object args[2]; 2357 Lisp_Object args[2];
diff --git a/src/charset.h b/src/charset.h
index f66ca0d9cb2..f6575985a47 100644
--- a/src/charset.h
+++ b/src/charset.h
@@ -519,9 +519,6 @@ extern int iso_charset_table[ISO_MAX_DIMENSION][ISO_MAX_CHARS][ISO_MAX_FINAL];
519 519
520 520
521 521
522extern Lisp_Object Qcharsetp;
523
524extern Lisp_Object Qascii;
525extern int charset_ascii, charset_eight_bit; 522extern int charset_ascii, charset_eight_bit;
526extern int charset_unicode; 523extern int charset_unicode;
527extern int charset_jisx0201_roman; 524extern int charset_jisx0201_roman;
diff --git a/src/chartab.c b/src/chartab.c
index bfbbf798f0c..013a5be575e 100644
--- a/src/chartab.c
+++ b/src/chartab.c
@@ -57,9 +57,6 @@ static const int chartab_bits[4] =
57/* Preamble for uniprop (Unicode character property) tables. See the 57/* Preamble for uniprop (Unicode character property) tables. See the
58 comment of "Unicode character property tables". */ 58 comment of "Unicode character property tables". */
59 59
60/* Purpose of uniprop tables. */
61static Lisp_Object Qchar_code_property_table;
62
63/* Types of decoder and encoder functions for uniprop values. */ 60/* Types of decoder and encoder functions for uniprop values. */
64typedef Lisp_Object (*uniprop_decoder_t) (Lisp_Object, Lisp_Object); 61typedef Lisp_Object (*uniprop_decoder_t) (Lisp_Object, Lisp_Object);
65typedef Lisp_Object (*uniprop_encoder_t) (Lisp_Object, Lisp_Object); 62typedef Lisp_Object (*uniprop_encoder_t) (Lisp_Object, Lisp_Object);
@@ -1378,6 +1375,7 @@ CHAR-TABLE must be what returned by `unicode-property-table-internal'. */)
1378void 1375void
1379syms_of_chartab (void) 1376syms_of_chartab (void)
1380{ 1377{
1378 /* Purpose of uniprop tables. */
1381 DEFSYM (Qchar_code_property_table, "char-code-property-table"); 1379 DEFSYM (Qchar_code_property_table, "char-code-property-table");
1382 1380
1383 defsubr (&Smake_char_table); 1381 defsubr (&Smake_char_table);
diff --git a/src/cmds.c b/src/cmds.c
index 485a235b5ab..270fc39cabc 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -31,11 +31,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
31#include "dispextern.h" 31#include "dispextern.h"
32#include "frame.h" 32#include "frame.h"
33 33
34static Lisp_Object Qkill_forward_chars, Qkill_backward_chars;
35
36/* A possible value for a buffer's overwrite-mode variable. */
37static Lisp_Object Qoverwrite_mode_binary;
38
39static int internal_self_insert (int, EMACS_INT); 34static int internal_self_insert (int, EMACS_INT);
40 35
41DEFUN ("forward-point", Fforward_point, Sforward_point, 1, 1, 0, 36DEFUN ("forward-point", Fforward_point, Sforward_point, 1, 1, 0,
@@ -322,9 +317,6 @@ At the end, it runs `post-self-insert-hook'. */)
322 return 0. A value of 1 indicates this *might* not have been simple. 317 return 0. A value of 1 indicates this *might* not have been simple.
323 A value of 2 means this did things that call for an undo boundary. */ 318 A value of 2 means this did things that call for an undo boundary. */
324 319
325static Lisp_Object Qexpand_abbrev;
326static Lisp_Object Qpost_self_insert_hook;
327
328static int 320static int
329internal_self_insert (int c, EMACS_INT n) 321internal_self_insert (int c, EMACS_INT n)
330{ 322{
@@ -507,7 +499,7 @@ internal_self_insert (int c, EMACS_INT n)
507 } 499 }
508 500
509 /* Run hooks for electric keys. */ 501 /* Run hooks for electric keys. */
510 Frun_hooks (1, &Qpost_self_insert_hook); 502 run_hook (Qpost_self_insert_hook);
511 503
512 return hairy; 504 return hairy;
513} 505}
@@ -519,7 +511,10 @@ syms_of_cmds (void)
519{ 511{
520 DEFSYM (Qkill_backward_chars, "kill-backward-chars"); 512 DEFSYM (Qkill_backward_chars, "kill-backward-chars");
521 DEFSYM (Qkill_forward_chars, "kill-forward-chars"); 513 DEFSYM (Qkill_forward_chars, "kill-forward-chars");
514
515 /* A possible value for a buffer's overwrite-mode variable. */
522 DEFSYM (Qoverwrite_mode_binary, "overwrite-mode-binary"); 516 DEFSYM (Qoverwrite_mode_binary, "overwrite-mode-binary");
517
523 DEFSYM (Qexpand_abbrev, "expand-abbrev"); 518 DEFSYM (Qexpand_abbrev, "expand-abbrev");
524 DEFSYM (Qpost_self_insert_hook, "post-self-insert-hook"); 519 DEFSYM (Qpost_self_insert_hook, "post-self-insert-hook");
525 520
diff --git a/src/coding.c b/src/coding.c
index f3f8dc18875..20c64762160 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -303,35 +303,6 @@ encode_coding_XXX (struct coding_system *coding)
303 303
304Lisp_Object Vcoding_system_hash_table; 304Lisp_Object Vcoding_system_hash_table;
305 305
306static Lisp_Object Qcoding_system, Qeol_type;
307static Lisp_Object Qcoding_aliases;
308Lisp_Object Qunix, Qdos;
309static Lisp_Object Qmac;
310Lisp_Object Qbuffer_file_coding_system;
311static Lisp_Object Qpost_read_conversion, Qpre_write_conversion;
312static Lisp_Object Qdefault_char;
313Lisp_Object Qno_conversion, Qundecided;
314Lisp_Object Qcharset, Qutf_8;
315static Lisp_Object Qiso_2022;
316static Lisp_Object Qutf_16, Qshift_jis, Qbig5;
317static Lisp_Object Qbig, Qlittle;
318static Lisp_Object Qcoding_system_history;
319static Lisp_Object Qvalid_codes;
320static Lisp_Object QCcategory, QCmnemonic, QCdefault_char;
321static Lisp_Object QCdecode_translation_table, QCencode_translation_table;
322static Lisp_Object QCpost_read_conversion, QCpre_write_conversion;
323static Lisp_Object QCascii_compatible_p;
324
325Lisp_Object Qcall_process, Qcall_process_region;
326Lisp_Object Qstart_process, Qopen_network_stream;
327static Lisp_Object Qtarget_idx;
328
329static Lisp_Object Qinsufficient_source, Qinvalid_source, Qinterrupted;
330
331/* If a symbol has this property, evaluate the value to define the
332 symbol as a coding system. */
333static Lisp_Object Qcoding_system_define_form;
334
335/* Format of end-of-line decided by system. This is Qunix on 306/* Format of end-of-line decided by system. This is Qunix on
336 Unix and Mac, Qdos on DOS/Windows. 307 Unix and Mac, Qdos on DOS/Windows.
337 This has an effect only for external encoding (i.e. for output to 308 This has an effect only for external encoding (i.e. for output to
@@ -340,17 +311,6 @@ static Lisp_Object system_eol_type;
340 311
341#ifdef emacs 312#ifdef emacs
342 313
343Lisp_Object Qcoding_system_p, Qcoding_system_error;
344
345/* Coding system emacs-mule and raw-text are for converting only
346 end-of-line format. */
347Lisp_Object Qemacs_mule, Qraw_text;
348Lisp_Object Qutf_8_emacs;
349
350#if defined (WINDOWSNT) || defined (CYGWIN)
351static Lisp_Object Qutf_16le;
352#endif
353
354/* Coding-systems are handed between Emacs Lisp programs and C internal 314/* Coding-systems are handed between Emacs Lisp programs and C internal
355 routines by the following three variables. */ 315 routines by the following three variables. */
356/* Coding system to be used to encode text for terminal display when 316/* Coding system to be used to encode text for terminal display when
@@ -359,11 +319,6 @@ struct coding_system safe_terminal_coding;
359 319
360#endif /* emacs */ 320#endif /* emacs */
361 321
362Lisp_Object Qtranslation_table;
363Lisp_Object Qtranslation_table_id;
364static Lisp_Object Qtranslation_table_for_decode;
365static Lisp_Object Qtranslation_table_for_encode;
366
367/* Two special coding systems. */ 322/* Two special coding systems. */
368static Lisp_Object Vsjis_coding_system; 323static Lisp_Object Vsjis_coding_system;
369static Lisp_Object Vbig5_coding_system; 324static Lisp_Object Vbig5_coding_system;
@@ -10903,6 +10858,7 @@ syms_of_coding (void)
10903 10858
10904 DEFSYM (Qcoding_system_p, "coding-system-p"); 10859 DEFSYM (Qcoding_system_p, "coding-system-p");
10905 10860
10861 /* Error signaled when there's a problem with detecting a coding system. */
10906 DEFSYM (Qcoding_system_error, "coding-system-error"); 10862 DEFSYM (Qcoding_system_error, "coding-system-error");
10907 Fput (Qcoding_system_error, Qerror_conditions, 10863 Fput (Qcoding_system_error, Qerror_conditions,
10908 listn (CONSTYPE_PURE, 2, Qcoding_system_error, Qerror)); 10864 listn (CONSTYPE_PURE, 2, Qcoding_system_error, Qerror));
@@ -10917,6 +10873,8 @@ syms_of_coding (void)
10917 10873
10918 DEFSYM (Qvalid_codes, "valid-codes"); 10874 DEFSYM (Qvalid_codes, "valid-codes");
10919 10875
10876 /* Coding system emacs-mule and raw-text are for converting only
10877 end-of-line format. */
10920 DEFSYM (Qemacs_mule, "emacs-mule"); 10878 DEFSYM (Qemacs_mule, "emacs-mule");
10921 10879
10922 DEFSYM (QCcategory, ":category"); 10880 DEFSYM (QCcategory, ":category");
@@ -10979,6 +10937,9 @@ syms_of_coding (void)
10979 DEFSYM (Qinsufficient_source, "insufficient-source"); 10937 DEFSYM (Qinsufficient_source, "insufficient-source");
10980 DEFSYM (Qinvalid_source, "invalid-source"); 10938 DEFSYM (Qinvalid_source, "invalid-source");
10981 DEFSYM (Qinterrupted, "interrupted"); 10939 DEFSYM (Qinterrupted, "interrupted");
10940
10941 /* If a symbol has this property, evaluate the value to define the
10942 symbol as a coding system. */
10982 DEFSYM (Qcoding_system_define_form, "coding-system-define-form"); 10943 DEFSYM (Qcoding_system_define_form, "coding-system-define-form");
10983 10944
10984 defsubr (&Scoding_system_p); 10945 defsubr (&Scoding_system_p);
diff --git a/src/coding.h b/src/coding.h
index 2b56e5abd9d..d49d786e6dd 100644
--- a/src/coding.h
+++ b/src/coding.h
@@ -763,23 +763,7 @@ extern Lisp_Object from_unicode_buffer (const wchar_t *wstr);
763extern Lisp_Object preferred_coding_system (void); 763extern Lisp_Object preferred_coding_system (void);
764 764
765 765
766extern Lisp_Object Qutf_8, Qutf_8_emacs;
767
768extern Lisp_Object Qcoding_category_index;
769extern Lisp_Object Qcoding_system_p;
770extern Lisp_Object Qraw_text, Qemacs_mule, Qno_conversion, Qundecided;
771extern Lisp_Object Qbuffer_file_coding_system;
772
773extern Lisp_Object Qunix, Qdos;
774
775extern Lisp_Object Qtranslation_table;
776extern Lisp_Object Qtranslation_table_id;
777
778#ifdef emacs 766#ifdef emacs
779extern Lisp_Object Qfile_coding_system;
780extern Lisp_Object Qcall_process, Qcall_process_region;
781extern Lisp_Object Qstart_process, Qopen_network_stream;
782extern Lisp_Object Qwrite_region;
783 767
784extern char *emacs_strerror (int); 768extern char *emacs_strerror (int);
785 769
@@ -789,9 +773,6 @@ extern struct coding_system safe_terminal_coding;
789 773
790#endif 774#endif
791 775
792/* Error signaled when there's a problem with detecting coding system */
793extern Lisp_Object Qcoding_system_error;
794
795extern char emacs_mule_bytes[256]; 776extern char emacs_mule_bytes[256];
796 777
797#endif /* EMACS_CODING_H */ 778#endif /* EMACS_CODING_H */
diff --git a/src/composite.c b/src/composite.c
index 4b22499fdd9..8ac5ef712c6 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -134,8 +134,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
134*/ 134*/
135 135
136 136
137Lisp_Object Qcomposition;
138
139/* Table of pointers to the structure `composition' indexed by 137/* Table of pointers to the structure `composition' indexed by
140 COMPOSITION-ID. This structure is for storing information about 138 COMPOSITION-ID. This structure is for storing information about
141 each composition except for COMPONENTS-VEC. */ 139 each composition except for COMPONENTS-VEC. */
@@ -152,8 +150,6 @@ ptrdiff_t n_compositions;
152 COMPOSITION-ID. */ 150 COMPOSITION-ID. */
153Lisp_Object composition_hash_table; 151Lisp_Object composition_hash_table;
154 152
155static Lisp_Object Qauto_composed;
156static Lisp_Object Qauto_composition_function;
157/* Maximum number of characters to look back for 153/* Maximum number of characters to look back for
158 auto-compositions. */ 154 auto-compositions. */
159#define MAX_AUTO_COMPOSITION_LOOKBACK 3 155#define MAX_AUTO_COMPOSITION_LOOKBACK 3
diff --git a/src/composite.h b/src/composite.h
index e0d4e858d48..fb9f9eb8655 100644
--- a/src/composite.h
+++ b/src/composite.h
@@ -190,7 +190,6 @@ extern ptrdiff_t n_compositions;
190#define CHECK_BORDER (CHECK_HEAD | CHECK_TAIL) 190#define CHECK_BORDER (CHECK_HEAD | CHECK_TAIL)
191#define CHECK_ALL (CHECK_BORDER | CHECK_INSIDE) 191#define CHECK_ALL (CHECK_BORDER | CHECK_INSIDE)
192 192
193extern Lisp_Object Qcomposition;
194extern Lisp_Object composition_hash_table; 193extern Lisp_Object composition_hash_table;
195extern ptrdiff_t get_composition_id (ptrdiff_t, ptrdiff_t, ptrdiff_t, 194extern ptrdiff_t get_composition_id (ptrdiff_t, ptrdiff_t, ptrdiff_t,
196 Lisp_Object, Lisp_Object); 195 Lisp_Object, Lisp_Object);
diff --git a/src/data.c b/src/data.c
index 3992792fdd0..820c3ce8407 100644
--- a/src/data.c
+++ b/src/data.c
@@ -37,58 +37,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
37#include "font.h" 37#include "font.h"
38#include "keymap.h" 38#include "keymap.h"
39 39
40Lisp_Object Qnil, Qt, Qquote, Qlambda, Qunbound;
41static Lisp_Object Qsubr;
42Lisp_Object Qerror_conditions, Qerror_message, Qtop_level;
43Lisp_Object Qerror, Quser_error, Qquit, Qargs_out_of_range;
44static Lisp_Object Qwrong_length_argument;
45static Lisp_Object Qwrong_type_argument;
46Lisp_Object Qvoid_variable, Qvoid_function;
47static Lisp_Object Qcyclic_function_indirection;
48static Lisp_Object Qcyclic_variable_indirection;
49Lisp_Object Qcircular_list;
50static Lisp_Object Qsetting_constant;
51Lisp_Object Qinvalid_read_syntax;
52Lisp_Object Qinvalid_function, Qwrong_number_of_arguments, Qno_catch;
53Lisp_Object Qend_of_file, Qarith_error, Qmark_inactive;
54Lisp_Object Qbeginning_of_buffer, Qend_of_buffer, Qbuffer_read_only;
55Lisp_Object Qtext_read_only;
56
57Lisp_Object Qintegerp, Qwholenump, Qsymbolp, Qlistp, Qconsp;
58static Lisp_Object Qnatnump;
59Lisp_Object Qstringp, Qarrayp, Qsequencep, Qbufferp;
60Lisp_Object Qchar_or_string_p, Qmarkerp, Qinteger_or_marker_p, Qvectorp;
61Lisp_Object Qbool_vector_p;
62Lisp_Object Qbuffer_or_string_p;
63static Lisp_Object Qkeywordp, Qboundp;
64Lisp_Object Qfboundp;
65Lisp_Object Qchar_table_p, Qvector_or_char_table_p;
66
67Lisp_Object Qcdr;
68static Lisp_Object Qad_advice_info, Qad_activate_internal;
69
70static Lisp_Object Qdomain_error, Qsingularity_error, Qunderflow_error;
71Lisp_Object Qrange_error, Qoverflow_error;
72
73Lisp_Object Qfloatp;
74Lisp_Object Qnumberp, Qnumber_or_marker_p;
75
76Lisp_Object Qinteger, Qsymbol;
77static Lisp_Object Qcons, Qfloat, Qmisc, Qstring, Qvector;
78Lisp_Object Qwindow;
79static Lisp_Object Qoverlay, Qwindow_configuration;
80static Lisp_Object Qprocess, Qmarker;
81static Lisp_Object Qcompiled_function, Qframe;
82Lisp_Object Qbuffer;
83static Lisp_Object Qchar_table, Qbool_vector, Qhash_table;
84static Lisp_Object Qsubrp;
85static Lisp_Object Qmany, Qunevalled;
86Lisp_Object Qfont_spec, Qfont_entity, Qfont_object;
87static Lisp_Object Qdefun;
88
89Lisp_Object Qinteractive_form;
90static Lisp_Object Qdefalias_fset_function;
91
92static void swap_in_symval_forwarding (struct Lisp_Symbol *, 40static void swap_in_symval_forwarding (struct Lisp_Symbol *,
93 struct Lisp_Buffer_Local_Value *); 41 struct Lisp_Buffer_Local_Value *);
94 42
@@ -3584,10 +3532,6 @@ syms_of_data (void)
3584 PUT_ERROR (Qunderflow_error, Fcons (Qdomain_error, arith_tail), 3532 PUT_ERROR (Qunderflow_error, Fcons (Qdomain_error, arith_tail),
3585 "Arithmetic underflow error"); 3533 "Arithmetic underflow error");
3586 3534
3587 staticpro (&Qnil);
3588 staticpro (&Qt);
3589 staticpro (&Qunbound);
3590
3591 /* Types that type-of returns. */ 3535 /* Types that type-of returns. */
3592 DEFSYM (Qinteger, "integer"); 3536 DEFSYM (Qinteger, "integer");
3593 DEFSYM (Qsymbol, "symbol"); 3537 DEFSYM (Qsymbol, "symbol");
diff --git a/src/dbusbind.c b/src/dbusbind.c
index 9de694954d4..3bdec0fa4a6 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -41,37 +41,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
41#endif 41#endif
42 42
43 43
44/* Subroutines. */
45static Lisp_Object Qdbus__init_bus;
46static Lisp_Object Qdbus_get_unique_name;
47static Lisp_Object Qdbus_message_internal;
48
49/* D-Bus error symbol. */
50static Lisp_Object Qdbus_error;
51
52/* Lisp symbols of the system and session buses. */
53static Lisp_Object QCdbus_system_bus, QCdbus_session_bus;
54
55/* Lisp symbol for method call timeout. */
56static Lisp_Object QCdbus_timeout;
57
58/* Lisp symbols of D-Bus types. */
59static Lisp_Object QCdbus_type_byte, QCdbus_type_boolean;
60static Lisp_Object QCdbus_type_int16, QCdbus_type_uint16;
61static Lisp_Object QCdbus_type_int32, QCdbus_type_uint32;
62static Lisp_Object QCdbus_type_int64, QCdbus_type_uint64;
63static Lisp_Object QCdbus_type_double, QCdbus_type_string;
64static Lisp_Object QCdbus_type_object_path, QCdbus_type_signature;
65#ifdef DBUS_TYPE_UNIX_FD
66static Lisp_Object QCdbus_type_unix_fd;
67#endif
68static Lisp_Object QCdbus_type_array, QCdbus_type_variant;
69static Lisp_Object QCdbus_type_struct, QCdbus_type_dict_entry;
70
71/* Lisp symbols of objects in `dbus-registered-objects-table'. */
72static Lisp_Object QCdbus_registered_serial, QCdbus_registered_method;
73static Lisp_Object QCdbus_registered_signal;
74
75/* Alist of D-Bus buses we are polling for messages. 44/* Alist of D-Bus buses we are polling for messages.
76 The key is the symbol or string of the bus, and the value is the 45 The key is the symbol or string of the bus, and the value is the
77 connection address. */ 46 connection address. */
@@ -1755,15 +1724,21 @@ syms_of_dbusbind (void)
1755 DEFSYM (Qdbus_message_internal, "dbus-message-internal"); 1724 DEFSYM (Qdbus_message_internal, "dbus-message-internal");
1756 defsubr (&Sdbus_message_internal); 1725 defsubr (&Sdbus_message_internal);
1757 1726
1727 /* D-Bus error symbol. */
1758 DEFSYM (Qdbus_error, "dbus-error"); 1728 DEFSYM (Qdbus_error, "dbus-error");
1759 Fput (Qdbus_error, Qerror_conditions, 1729 Fput (Qdbus_error, Qerror_conditions,
1760 list2 (Qdbus_error, Qerror)); 1730 list2 (Qdbus_error, Qerror));
1761 Fput (Qdbus_error, Qerror_message, 1731 Fput (Qdbus_error, Qerror_message,
1762 build_pure_c_string ("D-Bus error")); 1732 build_pure_c_string ("D-Bus error"));
1763 1733
1734 /* Lisp symbols of the system and session buses. */
1764 DEFSYM (QCdbus_system_bus, ":system"); 1735 DEFSYM (QCdbus_system_bus, ":system");
1765 DEFSYM (QCdbus_session_bus, ":session"); 1736 DEFSYM (QCdbus_session_bus, ":session");
1737
1738 /* Lisp symbol for method call timeout. */
1766 DEFSYM (QCdbus_timeout, ":timeout"); 1739 DEFSYM (QCdbus_timeout, ":timeout");
1740
1741 /* Lisp symbols of D-Bus types. */
1767 DEFSYM (QCdbus_type_byte, ":byte"); 1742 DEFSYM (QCdbus_type_byte, ":byte");
1768 DEFSYM (QCdbus_type_boolean, ":boolean"); 1743 DEFSYM (QCdbus_type_boolean, ":boolean");
1769 DEFSYM (QCdbus_type_int16, ":int16"); 1744 DEFSYM (QCdbus_type_int16, ":int16");
@@ -1783,6 +1758,8 @@ syms_of_dbusbind (void)
1783 DEFSYM (QCdbus_type_variant, ":variant"); 1758 DEFSYM (QCdbus_type_variant, ":variant");
1784 DEFSYM (QCdbus_type_struct, ":struct"); 1759 DEFSYM (QCdbus_type_struct, ":struct");
1785 DEFSYM (QCdbus_type_dict_entry, ":dict-entry"); 1760 DEFSYM (QCdbus_type_dict_entry, ":dict-entry");
1761
1762 /* Lisp symbols of objects in `dbus-registered-objects-table'. */
1786 DEFSYM (QCdbus_registered_serial, ":serial"); 1763 DEFSYM (QCdbus_registered_serial, ":serial");
1787 DEFSYM (QCdbus_registered_method, ":method"); 1764 DEFSYM (QCdbus_registered_method, ":method");
1788 DEFSYM (QCdbus_registered_signal, ":signal"); 1765 DEFSYM (QCdbus_registered_signal, ":signal");
diff --git a/src/decompress.c b/src/decompress.c
index 3c0ef10cea5..b14f0a2cd79 100644
--- a/src/decompress.c
+++ b/src/decompress.c
@@ -28,8 +28,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
28 28
29#include <verify.h> 29#include <verify.h>
30 30
31static Lisp_Object Qzlib_dll;
32
33#ifdef WINDOWSNT 31#ifdef WINDOWSNT
34# include <windows.h> 32# include <windows.h>
35# include "w32.h" 33# include "w32.h"
diff --git a/src/dired.c b/src/dired.c
index 3ca400eafe9..00f9a5b0765 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -51,13 +51,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
51#include "msdos.h" /* for fstatat */ 51#include "msdos.h" /* for fstatat */
52#endif 52#endif
53 53
54static Lisp_Object Qdirectory_files;
55static Lisp_Object Qdirectory_files_and_attributes;
56static Lisp_Object Qfile_name_completion;
57static Lisp_Object Qfile_name_all_completions;
58static Lisp_Object Qfile_attributes;
59static Lisp_Object Qfile_attributes_lessp;
60
61static ptrdiff_t scmp (const char *, const char *, ptrdiff_t); 54static ptrdiff_t scmp (const char *, const char *, ptrdiff_t);
62static Lisp_Object file_attributes (int, char const *, Lisp_Object); 55static Lisp_Object file_attributes (int, char const *, Lisp_Object);
63 56
@@ -450,7 +443,6 @@ These are all file names in directory DIRECTORY which begin with FILE. */)
450} 443}
451 444
452static int file_name_completion_stat (int, struct dirent *, struct stat *); 445static int file_name_completion_stat (int, struct dirent *, struct stat *);
453static Lisp_Object Qdefault_directory;
454 446
455static Lisp_Object 447static Lisp_Object
456file_name_completion (Lisp_Object file, Lisp_Object dirname, bool all_flag, 448file_name_completion (Lisp_Object file, Lisp_Object dirname, bool all_flag,
diff --git a/src/dispextern.h b/src/dispextern.h
index ba8524d624c..d717473f8c2 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -2907,8 +2907,8 @@ struct redisplay_interface
2907 2907
2908struct image_type 2908struct image_type
2909{ 2909{
2910 /* A symbol uniquely identifying the image type, .e.g `jpeg'. */ 2910 /* A symbol uniquely identifying the image type, e.g., 'jpeg'. */
2911 Lisp_Object *type; 2911 struct Lisp_Symbol *type;
2912 2912
2913 /* Check that SPEC is a valid image specification for the given 2913 /* Check that SPEC is a valid image specification for the given
2914 image type. Value is true if SPEC is valid. */ 2914 image type. Value is true if SPEC is valid. */
@@ -3222,7 +3222,6 @@ void move_it_in_display_line (struct it *it,
3222 enum move_operation_enum op); 3222 enum move_operation_enum op);
3223bool in_display_vector_p (struct it *); 3223bool in_display_vector_p (struct it *);
3224int frame_mode_line_height (struct frame *); 3224int frame_mode_line_height (struct frame *);
3225extern Lisp_Object Qtool_bar;
3226extern bool redisplaying_p; 3225extern bool redisplaying_p;
3227extern bool help_echo_showing_p; 3226extern bool help_echo_showing_p;
3228extern Lisp_Object help_echo_string, help_echo_window; 3227extern Lisp_Object help_echo_string, help_echo_window;
@@ -3402,7 +3401,6 @@ int face_at_string_position (struct window *w, Lisp_Object string,
3402int merge_faces (struct frame *, Lisp_Object, int, int); 3401int merge_faces (struct frame *, Lisp_Object, int, int);
3403int compute_char_face (struct frame *, int, Lisp_Object); 3402int compute_char_face (struct frame *, int, Lisp_Object);
3404void free_all_realized_faces (Lisp_Object); 3403void free_all_realized_faces (Lisp_Object);
3405extern Lisp_Object Qforeground_color, Qbackground_color;
3406extern char unspecified_fg[], unspecified_bg[]; 3404extern char unspecified_fg[], unspecified_bg[];
3407 3405
3408/* Defined in xfns.c. */ 3406/* Defined in xfns.c. */
@@ -3492,7 +3490,6 @@ void do_pending_window_change (bool);
3492void change_frame_size (struct frame *, int, int, bool, bool, bool, bool); 3490void change_frame_size (struct frame *, int, int, bool, bool, bool, bool);
3493void init_display (void); 3491void init_display (void);
3494void syms_of_display (void); 3492void syms_of_display (void);
3495extern Lisp_Object Qredisplay_dont_pause;
3496extern void spec_glyph_lookup_face (struct window *, GLYPH *); 3493extern void spec_glyph_lookup_face (struct window *, GLYPH *);
3497extern void fill_up_frame_row_with_spaces (struct glyph_row *, int); 3494extern void fill_up_frame_row_with_spaces (struct glyph_row *, int);
3498 3495
diff --git a/src/dispnew.c b/src/dispnew.c
index 197c0eedcaf..b998e654881 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -102,8 +102,6 @@ static void set_window_update_flags (struct window *w, bool on_p);
102 102
103bool display_completed; 103bool display_completed;
104 104
105Lisp_Object Qdisplay_table, Qredisplay_dont_pause;
106
107/* True means SIGWINCH happened when not safe. */ 105/* True means SIGWINCH happened when not safe. */
108 106
109static bool delayed_size_change; 107static bool delayed_size_change;
@@ -6191,7 +6189,9 @@ syms_of_display (void)
6191 frame_and_buffer_state = Fmake_vector (make_number (20), Qlambda); 6189 frame_and_buffer_state = Fmake_vector (make_number (20), Qlambda);
6192 staticpro (&frame_and_buffer_state); 6190 staticpro (&frame_and_buffer_state);
6193 6191
6192 /* This is the "purpose" slot of a display table. */
6194 DEFSYM (Qdisplay_table, "display-table"); 6193 DEFSYM (Qdisplay_table, "display-table");
6194
6195 DEFSYM (Qredisplay_dont_pause, "redisplay-dont-pause"); 6195 DEFSYM (Qredisplay_dont_pause, "redisplay-dont-pause");
6196 6196
6197 DEFVAR_INT ("baud-rate", baud_rate, 6197 DEFVAR_INT ("baud-rate", baud_rate,
diff --git a/src/disptab.h b/src/disptab.h
index cea040fe8aa..7afc862312a 100644
--- a/src/disptab.h
+++ b/src/disptab.h
@@ -48,9 +48,6 @@ extern struct Lisp_Char_Table *window_display_table (struct window *);
48/* Defined in indent.c. */ 48/* Defined in indent.c. */
49extern struct Lisp_Char_Table *buffer_display_table (void); 49extern struct Lisp_Char_Table *buffer_display_table (void);
50 50
51/* This is the `purpose' slot of a display table. */
52extern Lisp_Object Qdisplay_table;
53
54/* Return the current length of the GLYPH table, 51/* Return the current length of the GLYPH table,
55 or 0 if the table isn't currently valid. */ 52 or 0 if the table isn't currently valid. */
56#define GLYPH_TABLE_LENGTH \ 53#define GLYPH_TABLE_LENGTH \
diff --git a/src/doc.c b/src/doc.c
index 33594442152..a6ef84b4db6 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -35,8 +35,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
35#include "keyboard.h" 35#include "keyboard.h"
36#include "keymap.h" 36#include "keymap.h"
37 37
38Lisp_Object Qfunction_documentation;
39
40/* Buffer used for reading from documentation file. */ 38/* Buffer used for reading from documentation file. */
41static char *get_doc_string_buffer; 39static char *get_doc_string_buffer;
42static ptrdiff_t get_doc_string_buffer_size; 40static ptrdiff_t get_doc_string_buffer_size;
diff --git a/src/dosfns.c b/src/dosfns.c
index 8c0fed2230f..e506e9fbe14 100644
--- a/src/dosfns.c
+++ b/src/dosfns.c
@@ -409,8 +409,6 @@ msdos_stdcolor_idx (const char *name)
409Lisp_Object 409Lisp_Object
410msdos_stdcolor_name (int idx) 410msdos_stdcolor_name (int idx)
411{ 411{
412 extern Lisp_Object Qunspecified;
413
414 if (idx == FACE_TTY_DEFAULT_FG_COLOR) 412 if (idx == FACE_TTY_DEFAULT_FG_COLOR)
415 return build_string (unspecified_fg); 413 return build_string (unspecified_fg);
416 else if (idx == FACE_TTY_DEFAULT_BG_COLOR) 414 else if (idx == FACE_TTY_DEFAULT_BG_COLOR)
diff --git a/src/editfns.c b/src/editfns.c
index 37f85b3ada3..cd15f6569aa 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -76,16 +76,6 @@ static void update_buffer_properties (ptrdiff_t, ptrdiff_t);
76# define HAVE_TM_GMTOFF false 76# define HAVE_TM_GMTOFF false
77#endif 77#endif
78 78
79static Lisp_Object Qbuffer_access_fontify_functions;
80
81/* Symbol for the text property used to mark fields. */
82
83Lisp_Object Qfield;
84
85/* A special value for Qfield properties. */
86
87static Lisp_Object Qboundary;
88
89/* The startup value of the TZ environment variable; null if unset. */ 79/* The startup value of the TZ environment variable; null if unset. */
90static char const *initial_tz; 80static char const *initial_tz;
91 81
@@ -915,17 +905,11 @@ save_excursion_restore (Lisp_Object info)
915 if (! NILP (tem)) 905 if (! NILP (tem))
916 { 906 {
917 if (! EQ (omark, nmark)) 907 if (! EQ (omark, nmark))
918 { 908 run_hook (intern ("activate-mark-hook"));
919 tem = intern ("activate-mark-hook");
920 Frun_hooks (1, &tem);
921 }
922 } 909 }
923 /* If mark has ceased to be active, run deactivate hook. */ 910 /* If mark has ceased to be active, run deactivate hook. */
924 else if (! NILP (tem1)) 911 else if (! NILP (tem1))
925 { 912 run_hook (intern ("deactivate-mark-hook"));
926 tem = intern ("deactivate-mark-hook");
927 Frun_hooks (1, &tem);
928 }
929 913
930 /* If buffer was visible in a window, and a different window was 914 /* If buffer was visible in a window, and a different window was
931 selected, and the old selected window is still showing this 915 selected, and the old selected window is still showing this
@@ -5009,8 +4993,12 @@ functions if all the text being accessed has this property. */);
5009 defsubr (&Sregion_beginning); 4993 defsubr (&Sregion_beginning);
5010 defsubr (&Sregion_end); 4994 defsubr (&Sregion_end);
5011 4995
4996 /* Symbol for the text property used to mark fields. */
5012 DEFSYM (Qfield, "field"); 4997 DEFSYM (Qfield, "field");
4998
4999 /* A special value for Qfield properties. */
5013 DEFSYM (Qboundary, "boundary"); 5000 DEFSYM (Qboundary, "boundary");
5001
5014 defsubr (&Sfield_beginning); 5002 defsubr (&Sfield_beginning);
5015 defsubr (&Sfield_end); 5003 defsubr (&Sfield_end);
5016 defsubr (&Sfield_string); 5004 defsubr (&Sfield_string);
diff --git a/src/emacs.c b/src/emacs.c
index 2a1374bc233..d09c3c36c8a 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -148,13 +148,6 @@ static bool malloc_using_checking;
148extern void malloc_enable_thread (void); 148extern void malloc_enable_thread (void);
149#endif 149#endif
150 150
151Lisp_Object Qfile_name_handler_alist;
152
153Lisp_Object Qrisky_local_variable;
154
155Lisp_Object Qkill_emacs;
156static Lisp_Object Qkill_emacs_hook;
157
158/* If true, Emacs should not attempt to use a window-specific code, 151/* If true, Emacs should not attempt to use a window-specific code,
159 but instead should use the virtual terminal under which it was started. */ 152 but instead should use the virtual terminal under which it was started. */
160bool inhibit_window_system; 153bool inhibit_window_system;
@@ -1913,7 +1906,7 @@ all of which are called before Emacs is actually killed. */)
1913 /* Fsignal calls emacs_abort () if it sees that waiting_for_input is 1906 /* Fsignal calls emacs_abort () if it sees that waiting_for_input is
1914 set. */ 1907 set. */
1915 waiting_for_input = 0; 1908 waiting_for_input = 0;
1916 Frun_hooks (1, &Qkill_emacs_hook); 1909 run_hook (Qkill_emacs_hook);
1917 UNGCPRO; 1910 UNGCPRO;
1918 1911
1919#ifdef HAVE_X_WINDOWS 1912#ifdef HAVE_X_WINDOWS
diff --git a/src/eval.c b/src/eval.c
index 4748712708f..7e4b016b236 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -38,22 +38,6 @@ struct handler *handlerlist;
38int gcpro_level; 38int gcpro_level;
39#endif 39#endif
40 40
41Lisp_Object Qautoload, Qmacro, Qexit, Qinteractive, Qcommandp;
42Lisp_Object Qinhibit_quit;
43Lisp_Object Qand_rest;
44static Lisp_Object Qand_optional;
45static Lisp_Object Qinhibit_debugger;
46static Lisp_Object Qdeclare;
47Lisp_Object Qinternal_interpreter_environment, Qclosure;
48
49static Lisp_Object Qdebug;
50
51/* This holds either the symbol `run-hooks' or nil.
52 It is nil at an early stage of startup, and when Emacs
53 is shutting down. */
54
55Lisp_Object Vrun_hooks;
56
57/* Non-nil means record all fset's and provide's, to be undone 41/* Non-nil means record all fset's and provide's, to be undone
58 if the file being autoloaded is not fully loaded. 42 if the file being autoloaded is not fully loaded.
59 They are recorded by being consed onto the front of Vautoload_queue: 43 They are recorded by being consed onto the front of Vautoload_queue:
@@ -61,6 +45,11 @@ Lisp_Object Vrun_hooks;
61 45
62Lisp_Object Vautoload_queue; 46Lisp_Object Vautoload_queue;
63 47
48/* This holds either the symbol `run-hooks' or nil.
49 It is nil at an early stage of startup, and when Emacs
50 is shutting down. */
51Lisp_Object Vrun_hooks;
52
64/* Current number of specbindings allocated in specpdl, not counting 53/* Current number of specbindings allocated in specpdl, not counting
65 the dummy entry specpdl[-1]. */ 54 the dummy entry specpdl[-1]. */
66 55
@@ -2363,14 +2352,10 @@ Instead, use `add-hook' and specify t for the LOCAL argument.
2363usage: (run-hooks &rest HOOKS) */) 2352usage: (run-hooks &rest HOOKS) */)
2364 (ptrdiff_t nargs, Lisp_Object *args) 2353 (ptrdiff_t nargs, Lisp_Object *args)
2365{ 2354{
2366 Lisp_Object hook[1];
2367 ptrdiff_t i; 2355 ptrdiff_t i;
2368 2356
2369 for (i = 0; i < nargs; i++) 2357 for (i = 0; i < nargs; i++)
2370 { 2358 run_hook (args[i]);
2371 hook[0] = args[i];
2372 run_hook_with_args (1, hook, funcall_nil);
2373 }
2374 2359
2375 return Qnil; 2360 return Qnil;
2376} 2361}
@@ -2536,6 +2521,14 @@ run_hook_with_args (ptrdiff_t nargs, Lisp_Object *args,
2536 } 2521 }
2537} 2522}
2538 2523
2524/* Run the hook HOOK, giving each function no args. */
2525
2526void
2527run_hook (Lisp_Object hook)
2528{
2529 Frun_hook_with_args (1, &hook);
2530}
2531
2539/* Run the hook HOOK, giving each function the two args ARG1 and ARG2. */ 2532/* Run the hook HOOK, giving each function the two args ARG1 and ARG2. */
2540 2533
2541void 2534void
@@ -3762,7 +3755,8 @@ alist of active lexical bindings. */);
3762 (Just imagine if someone makes it buffer-local). */ 3755 (Just imagine if someone makes it buffer-local). */
3763 Funintern (Qinternal_interpreter_environment, Qnil); 3756 Funintern (Qinternal_interpreter_environment, Qnil);
3764 3757
3765 DEFSYM (Vrun_hooks, "run-hooks"); 3758 Vrun_hooks = intern_c_string ("run-hooks");
3759 staticpro (&Vrun_hooks);
3766 3760
3767 staticpro (&Vautoload_queue); 3761 staticpro (&Vautoload_queue);
3768 Vautoload_queue = Qnil; 3762 Vautoload_queue = Qnil;
diff --git a/src/fileio.c b/src/fileio.c
index 0f0fd1a5c8d..15c6f9123a2 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -113,50 +113,10 @@ static bool auto_save_error_occurred;
113static bool valid_timestamp_file_system; 113static bool valid_timestamp_file_system;
114static dev_t timestamp_file_system; 114static dev_t timestamp_file_system;
115 115
116/* The symbol bound to coding-system-for-read when
117 insert-file-contents is called for recovering a file. This is not
118 an actual coding system name, but just an indicator to tell
119 insert-file-contents to use `emacs-mule' with a special flag for
120 auto saving and recovering a file. */
121static Lisp_Object Qauto_save_coding;
122
123/* Property name of a file name handler,
124 which gives a list of operations it handles.. */
125static Lisp_Object Qoperations;
126
127/* Lisp functions for translating file formats. */
128static Lisp_Object Qformat_decode, Qformat_annotate_function;
129
130/* Lisp function for setting buffer-file-coding-system and the
131 multibyteness of the current buffer after inserting a file. */
132static Lisp_Object Qafter_insert_file_set_coding;
133
134static Lisp_Object Qwrite_region_annotate_functions;
135/* Each time an annotation function changes the buffer, the new buffer 116/* Each time an annotation function changes the buffer, the new buffer
136 is added here. */ 117 is added here. */
137static Lisp_Object Vwrite_region_annotation_buffers; 118static Lisp_Object Vwrite_region_annotation_buffers;
138 119
139static Lisp_Object Qdelete_by_moving_to_trash;
140
141/* Lisp function for moving files to trash. */
142static Lisp_Object Qmove_file_to_trash;
143
144/* Lisp function for recursively copying directories. */
145static Lisp_Object Qcopy_directory;
146
147/* Lisp function for recursively deleting directories. */
148static Lisp_Object Qdelete_directory;
149
150static Lisp_Object Qsubstitute_env_in_file_name;
151static Lisp_Object Qget_buffer_window_list;
152
153Lisp_Object Qfile_error, Qfile_notify_error;
154static Lisp_Object Qfile_already_exists, Qfile_date_error;
155static Lisp_Object Qexcl;
156Lisp_Object Qfile_name_history;
157
158static Lisp_Object Qcar_less_than_car;
159
160static bool a_write (int, Lisp_Object, ptrdiff_t, ptrdiff_t, 120static bool a_write (int, Lisp_Object, ptrdiff_t, ptrdiff_t,
161 Lisp_Object *, struct coding_system *); 121 Lisp_Object *, struct coding_system *);
162static bool e_write (int, Lisp_Object, ptrdiff_t, ptrdiff_t, 122static bool e_write (int, Lisp_Object, ptrdiff_t, ptrdiff_t,
@@ -291,43 +251,6 @@ restore_point_unwind (Lisp_Object location)
291} 251}
292 252
293 253
294static Lisp_Object Qexpand_file_name;
295static Lisp_Object Qsubstitute_in_file_name;
296static Lisp_Object Qdirectory_file_name;
297static Lisp_Object Qfile_name_directory;
298static Lisp_Object Qfile_name_nondirectory;
299static Lisp_Object Qunhandled_file_name_directory;
300static Lisp_Object Qfile_name_as_directory;
301static Lisp_Object Qcopy_file;
302static Lisp_Object Qmake_directory_internal;
303static Lisp_Object Qmake_directory;
304static Lisp_Object Qdelete_directory_internal;
305Lisp_Object Qdelete_file;
306static Lisp_Object Qrename_file;
307static Lisp_Object Qadd_name_to_file;
308static Lisp_Object Qmake_symbolic_link;
309Lisp_Object Qfile_exists_p;
310static Lisp_Object Qfile_executable_p;
311static Lisp_Object Qfile_readable_p;
312static Lisp_Object Qfile_writable_p;
313static Lisp_Object Qfile_symlink_p;
314static Lisp_Object Qaccess_file;
315Lisp_Object Qfile_directory_p;
316static Lisp_Object Qfile_regular_p;
317static Lisp_Object Qfile_accessible_directory_p;
318static Lisp_Object Qfile_modes;
319static Lisp_Object Qset_file_modes;
320static Lisp_Object Qset_file_times;
321static Lisp_Object Qfile_selinux_context;
322static Lisp_Object Qset_file_selinux_context;
323static Lisp_Object Qfile_acl;
324static Lisp_Object Qset_file_acl;
325static Lisp_Object Qfile_newer_than_file_p;
326Lisp_Object Qinsert_file_contents;
327Lisp_Object Qwrite_region;
328static Lisp_Object Qverify_visited_file_modtime;
329static Lisp_Object Qset_visited_file_modtime;
330
331DEFUN ("find-file-name-handler", Ffind_file_name_handler, 254DEFUN ("find-file-name-handler", Ffind_file_name_handler,
332 Sfind_file_name_handler, 2, 2, 0, 255 Sfind_file_name_handler, 2, 2, 0,
333 doc: /* Return FILENAME's handler function for OPERATION, if it has one. 256 doc: /* Return FILENAME's handler function for OPERATION, if it has one.
@@ -5866,7 +5789,10 @@ init_fileio (void)
5866void 5789void
5867syms_of_fileio (void) 5790syms_of_fileio (void)
5868{ 5791{
5792 /* Property name of a file name handler,
5793 which gives a list of operations it handles. */
5869 DEFSYM (Qoperations, "operations"); 5794 DEFSYM (Qoperations, "operations");
5795
5870 DEFSYM (Qexpand_file_name, "expand-file-name"); 5796 DEFSYM (Qexpand_file_name, "expand-file-name");
5871 DEFSYM (Qsubstitute_in_file_name, "substitute-in-file-name"); 5797 DEFSYM (Qsubstitute_in_file_name, "substitute-in-file-name");
5872 DEFSYM (Qdirectory_file_name, "directory-file-name"); 5798 DEFSYM (Qdirectory_file_name, "directory-file-name");
@@ -5903,6 +5829,12 @@ syms_of_fileio (void)
5903 DEFSYM (Qwrite_region, "write-region"); 5829 DEFSYM (Qwrite_region, "write-region");
5904 DEFSYM (Qverify_visited_file_modtime, "verify-visited-file-modtime"); 5830 DEFSYM (Qverify_visited_file_modtime, "verify-visited-file-modtime");
5905 DEFSYM (Qset_visited_file_modtime, "set-visited-file-modtime"); 5831 DEFSYM (Qset_visited_file_modtime, "set-visited-file-modtime");
5832
5833 /* The symbol bound to coding-system-for-read when
5834 insert-file-contents is called for recovering a file. This is not
5835 an actual coding system name, but just an indicator to tell
5836 insert-file-contents to use `emacs-mule' with a special flag for
5837 auto saving and recovering a file. */
5906 DEFSYM (Qauto_save_coding, "auto-save-coding"); 5838 DEFSYM (Qauto_save_coding, "auto-save-coding");
5907 5839
5908 DEFSYM (Qfile_name_history, "file-name-history"); 5840 DEFSYM (Qfile_name_history, "file-name-history");
@@ -5938,9 +5870,14 @@ On MS-Windows, the value of this variable is largely ignored if
5938behaves as if file names were encoded in `utf-8'. */); 5870behaves as if file names were encoded in `utf-8'. */);
5939 Vdefault_file_name_coding_system = Qnil; 5871 Vdefault_file_name_coding_system = Qnil;
5940 5872
5873 /* Lisp functions for translating file formats. */
5941 DEFSYM (Qformat_decode, "format-decode"); 5874 DEFSYM (Qformat_decode, "format-decode");
5942 DEFSYM (Qformat_annotate_function, "format-annotate-function"); 5875 DEFSYM (Qformat_annotate_function, "format-annotate-function");
5876
5877 /* Lisp function for setting buffer-file-coding-system and the
5878 multibyteness of the current buffer after inserting a file. */
5943 DEFSYM (Qafter_insert_file_set_coding, "after-insert-file-set-coding"); 5879 DEFSYM (Qafter_insert_file_set_coding, "after-insert-file-set-coding");
5880
5944 DEFSYM (Qcar_less_than_car, "car-less-than-car"); 5881 DEFSYM (Qcar_less_than_car, "car-less-than-car");
5945 5882
5946 Fput (Qfile_error, Qerror_conditions, 5883 Fput (Qfile_error, Qerror_conditions,
@@ -6094,11 +6031,17 @@ When non-nil, certain file deletion commands use the function
6094This includes interactive calls to `delete-file' and 6031This includes interactive calls to `delete-file' and
6095`delete-directory' and the Dired deletion commands. */); 6032`delete-directory' and the Dired deletion commands. */);
6096 delete_by_moving_to_trash = 0; 6033 delete_by_moving_to_trash = 0;
6097 Qdelete_by_moving_to_trash = intern_c_string ("delete-by-moving-to-trash"); 6034 DEFSYM (Qdelete_by_moving_to_trash, "delete-by-moving-to-trash");
6098 6035
6036 /* Lisp function for moving files to trash. */
6099 DEFSYM (Qmove_file_to_trash, "move-file-to-trash"); 6037 DEFSYM (Qmove_file_to_trash, "move-file-to-trash");
6038
6039 /* Lisp function for recursively copying directories. */
6100 DEFSYM (Qcopy_directory, "copy-directory"); 6040 DEFSYM (Qcopy_directory, "copy-directory");
6041
6042 /* Lisp function for recursively deleting directories. */
6101 DEFSYM (Qdelete_directory, "delete-directory"); 6043 DEFSYM (Qdelete_directory, "delete-directory");
6044
6102 DEFSYM (Qsubstitute_env_in_file_name, "substitute-env-in-file-name"); 6045 DEFSYM (Qsubstitute_env_in_file_name, "substitute-env-in-file-name");
6103 DEFSYM (Qget_buffer_window_list, "get-buffer-window-list"); 6046 DEFSYM (Qget_buffer_window_list, "get-buffer-window-list");
6104 6047
diff --git a/src/fns.c b/src/fns.c
index 9c9501a4989..7739663b775 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -41,16 +41,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
41#include "xterm.h" 41#include "xterm.h"
42#endif 42#endif
43 43
44Lisp_Object Qstring_lessp;
45static Lisp_Object Qstring_collate_lessp, Qstring_collate_equalp;
46static Lisp_Object Qprovide, Qrequire;
47static Lisp_Object Qyes_or_no_p_history;
48Lisp_Object Qcursor_in_echo_area;
49static Lisp_Object Qwidget_type;
50static Lisp_Object Qcodeset, Qdays, Qmonths, Qpaper;
51
52static Lisp_Object Qmd5, Qsha1, Qsha224, Qsha256, Qsha384, Qsha512;
53
54static void sort_vector_copy (Lisp_Object, ptrdiff_t, 44static void sort_vector_copy (Lisp_Object, ptrdiff_t,
55 Lisp_Object [restrict], Lisp_Object [restrict]); 45 Lisp_Object [restrict], Lisp_Object [restrict]);
56static bool internal_equal (Lisp_Object, Lisp_Object, int, bool, Lisp_Object); 46static bool internal_equal (Lisp_Object, Lisp_Object, int, bool, Lisp_Object);
@@ -2788,8 +2778,6 @@ advisable. */)
2788 return ret; 2778 return ret;
2789} 2779}
2790 2780
2791static Lisp_Object Qsubfeatures;
2792
2793DEFUN ("featurep", Ffeaturep, Sfeaturep, 1, 2, 0, 2781DEFUN ("featurep", Ffeaturep, Sfeaturep, 1, 2, 0,
2794 doc: /* Return t if FEATURE is present in this Emacs. 2782 doc: /* Return t if FEATURE is present in this Emacs.
2795 2783
@@ -2808,8 +2796,6 @@ SUBFEATURE can be used to check a specific subfeature of FEATURE. */)
2808 return (NILP (tem)) ? Qnil : Qt; 2796 return (NILP (tem)) ? Qnil : Qt;
2809} 2797}
2810 2798
2811static Lisp_Object Qfuncall;
2812
2813DEFUN ("provide", Fprovide, Sprovide, 1, 2, 0, 2799DEFUN ("provide", Fprovide, Sprovide, 1, 2, 0,
2814 doc: /* Announce that FEATURE is a feature of the current Emacs. 2800 doc: /* Announce that FEATURE is a feature of the current Emacs.
2815The optional argument SUBFEATURES should be a list of symbols listing 2801The optional argument SUBFEATURES should be a list of symbols listing
@@ -3596,14 +3582,6 @@ base64_decode_1 (const char *from, char *to, ptrdiff_t length,
3596 3582
3597static struct Lisp_Hash_Table *weak_hash_tables; 3583static struct Lisp_Hash_Table *weak_hash_tables;
3598 3584
3599/* Various symbols. */
3600
3601static Lisp_Object Qhash_table_p;
3602static Lisp_Object Qkey, Qvalue, Qeql;
3603Lisp_Object Qeq, Qequal;
3604Lisp_Object QCtest, QCsize, QCrehash_size, QCrehash_threshold, QCweakness;
3605static Lisp_Object Qhash_table_test, Qkey_or_value, Qkey_and_value;
3606
3607 3585
3608/*********************************************************************** 3586/***********************************************************************
3609 Utilities 3587 Utilities
diff --git a/src/font.c b/src/font.c
index dea18a1e939..60134b1de5b 100644
--- a/src/font.c
+++ b/src/font.c
@@ -41,16 +41,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
41#include TERM_HEADER 41#include TERM_HEADER
42#endif /* HAVE_WINDOW_SYSTEM */ 42#endif /* HAVE_WINDOW_SYSTEM */
43 43
44Lisp_Object Qopentype;
45
46/* Important character set strings. */
47Lisp_Object Qascii_0, Qiso8859_1, Qiso10646_1, Qunicode_bmp, Qunicode_sip;
48
49#define DEFAULT_ENCODING Qiso8859_1 44#define DEFAULT_ENCODING Qiso8859_1
50 45
51/* Unicode category `Cf'. */
52static Lisp_Object QCf;
53
54/* Vector of Vfont_weight_table, Vfont_slant_table, and Vfont_width_table. */ 46/* Vector of Vfont_weight_table, Vfont_slant_table, and Vfont_width_table. */
55static Lisp_Object font_style_table; 47static Lisp_Object font_style_table;
56 48
@@ -110,21 +102,6 @@ static const struct table_entry width_table[] =
110 { 200, { "ultra-expanded", "ultraexpanded", "wide" }} 102 { 200, { "ultra-expanded", "ultraexpanded", "wide" }}
111}; 103};
112 104
113Lisp_Object QCfoundry;
114static Lisp_Object QCadstyle, QCregistry;
115/* Symbols representing keys of font extra info. */
116Lisp_Object QCspacing, QCdpi, QCscalable, QCotf, QClang, QCscript, QCavgwidth;
117Lisp_Object QCantialias, QCfont_entity;
118static Lisp_Object QCfc_unknown_spec;
119/* Symbols representing values of font spacing property. */
120static Lisp_Object Qc, Qm, Qd;
121Lisp_Object Qp;
122/* Special ADSTYLE properties to avoid fonts used for Latin
123 characters; used in xfont.c and ftfont.c. */
124Lisp_Object Qja, Qko;
125
126static Lisp_Object QCuser_spec;
127
128/* Alist of font registry symbols and the corresponding charset 105/* Alist of font registry symbols and the corresponding charset
129 information. The information is retrieved from 106 information. The information is retrieved from
130 Vfont_encoding_alist on demand. 107 Vfont_encoding_alist on demand.
@@ -309,7 +286,7 @@ font_intern_prop (const char *str, ptrdiff_t len, bool force_symbol)
309 return tem; 286 return tem;
310 name = make_specified_string (str, nchars, len, 287 name = make_specified_string (str, nchars, len,
311 len != nchars && len == nbytes); 288 len != nchars && len == nbytes);
312 return intern_driver (name, obarray, XINT (tem)); 289 return intern_driver (name, obarray, tem);
313} 290}
314 291
315/* Return a pixel size of font-spec SPEC on frame F. */ 292/* Return a pixel size of font-spec SPEC on frame F. */
@@ -663,29 +640,29 @@ font_prop_validate_otf (Lisp_Object prop, Lisp_Object val)
663static const struct 640static const struct
664{ 641{
665 /* Pointer to the key symbol. */ 642 /* Pointer to the key symbol. */
666 Lisp_Object *key; 643 struct Lisp_Symbol *key;
667 /* Function to validate PROP's value VAL, or NULL if any value is 644 /* Function to validate PROP's value VAL, or NULL if any value is
668 ok. The value is VAL or its regularized value if VAL is valid, 645 ok. The value is VAL or its regularized value if VAL is valid,
669 and Qerror if not. */ 646 and Qerror if not. */
670 Lisp_Object (*validator) (Lisp_Object prop, Lisp_Object val); 647 Lisp_Object (*validator) (Lisp_Object prop, Lisp_Object val);
671} font_property_table[] = 648} font_property_table[] =
672 { { &QCtype, font_prop_validate_symbol }, 649 { { XSYMBOL_INIT (QCtype), font_prop_validate_symbol },
673 { &QCfoundry, font_prop_validate_symbol }, 650 { XSYMBOL_INIT (QCfoundry), font_prop_validate_symbol },
674 { &QCfamily, font_prop_validate_symbol }, 651 { XSYMBOL_INIT (QCfamily), font_prop_validate_symbol },
675 { &QCadstyle, font_prop_validate_symbol }, 652 { XSYMBOL_INIT (QCadstyle), font_prop_validate_symbol },
676 { &QCregistry, font_prop_validate_symbol }, 653 { XSYMBOL_INIT (QCregistry), font_prop_validate_symbol },
677 { &QCweight, font_prop_validate_style }, 654 { XSYMBOL_INIT (QCweight), font_prop_validate_style },
678 { &QCslant, font_prop_validate_style }, 655 { XSYMBOL_INIT (QCslant), font_prop_validate_style },
679 { &QCwidth, font_prop_validate_style }, 656 { XSYMBOL_INIT (QCwidth), font_prop_validate_style },
680 { &QCsize, font_prop_validate_non_neg }, 657 { XSYMBOL_INIT (QCsize), font_prop_validate_non_neg },
681 { &QCdpi, font_prop_validate_non_neg }, 658 { XSYMBOL_INIT (QCdpi), font_prop_validate_non_neg },
682 { &QCspacing, font_prop_validate_spacing }, 659 { XSYMBOL_INIT (QCspacing), font_prop_validate_spacing },
683 { &QCavgwidth, font_prop_validate_non_neg }, 660 { XSYMBOL_INIT (QCavgwidth), font_prop_validate_non_neg },
684 /* The order of the above entries must match with enum 661 /* The order of the above entries must match with enum
685 font_property_index. */ 662 font_property_index. */
686 { &QClang, font_prop_validate_symbol }, 663 { XSYMBOL_INIT (QClang), font_prop_validate_symbol },
687 { &QCscript, font_prop_validate_symbol }, 664 { XSYMBOL_INIT (QCscript), font_prop_validate_symbol },
688 { &QCotf, font_prop_validate_otf } 665 { XSYMBOL_INIT (QCotf), font_prop_validate_otf }
689 }; 666 };
690 667
691/* Return an index number of font property KEY or -1 if KEY is not an 668/* Return an index number of font property KEY or -1 if KEY is not an
@@ -697,7 +674,7 @@ get_font_prop_index (Lisp_Object key)
697 int i; 674 int i;
698 675
699 for (i = 0; i < ARRAYELTS (font_property_table); i++) 676 for (i = 0; i < ARRAYELTS (font_property_table); i++)
700 if (EQ (key, *font_property_table[i].key)) 677 if (EQ (key, make_lisp_symbol (font_property_table[i].key)))
701 return i; 678 return i;
702 return -1; 679 return -1;
703} 680}
@@ -714,7 +691,7 @@ font_prop_validate (int idx, Lisp_Object prop, Lisp_Object val)
714 if (NILP (val)) 691 if (NILP (val))
715 return val; 692 return val;
716 if (NILP (prop)) 693 if (NILP (prop))
717 prop = *font_property_table[idx].key; 694 prop = make_lisp_symbol (font_property_table[idx].key);
718 else 695 else
719 { 696 {
720 idx = get_font_prop_index (prop); 697 idx = get_font_prop_index (prop);
@@ -5169,19 +5146,21 @@ syms_of_font (void)
5169 5146
5170 DEFSYM (Qopentype, "opentype"); 5147 DEFSYM (Qopentype, "opentype");
5171 5148
5149 /* Important character set symbols. */
5172 DEFSYM (Qascii_0, "ascii-0"); 5150 DEFSYM (Qascii_0, "ascii-0");
5173 DEFSYM (Qiso8859_1, "iso8859-1"); 5151 DEFSYM (Qiso8859_1, "iso8859-1");
5174 DEFSYM (Qiso10646_1, "iso10646-1"); 5152 DEFSYM (Qiso10646_1, "iso10646-1");
5175 DEFSYM (Qunicode_bmp, "unicode-bmp"); 5153 DEFSYM (Qunicode_bmp, "unicode-bmp");
5176 DEFSYM (Qunicode_sip, "unicode-sip"); 5154 DEFSYM (Qunicode_sip, "unicode-sip");
5177 5155
5156 /* Unicode category `Cf'. */
5178 DEFSYM (QCf, "Cf"); 5157 DEFSYM (QCf, "Cf");
5179 5158
5159 /* Symbols representing keys of font extra info. */
5180 DEFSYM (QCotf, ":otf"); 5160 DEFSYM (QCotf, ":otf");
5181 DEFSYM (QClang, ":lang"); 5161 DEFSYM (QClang, ":lang");
5182 DEFSYM (QCscript, ":script"); 5162 DEFSYM (QCscript, ":script");
5183 DEFSYM (QCantialias, ":antialias"); 5163 DEFSYM (QCantialias, ":antialias");
5184
5185 DEFSYM (QCfoundry, ":foundry"); 5164 DEFSYM (QCfoundry, ":foundry");
5186 DEFSYM (QCadstyle, ":adstyle"); 5165 DEFSYM (QCadstyle, ":adstyle");
5187 DEFSYM (QCregistry, ":registry"); 5166 DEFSYM (QCregistry, ":registry");
@@ -5192,11 +5171,14 @@ syms_of_font (void)
5192 DEFSYM (QCfont_entity, ":font-entity"); 5171 DEFSYM (QCfont_entity, ":font-entity");
5193 DEFSYM (QCfc_unknown_spec, ":fc-unknown-spec"); 5172 DEFSYM (QCfc_unknown_spec, ":fc-unknown-spec");
5194 5173
5174 /* Symbols representing values of font spacing property. */
5195 DEFSYM (Qc, "c"); 5175 DEFSYM (Qc, "c");
5196 DEFSYM (Qm, "m"); 5176 DEFSYM (Qm, "m");
5197 DEFSYM (Qp, "p"); 5177 DEFSYM (Qp, "p");
5198 DEFSYM (Qd, "d"); 5178 DEFSYM (Qd, "d");
5199 5179
5180 /* Special ADSTYLE properties to avoid fonts used for Latin
5181 characters; used in xfont.c and ftfont.c. */
5200 DEFSYM (Qja, "ja"); 5182 DEFSYM (Qja, "ja");
5201 DEFSYM (Qko, "ko"); 5183 DEFSYM (Qko, "ko");
5202 5184
diff --git a/src/font.h b/src/font.h
index 617860c85f1..d12ae2c09bb 100644
--- a/src/font.h
+++ b/src/font.h
@@ -56,7 +56,6 @@ INLINE_HEADER_BEGIN
56 Note: Only the method `open' of a font-driver can create this 56 Note: Only the method `open' of a font-driver can create this
57 object, and it should never be modified by Lisp. */ 57 object, and it should never be modified by Lisp. */
58 58
59extern Lisp_Object Qfont_spec, Qfont_entity, Qfont_object;
60 59
61/* An enumerator for each font property. This is used as an index to 60/* An enumerator for each font property. This is used as an index to
62 the vector of FONT-SPEC and FONT-ENTITY. 61 the vector of FONT-SPEC and FONT-ENTITY.
@@ -239,17 +238,6 @@ enum font_property_index
239#define FONT_BASE(f) ((f)->ascent) 238#define FONT_BASE(f) ((f)->ascent)
240#define FONT_DESCENT(f) ((f)->descent) 239#define FONT_DESCENT(f) ((f)->descent)
241 240
242extern Lisp_Object QCspacing, QCdpi, QCscalable, QCotf, QClang, QCscript;
243extern Lisp_Object QCavgwidth, QCantialias, QCfont_entity;
244extern Lisp_Object Qp;
245
246
247/* Important character set symbols. */
248extern Lisp_Object Qascii_0;
249extern Lisp_Object Qiso8859_1, Qiso10646_1, Qunicode_bmp, Qunicode_sip;
250
251/* Special ADSTYLE properties to avoid fonts used for Latin characters. */
252extern Lisp_Object Qja, Qko;
253 241
254/* Structure for a font-spec. */ 242/* Structure for a font-spec. */
255 243
@@ -791,7 +779,6 @@ extern struct font_driver xfont_driver;
791extern void syms_of_xfont (void); 779extern void syms_of_xfont (void);
792extern void syms_of_ftxfont (void); 780extern void syms_of_ftxfont (void);
793#ifdef HAVE_XFT 781#ifdef HAVE_XFT
794extern Lisp_Object Qxft;
795extern struct font_driver xftfont_driver; 782extern struct font_driver xftfont_driver;
796extern void syms_of_xftfont (void); 783extern void syms_of_xftfont (void);
797#endif 784#endif
@@ -808,7 +795,6 @@ extern struct font_driver uniscribe_font_driver;
808extern void syms_of_w32font (void); 795extern void syms_of_w32font (void);
809#endif /* HAVE_NTGUI */ 796#endif /* HAVE_NTGUI */
810#ifdef HAVE_NS 797#ifdef HAVE_NS
811extern Lisp_Object Qfontsize;
812extern struct font_driver nsfont_driver; 798extern struct font_driver nsfont_driver;
813extern void syms_of_nsfont (void); 799extern void syms_of_nsfont (void);
814extern void syms_of_macfont (void); 800extern void syms_of_macfont (void);
@@ -818,8 +804,6 @@ extern void syms_of_macfont (void);
818#define FONT_DEBUG 804#define FONT_DEBUG
819#endif 805#endif
820 806
821extern Lisp_Object QCfoundry;
822
823extern void font_add_log (const char *, Lisp_Object, Lisp_Object); 807extern void font_add_log (const char *, Lisp_Object, Lisp_Object);
824extern void font_deferred_log (const char *, Lisp_Object, Lisp_Object); 808extern void font_deferred_log (const char *, Lisp_Object, Lisp_Object);
825 809
diff --git a/src/fontset.c b/src/fontset.c
index 974b144c259..b257da117b6 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -152,11 +152,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
152 152
153/********** VARIABLES and FUNCTION PROTOTYPES **********/ 153/********** VARIABLES and FUNCTION PROTOTYPES **********/
154 154
155static Lisp_Object Qfontset;
156static Lisp_Object Qfontset_info;
157static Lisp_Object Qprepend, Qappend;
158Lisp_Object Qlatin;
159
160/* Vector containing all fontsets. */ 155/* Vector containing all fontsets. */
161static Lisp_Object Vfontset_table; 156static Lisp_Object Vfontset_table;
162 157
diff --git a/src/fontset.h b/src/fontset.h
index e743555ef76..610394431e1 100644
--- a/src/fontset.h
+++ b/src/fontset.h
@@ -36,7 +36,6 @@ extern int fontset_from_font (Lisp_Object);
36extern int fs_query_fontset (Lisp_Object, int); 36extern int fs_query_fontset (Lisp_Object, int);
37extern Lisp_Object list_fontsets (struct frame *, Lisp_Object, int); 37extern Lisp_Object list_fontsets (struct frame *, Lisp_Object, int);
38 38
39extern Lisp_Object Qlatin;
40extern Lisp_Object fontset_name (int); 39extern Lisp_Object fontset_name (int);
41extern Lisp_Object fontset_ascii (int); 40extern Lisp_Object fontset_ascii (int);
42 41
diff --git a/src/frame.c b/src/frame.c
index 9394ae481f5..fb9bf2e9cbb 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -55,76 +55,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
55#include "widget.h" 55#include "widget.h"
56#endif 56#endif
57 57
58#ifdef HAVE_NS
59Lisp_Object Qns_parse_geometry;
60#endif
61
62Lisp_Object Qframep, Qframe_live_p;
63Lisp_Object Qicon, Qmodeline;
64Lisp_Object Qonly, Qnone;
65Lisp_Object Qx, Qw32, Qpc, Qns;
66Lisp_Object Qvisible;
67Lisp_Object Qdisplay_type;
68static Lisp_Object Qbackground_mode;
69Lisp_Object Qnoelisp;
70
71static Lisp_Object Qx_frame_parameter;
72Lisp_Object Qx_resource_name;
73Lisp_Object Qterminal;
74
75/* Frame parameters (set or reported). */
76
77Lisp_Object Qauto_raise, Qauto_lower;
78Lisp_Object Qborder_color, Qborder_width;
79Lisp_Object Qcursor_color, Qcursor_type;
80Lisp_Object Qheight, Qwidth;
81Lisp_Object Qicon_left, Qicon_top, Qicon_type, Qicon_name;
82Lisp_Object Qtooltip;
83Lisp_Object Qinternal_border_width;
84Lisp_Object Qright_divider_width, Qbottom_divider_width;
85Lisp_Object Qmouse_color;
86Lisp_Object Qminibuffer;
87Lisp_Object Qscroll_bar_width, Qvertical_scroll_bars;
88Lisp_Object Qscroll_bar_height, Qhorizontal_scroll_bars;
89Lisp_Object Qvisibility;
90Lisp_Object Qscroll_bar_foreground, Qscroll_bar_background;
91Lisp_Object Qscreen_gamma;
92Lisp_Object Qline_spacing;
93static Lisp_Object Quser_position, Quser_size;
94Lisp_Object Qwait_for_wm;
95static Lisp_Object Qwindow_id;
96#ifdef HAVE_X_WINDOWS
97static Lisp_Object Qouter_window_id;
98#endif
99Lisp_Object Qparent_id;
100Lisp_Object Qtitle, Qname;
101static Lisp_Object Qexplicit_name;
102Lisp_Object Qunsplittable;
103Lisp_Object Qmenu_bar_lines, Qtool_bar_lines, Qtool_bar_position;
104Lisp_Object Qleft_fringe, Qright_fringe;
105Lisp_Object Qbuffer_predicate;
106static Lisp_Object Qbuffer_list, Qburied_buffer_list;
107Lisp_Object Qtty_color_mode;
108Lisp_Object Qtty, Qtty_type;
109
110Lisp_Object Qfullscreen, Qfullwidth, Qfullheight, Qfullboth, Qmaximized;
111Lisp_Object Qsticky;
112Lisp_Object Qfont_backend;
113Lisp_Object Qalpha;
114
115Lisp_Object Qface_set_after_frame_default;
116
117static Lisp_Object Qfocus_in_hook;
118static Lisp_Object Qfocus_out_hook;
119static Lisp_Object Qdelete_frame_functions;
120static Lisp_Object Qframe_windows_min_size;
121static Lisp_Object Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource;
122
123Lisp_Object Qframe_position, Qframe_outer_size, Qframe_inner_size;
124Lisp_Object Qexternal_border_size, Qtitle_height;
125Lisp_Object Qmenu_bar_external, Qmenu_bar_size;
126Lisp_Object Qtool_bar_external, Qtool_bar_size;
127
128/* The currently selected frame. */ 58/* The currently selected frame. */
129 59
130Lisp_Object selected_frame; 60Lisp_Object selected_frame;
@@ -1221,7 +1151,7 @@ to that frame. */)
1221{ 1151{
1222 /* Preserve prefix arg that the command loop just cleared. */ 1152 /* Preserve prefix arg that the command loop just cleared. */
1223 kset_prefix_arg (current_kboard, Vcurrent_prefix_arg); 1153 kset_prefix_arg (current_kboard, Vcurrent_prefix_arg);
1224 Frun_hooks (1, &Qmouse_leave_buffer_hook); 1154 run_hook (Qmouse_leave_buffer_hook);
1225 /* `switch-frame' implies a focus in. */ 1155 /* `switch-frame' implies a focus in. */
1226 call1 (intern ("handle-focus-in"), event); 1156 call1 (intern ("handle-focus-in"), event);
1227 return do_switch_frame (event, 0, 0, Qnil); 1157 return do_switch_frame (event, 0, 0, Qnil);
@@ -2995,48 +2925,48 @@ or bottommost possible position (that stays within the screen). */)
2995 2925
2996struct frame_parm_table { 2926struct frame_parm_table {
2997 const char *name; 2927 const char *name;
2998 Lisp_Object *variable; 2928 struct Lisp_Symbol *sym;
2999}; 2929};
3000 2930
3001static const struct frame_parm_table frame_parms[] = 2931static const struct frame_parm_table frame_parms[] =
3002{ 2932{
3003 {"auto-raise", &Qauto_raise}, 2933 {"auto-raise", XSYMBOL_INIT (Qauto_raise)},
3004 {"auto-lower", &Qauto_lower}, 2934 {"auto-lower", XSYMBOL_INIT (Qauto_lower)},
3005 {"background-color", 0}, 2935 {"background-color", 0},
3006 {"border-color", &Qborder_color}, 2936 {"border-color", XSYMBOL_INIT (Qborder_color)},
3007 {"border-width", &Qborder_width}, 2937 {"border-width", XSYMBOL_INIT (Qborder_width)},
3008 {"cursor-color", &Qcursor_color}, 2938 {"cursor-color", XSYMBOL_INIT (Qcursor_color)},
3009 {"cursor-type", &Qcursor_type}, 2939 {"cursor-type", XSYMBOL_INIT (Qcursor_type)},
3010 {"font", 0}, 2940 {"font", 0},
3011 {"foreground-color", 0}, 2941 {"foreground-color", 0},
3012 {"icon-name", &Qicon_name}, 2942 {"icon-name", XSYMBOL_INIT (Qicon_name)},
3013 {"icon-type", &Qicon_type}, 2943 {"icon-type", XSYMBOL_INIT (Qicon_type)},
3014 {"internal-border-width", &Qinternal_border_width}, 2944 {"internal-border-width", XSYMBOL_INIT (Qinternal_border_width)},
3015 {"right-divider-width", &Qright_divider_width}, 2945 {"right-divider-width", XSYMBOL_INIT (Qright_divider_width)},
3016 {"bottom-divider-width", &Qbottom_divider_width}, 2946 {"bottom-divider-width", XSYMBOL_INIT (Qbottom_divider_width)},
3017 {"menu-bar-lines", &Qmenu_bar_lines}, 2947 {"menu-bar-lines", XSYMBOL_INIT (Qmenu_bar_lines)},
3018 {"mouse-color", &Qmouse_color}, 2948 {"mouse-color", XSYMBOL_INIT (Qmouse_color)},
3019 {"name", &Qname}, 2949 {"name", XSYMBOL_INIT (Qname)},
3020 {"scroll-bar-width", &Qscroll_bar_width}, 2950 {"scroll-bar-width", XSYMBOL_INIT (Qscroll_bar_width)},
3021 {"scroll-bar-height", &Qscroll_bar_height}, 2951 {"scroll-bar-height", XSYMBOL_INIT (Qscroll_bar_height)},
3022 {"title", &Qtitle}, 2952 {"title", XSYMBOL_INIT (Qtitle)},
3023 {"unsplittable", &Qunsplittable}, 2953 {"unsplittable", XSYMBOL_INIT (Qunsplittable)},
3024 {"vertical-scroll-bars", &Qvertical_scroll_bars}, 2954 {"vertical-scroll-bars", XSYMBOL_INIT (Qvertical_scroll_bars)},
3025 {"horizontal-scroll-bars", &Qhorizontal_scroll_bars}, 2955 {"horizontal-scroll-bars", XSYMBOL_INIT (Qhorizontal_scroll_bars)},
3026 {"visibility", &Qvisibility}, 2956 {"visibility", XSYMBOL_INIT (Qvisibility)},
3027 {"tool-bar-lines", &Qtool_bar_lines}, 2957 {"tool-bar-lines", XSYMBOL_INIT (Qtool_bar_lines)},
3028 {"scroll-bar-foreground", &Qscroll_bar_foreground}, 2958 {"scroll-bar-foreground", XSYMBOL_INIT (Qscroll_bar_foreground)},
3029 {"scroll-bar-background", &Qscroll_bar_background}, 2959 {"scroll-bar-background", XSYMBOL_INIT (Qscroll_bar_background)},
3030 {"screen-gamma", &Qscreen_gamma}, 2960 {"screen-gamma", XSYMBOL_INIT (Qscreen_gamma)},
3031 {"line-spacing", &Qline_spacing}, 2961 {"line-spacing", XSYMBOL_INIT (Qline_spacing)},
3032 {"left-fringe", &Qleft_fringe}, 2962 {"left-fringe", XSYMBOL_INIT (Qleft_fringe)},
3033 {"right-fringe", &Qright_fringe}, 2963 {"right-fringe", XSYMBOL_INIT (Qright_fringe)},
3034 {"wait-for-wm", &Qwait_for_wm}, 2964 {"wait-for-wm", XSYMBOL_INIT (Qwait_for_wm)},
3035 {"fullscreen", &Qfullscreen}, 2965 {"fullscreen", XSYMBOL_INIT (Qfullscreen)},
3036 {"font-backend", &Qfont_backend}, 2966 {"font-backend", XSYMBOL_INIT (Qfont_backend)},
3037 {"alpha", &Qalpha}, 2967 {"alpha", XSYMBOL_INIT (Qalpha)},
3038 {"sticky", &Qsticky}, 2968 {"sticky", XSYMBOL_INIT (Qsticky)},
3039 {"tool-bar-position", &Qtool_bar_position}, 2969 {"tool-bar-position", XSYMBOL_INIT (Qtool_bar_position)},
3040}; 2970};
3041 2971
3042#ifdef HAVE_WINDOW_SYSTEM 2972#ifdef HAVE_WINDOW_SYSTEM
@@ -4854,17 +4784,49 @@ syms_of_frame (void)
4854 DEFSYM (Qns_parse_geometry, "ns-parse-geometry"); 4784 DEFSYM (Qns_parse_geometry, "ns-parse-geometry");
4855#endif 4785#endif
4856 4786
4787 DEFSYM (Qalpha, "alpha");
4788 DEFSYM (Qauto_lower, "auto-lower");
4789 DEFSYM (Qauto_raise, "auto-raise");
4790 DEFSYM (Qborder_color, "border-color");
4791 DEFSYM (Qborder_width, "border-width");
4792 DEFSYM (Qbottom_divider_width, "bottom-divider-width");
4793 DEFSYM (Qcursor_color, "cursor-color");
4794 DEFSYM (Qcursor_type, "cursor-type");
4795 DEFSYM (Qfont_backend, "font-backend");
4796 DEFSYM (Qfullscreen, "fullscreen");
4797 DEFSYM (Qhorizontal_scroll_bars, "horizontal-scroll-bars");
4798 DEFSYM (Qicon_name, "icon-name");
4799 DEFSYM (Qicon_type, "icon-type");
4800 DEFSYM (Qinternal_border_width, "internal-border-width");
4801 DEFSYM (Qleft_fringe, "left-fringe");
4802 DEFSYM (Qline_spacing, "line-spacing");
4803 DEFSYM (Qmenu_bar_lines, "menu-bar-lines");
4804 DEFSYM (Qmouse_color, "mouse-color");
4805 DEFSYM (Qname, "name");
4806 DEFSYM (Qright_divider_width, "right-divider-width");
4807 DEFSYM (Qright_fringe, "right-fringe");
4808 DEFSYM (Qscreen_gamma, "screen-gamma");
4809 DEFSYM (Qscroll_bar_background, "scroll-bar-background");
4810 DEFSYM (Qscroll_bar_foreground, "scroll-bar-foreground");
4811 DEFSYM (Qscroll_bar_height, "scroll-bar-height");
4812 DEFSYM (Qscroll_bar_width, "scroll-bar-width");
4813 DEFSYM (Qsticky, "sticky");
4814 DEFSYM (Qtitle, "title");
4815 DEFSYM (Qtool_bar_lines, "tool-bar-lines");
4816 DEFSYM (Qtool_bar_position, "tool-bar-position");
4817 DEFSYM (Qunsplittable, "unsplittable");
4818 DEFSYM (Qvertical_scroll_bars, "vertical-scroll-bars");
4819 DEFSYM (Qvisibility, "visibility");
4820 DEFSYM (Qwait_for_wm, "wait-for-wm");
4821
4857 { 4822 {
4858 int i; 4823 int i;
4859 4824
4860 for (i = 0; i < ARRAYELTS (frame_parms); i++) 4825 for (i = 0; i < ARRAYELTS (frame_parms); i++)
4861 { 4826 {
4862 Lisp_Object v = intern_c_string (frame_parms[i].name); 4827 Lisp_Object v = (frame_parms[i].sym
4863 if (frame_parms[i].variable) 4828 ? make_lisp_symbol (frame_parms[i].sym)
4864 { 4829 : intern_c_string (frame_parms[i].name));
4865 *frame_parms[i].variable = v;
4866 staticpro (frame_parms[i].variable);
4867 }
4868 Fput (v, Qx_frame_parameter, make_number (i)); 4830 Fput (v, Qx_frame_parameter, make_number (i));
4869 } 4831 }
4870 } 4832 }
diff --git a/src/frame.h b/src/frame.h
index 80603ce5624..d1ed4d4a67e 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -1095,11 +1095,6 @@ SET_FRAME_VISIBLE (struct frame *f, int v)
1095 (f)->iconified = (eassert (0 <= (i) && (i) <= 1), (i)) 1095 (f)->iconified = (eassert (0 <= (i) && (i) <= 1), (i))
1096 1096
1097extern Lisp_Object selected_frame; 1097extern Lisp_Object selected_frame;
1098extern Lisp_Object Qframep, Qframe_live_p;
1099extern Lisp_Object Qtty, Qtty_type;
1100extern Lisp_Object Qtty_color_mode;
1101extern Lisp_Object Qterminal;
1102extern Lisp_Object Qnoelisp;
1103 1098
1104extern struct frame *decode_window_system_frame (Lisp_Object); 1099extern struct frame *decode_window_system_frame (Lisp_Object);
1105extern struct frame *decode_live_frame (Lisp_Object); 1100extern struct frame *decode_live_frame (Lisp_Object);
@@ -1344,51 +1339,6 @@ extern Lisp_Object Vframe_list;
1344 Frame Parameters 1339 Frame Parameters
1345 ***********************************************************************/ 1340 ***********************************************************************/
1346 1341
1347extern Lisp_Object Qauto_raise, Qauto_lower;
1348extern Lisp_Object Qborder_color, Qborder_width;
1349extern Lisp_Object Qbuffer_predicate;
1350extern Lisp_Object Qcursor_color, Qcursor_type;
1351extern Lisp_Object Qfont;
1352extern Lisp_Object Qicon, Qicon_name, Qicon_type, Qicon_left, Qicon_top;
1353extern Lisp_Object Qinternal_border_width;
1354extern Lisp_Object Qright_divider_width, Qbottom_divider_width;
1355extern Lisp_Object Qtooltip;
1356extern Lisp_Object Qmenu_bar_lines, Qtool_bar_lines, Qtool_bar_position;
1357extern Lisp_Object Qmouse_color;
1358extern Lisp_Object Qname, Qtitle;
1359extern Lisp_Object Qparent_id;
1360extern Lisp_Object Qunsplittable, Qvisibility;
1361extern Lisp_Object Qscroll_bar_width, Qvertical_scroll_bars;
1362extern Lisp_Object Qscroll_bar_height, Qhorizontal_scroll_bars;
1363extern Lisp_Object Qscroll_bar_foreground, Qscroll_bar_background;
1364extern Lisp_Object Qscreen_gamma;
1365extern Lisp_Object Qline_spacing;
1366extern Lisp_Object Qwait_for_wm;
1367extern Lisp_Object Qfullscreen;
1368extern Lisp_Object Qfullwidth, Qfullheight, Qfullboth, Qmaximized;
1369extern Lisp_Object Qsticky;
1370extern Lisp_Object Qfont_backend;
1371extern Lisp_Object Qalpha;
1372
1373extern Lisp_Object Qleft_fringe, Qright_fringe;
1374extern Lisp_Object Qheight, Qwidth;
1375extern Lisp_Object Qminibuffer, Qmodeline;
1376extern Lisp_Object Qx, Qw32, Qpc, Qns;
1377extern Lisp_Object Qvisible;
1378extern Lisp_Object Qdisplay_type;
1379
1380extern Lisp_Object Qx_resource_name;
1381
1382extern Lisp_Object Qtop, Qbox, Qbottom;
1383extern Lisp_Object Qdisplay;
1384
1385extern Lisp_Object Qframe_position, Qframe_outer_size, Qframe_inner_size;
1386extern Lisp_Object Qexternal_border_size, Qtitle_height;
1387extern Lisp_Object Qmenu_bar_external, Qmenu_bar_size;
1388extern Lisp_Object Qtool_bar_external, Qtool_bar_size;
1389
1390extern Lisp_Object Qrun_hook_with_args;
1391
1392#ifdef HAVE_WINDOW_SYSTEM 1342#ifdef HAVE_WINDOW_SYSTEM
1393 1343
1394/* The class of this X application. */ 1344/* The class of this X application. */
@@ -1399,7 +1349,6 @@ extern void x_set_scroll_bar_default_height (struct frame *);
1399extern void x_set_offset (struct frame *, int, int, int); 1349extern void x_set_offset (struct frame *, int, int, int);
1400extern void x_wm_set_size_hint (struct frame *f, long flags, bool user_position); 1350extern void x_wm_set_size_hint (struct frame *f, long flags, bool user_position);
1401extern Lisp_Object x_new_font (struct frame *, Lisp_Object, int); 1351extern Lisp_Object x_new_font (struct frame *, Lisp_Object, int);
1402extern Lisp_Object Qface_set_after_frame_default;
1403extern void x_set_frame_parameters (struct frame *, Lisp_Object); 1352extern void x_set_frame_parameters (struct frame *, Lisp_Object);
1404extern void x_set_fullscreen (struct frame *, Lisp_Object, Lisp_Object); 1353extern void x_set_fullscreen (struct frame *, Lisp_Object, Lisp_Object);
1405extern void x_set_line_spacing (struct frame *, Lisp_Object, Lisp_Object); 1354extern void x_set_line_spacing (struct frame *, Lisp_Object, Lisp_Object);
diff --git a/src/fringe.c b/src/fringe.c
index 9d393f86f7e..c7262d19336 100644
--- a/src/fringe.c
+++ b/src/fringe.c
@@ -65,10 +65,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
65 must specify physical bitmap symbols. 65 must specify physical bitmap symbols.
66*/ 66*/
67 67
68static Lisp_Object Qtruncation, Qcontinuation, Qoverlay_arrow;
69static Lisp_Object Qempty_line, Qtop_bottom;
70static Lisp_Object Qhollow_small;
71
72enum fringe_bitmap_align 68enum fringe_bitmap_align
73{ 69{
74 ALIGN_BITMAP_CENTER = 0, 70 ALIGN_BITMAP_CENTER = 0,
diff --git a/src/ftfont.c b/src/ftfont.c
index 81698066306..9707b6c1b71 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -38,12 +38,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
38#include "font.h" 38#include "font.h"
39#include "ftfont.h" 39#include "ftfont.h"
40 40
41/* Symbolic type of this font-driver. */
42static Lisp_Object Qfreetype;
43
44/* Fontconfig's generic families and their aliases. */
45static Lisp_Object Qmonospace, Qsans_serif, Qserif, Qmono, Qsans, Qsans__serif;
46
47/* Flag to tell if FcInit is already called or not. */ 41/* Flag to tell if FcInit is already called or not. */
48static bool fc_initialized; 42static bool fc_initialized;
49 43
@@ -2667,7 +2661,10 @@ ftfont_filter_properties (Lisp_Object font, Lisp_Object alist)
2667void 2661void
2668syms_of_ftfont (void) 2662syms_of_ftfont (void)
2669{ 2663{
2664 /* Symbolic type of this font-driver. */
2670 DEFSYM (Qfreetype, "freetype"); 2665 DEFSYM (Qfreetype, "freetype");
2666
2667 /* Fontconfig's generic families and their aliases. */
2671 DEFSYM (Qmonospace, "monospace"); 2668 DEFSYM (Qmonospace, "monospace");
2672 DEFSYM (Qsans_serif, "sans-serif"); 2669 DEFSYM (Qsans_serif, "sans-serif");
2673 DEFSYM (Qserif, "serif"); 2670 DEFSYM (Qserif, "serif");
diff --git a/src/ftxfont.c b/src/ftxfont.c
index 52d844597ee..cd2bf3e7415 100644
--- a/src/ftxfont.c
+++ b/src/ftxfont.c
@@ -35,8 +35,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
35 35
36/* FTX font driver. */ 36/* FTX font driver. */
37 37
38static Lisp_Object Qftx;
39
40struct font_driver ftxfont_driver; 38struct font_driver ftxfont_driver;
41 39
42struct ftxfont_frame_data 40struct ftxfont_frame_data
diff --git a/src/gfilenotify.c b/src/gfilenotify.c
index 7434a373476..fe25ce9353e 100644
--- a/src/gfilenotify.c
+++ b/src/gfilenotify.c
@@ -29,24 +29,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
29#include "process.h" 29#include "process.h"
30 30
31 31
32/* Subroutines. */
33static Lisp_Object Qgfile_add_watch;
34static Lisp_Object Qgfile_rm_watch;
35
36/* Filter objects. */
37static Lisp_Object Qwatch_mounts; /* G_FILE_MONITOR_WATCH_MOUNTS */
38static Lisp_Object Qsend_moved; /* G_FILE_MONITOR_SEND_MOVED */
39
40/* Event types. */
41static Lisp_Object Qchanged; /* G_FILE_MONITOR_EVENT_CHANGED */
42static Lisp_Object Qchanges_done_hint; /* G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT */
43static Lisp_Object Qdeleted; /* G_FILE_MONITOR_EVENT_DELETED */
44static Lisp_Object Qcreated; /* G_FILE_MONITOR_EVENT_CREATED */
45static Lisp_Object Qattribute_changed; /* G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED */
46static Lisp_Object Qpre_unmount; /* G_FILE_MONITOR_EVENT_PRE_UNMOUNT */
47static Lisp_Object Qunmounted; /* G_FILE_MONITOR_EVENT_UNMOUNTED */
48static Lisp_Object Qmoved; /* G_FILE_MONITOR_EVENT_MOVED */
49
50static Lisp_Object watch_list; 32static Lisp_Object watch_list;
51 33
52/* This is the callback function for arriving signals from 34/* This is the callback function for arriving signals from
@@ -258,23 +240,27 @@ globals_of_gfilenotify (void)
258void 240void
259syms_of_gfilenotify (void) 241syms_of_gfilenotify (void)
260{ 242{
261
262 DEFSYM (Qgfile_add_watch, "gfile-add-watch"); 243 DEFSYM (Qgfile_add_watch, "gfile-add-watch");
263 defsubr (&Sgfile_add_watch); 244 defsubr (&Sgfile_add_watch);
264 245
265 DEFSYM (Qgfile_rm_watch, "gfile-rm-watch"); 246 DEFSYM (Qgfile_rm_watch, "gfile-rm-watch");
266 defsubr (&Sgfile_rm_watch); 247 defsubr (&Sgfile_rm_watch);
267 248
268 DEFSYM (Qwatch_mounts, "watch-mounts"); 249 /* Filter objects. */
269 DEFSYM (Qsend_moved, "send-moved"); 250 DEFSYM (Qwatch_mounts, "watch-mounts"); /* G_FILE_MONITOR_WATCH_MOUNTS */
270 DEFSYM (Qchanged, "changed"); 251 DEFSYM (Qsend_moved, "send-moved"); /* G_FILE_MONITOR_SEND_MOVED */
252
253 /* Event types. */
254 DEFSYM (Qchanged, "changed"); /* G_FILE_MONITOR_EVENT_CHANGED */
271 DEFSYM (Qchanges_done_hint, "changes-done-hint"); 255 DEFSYM (Qchanges_done_hint, "changes-done-hint");
272 DEFSYM (Qdeleted, "deleted"); 256 /* G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT */
273 DEFSYM (Qcreated, "created"); 257 DEFSYM (Qdeleted, "deleted"); /* G_FILE_MONITOR_EVENT_DELETED */
258 DEFSYM (Qcreated, "created"); /* G_FILE_MONITOR_EVENT_CREATED */
274 DEFSYM (Qattribute_changed, "attribute-changed"); 259 DEFSYM (Qattribute_changed, "attribute-changed");
275 DEFSYM (Qpre_unmount, "pre-unmount"); 260 /* G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED */
276 DEFSYM (Qunmounted, "unmounted"); 261 DEFSYM (Qpre_unmount, "pre-unmount"); /* G_FILE_MONITOR_EVENT_PRE_UNMOUNT */
277 DEFSYM (Qmoved, "moved"); 262 DEFSYM (Qunmounted, "unmounted"); /* G_FILE_MONITOR_EVENT_UNMOUNTED */
263 DEFSYM (Qmoved, "moved"); /* G_FILE_MONITOR_EVENT_MOVED */
278 264
279 staticpro (&watch_list); 265 staticpro (&watch_list);
280 266
diff --git a/src/gnutls.c b/src/gnutls.c
index 4d248f86878..75fe6149a55 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -35,28 +35,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
35 35
36static bool emacs_gnutls_handle_error (gnutls_session_t, int); 36static bool emacs_gnutls_handle_error (gnutls_session_t, int);
37 37
38static Lisp_Object Qgnutls_dll;
39static Lisp_Object Qgnutls_code;
40static Lisp_Object Qgnutls_anon, Qgnutls_x509pki;
41static Lisp_Object Qgnutls_e_interrupted, Qgnutls_e_again,
42 Qgnutls_e_invalid_session, Qgnutls_e_not_ready_for_handshake;
43static bool gnutls_global_initialized; 38static bool gnutls_global_initialized;
44 39
45/* The following are for the property list of `gnutls-boot'. */
46static Lisp_Object QCgnutls_bootprop_priority;
47static Lisp_Object QCgnutls_bootprop_trustfiles;
48static Lisp_Object QCgnutls_bootprop_keylist;
49static Lisp_Object QCgnutls_bootprop_crlfiles;
50static Lisp_Object QCgnutls_bootprop_callbacks;
51static Lisp_Object QCgnutls_bootprop_loglevel;
52static Lisp_Object QCgnutls_bootprop_hostname;
53static Lisp_Object QCgnutls_bootprop_min_prime_bits;
54static Lisp_Object QCgnutls_bootprop_verify_flags;
55static Lisp_Object QCgnutls_bootprop_verify_error;
56
57/* Callback keys for `gnutls-boot'. Unused currently. */
58static Lisp_Object QCgnutls_bootprop_callbacks_verify;
59
60static void gnutls_log_function (int, const char *); 40static void gnutls_log_function (int, const char *);
61static void gnutls_log_function2 (int, const char *, const char *); 41static void gnutls_log_function2 (int, const char *, const char *);
62#ifdef HAVE_GNUTLS3 42#ifdef HAVE_GNUTLS3
@@ -1656,13 +1636,14 @@ syms_of_gnutls (void)
1656 DEFSYM (Qgnutls_code, "gnutls-code"); 1636 DEFSYM (Qgnutls_code, "gnutls-code");
1657 DEFSYM (Qgnutls_anon, "gnutls-anon"); 1637 DEFSYM (Qgnutls_anon, "gnutls-anon");
1658 DEFSYM (Qgnutls_x509pki, "gnutls-x509pki"); 1638 DEFSYM (Qgnutls_x509pki, "gnutls-x509pki");
1639
1640 /* The following are for the property list of 'gnutls-boot'. */
1659 DEFSYM (QCgnutls_bootprop_hostname, ":hostname"); 1641 DEFSYM (QCgnutls_bootprop_hostname, ":hostname");
1660 DEFSYM (QCgnutls_bootprop_priority, ":priority"); 1642 DEFSYM (QCgnutls_bootprop_priority, ":priority");
1661 DEFSYM (QCgnutls_bootprop_trustfiles, ":trustfiles"); 1643 DEFSYM (QCgnutls_bootprop_trustfiles, ":trustfiles");
1662 DEFSYM (QCgnutls_bootprop_keylist, ":keylist"); 1644 DEFSYM (QCgnutls_bootprop_keylist, ":keylist");
1663 DEFSYM (QCgnutls_bootprop_crlfiles, ":crlfiles"); 1645 DEFSYM (QCgnutls_bootprop_crlfiles, ":crlfiles");
1664 DEFSYM (QCgnutls_bootprop_callbacks, ":callbacks"); 1646 DEFSYM (QCgnutls_bootprop_callbacks, ":callbacks");
1665 DEFSYM (QCgnutls_bootprop_callbacks_verify, "verify");
1666 DEFSYM (QCgnutls_bootprop_min_prime_bits, ":min-prime-bits"); 1647 DEFSYM (QCgnutls_bootprop_min_prime_bits, ":min-prime-bits");
1667 DEFSYM (QCgnutls_bootprop_loglevel, ":loglevel"); 1648 DEFSYM (QCgnutls_bootprop_loglevel, ":loglevel");
1668 DEFSYM (QCgnutls_bootprop_verify_flags, ":verify-flags"); 1649 DEFSYM (QCgnutls_bootprop_verify_flags, ":verify-flags");
diff --git a/src/image.c b/src/image.c
index 6240c64b201..addb932f834 100644
--- a/src/image.c
+++ b/src/image.c
@@ -86,12 +86,6 @@ typedef struct w32_bitmap_record Bitmap_Record;
86#define x_defined_color w32_defined_color 86#define x_defined_color w32_defined_color
87#define DefaultDepthOfScreen(screen) (one_w32_display_info.n_cbits) 87#define DefaultDepthOfScreen(screen) (one_w32_display_info.n_cbits)
88 88
89/* Versions of libpng, libgif, and libjpeg that we were compiled with,
90 or -1 if no PNG/GIF support was compiled in. This is tested by
91 w32-win.el to correctly set up the alist used to search for the
92 respective image libraries. */
93Lisp_Object Qlibpng_version, Qlibgif_version, Qlibjpeg_version;
94
95#endif /* HAVE_NTGUI */ 89#endif /* HAVE_NTGUI */
96 90
97#ifdef HAVE_NS 91#ifdef HAVE_NS
@@ -110,11 +104,6 @@ typedef struct ns_bitmap_record Bitmap_Record;
110#define DefaultDepthOfScreen(screen) x_display_list->n_planes 104#define DefaultDepthOfScreen(screen) x_display_list->n_planes
111#endif /* HAVE_NS */ 105#endif /* HAVE_NS */
112 106
113
114/* The symbol `postscript' identifying images of this type. */
115
116static Lisp_Object Qpostscript;
117
118static void x_disable_image (struct frame *, struct image *); 107static void x_disable_image (struct frame *, struct image *);
119static void x_edge_detection (struct frame *, struct image *, Lisp_Object, 108static void x_edge_detection (struct frame *, struct image *, Lisp_Object,
120 Lisp_Object); 109 Lisp_Object);
@@ -126,8 +115,6 @@ static void free_color_table (void);
126static unsigned long *colors_in_color_table (int *n); 115static unsigned long *colors_in_color_table (int *n);
127#endif 116#endif
128 117
129static Lisp_Object QCmax_width, QCmax_height;
130
131/* Code to deal with bitmaps. Bitmaps are referenced by their bitmap 118/* Code to deal with bitmaps. Bitmaps are referenced by their bitmap
132 id, which is just an int that this section returns. Bitmaps are 119 id, which is just an int that this section returns. Bitmaps are
133 reference counted so they can be shared among frames. 120 reference counted so they can be shared among frames.
@@ -537,24 +524,6 @@ x_create_bitmap_mask (struct frame *f, ptrdiff_t id)
537 524
538static struct image_type *image_types; 525static struct image_type *image_types;
539 526
540/* The symbol `xbm' which is used as the type symbol for XBM images. */
541
542static Lisp_Object Qxbm;
543
544/* Keywords. */
545
546Lisp_Object QCascent, QCmargin, QCrelief;
547Lisp_Object QCconversion;
548static Lisp_Object QCheuristic_mask;
549static Lisp_Object QCcolor_symbols;
550static Lisp_Object QCindex, QCmatrix, QCcolor_adjustment, QCmask, QCgeometry;
551static Lisp_Object QCcrop, QCrotation;
552
553/* Other symbols. */
554
555static Lisp_Object Qcount, Qextension_data, Qdelay;
556static Lisp_Object Qlaplace, Qemboss, Qedge_detection, Qheuristic;
557
558/* Forward function prototypes. */ 527/* Forward function prototypes. */
559 528
560static struct image_type *lookup_image_type (Lisp_Object); 529static struct image_type *lookup_image_type (Lisp_Object);
@@ -579,27 +548,28 @@ static struct image_type *
579define_image_type (struct image_type *type) 548define_image_type (struct image_type *type)
580{ 549{
581 struct image_type *p = NULL; 550 struct image_type *p = NULL;
582 Lisp_Object target_type = *type->type; 551 struct Lisp_Symbol *new_type = type->type;
583 bool type_valid = 1; 552 bool type_valid = 1;
584 553
585 block_input (); 554 block_input ();
586 555
587 for (p = image_types; p; p = p->next) 556 for (p = image_types; p; p = p->next)
588 if (EQ (*p->type, target_type)) 557 if (p->type == new_type)
589 goto done; 558 goto done;
590 559
591 if (type->init) 560 if (type->init)
592 { 561 {
593#if defined HAVE_NTGUI && defined WINDOWSNT 562#if defined HAVE_NTGUI && defined WINDOWSNT
594 /* If we failed to load the library before, don't try again. */ 563 /* If we failed to load the library before, don't try again. */
595 Lisp_Object tested = Fassq (target_type, Vlibrary_cache); 564 Lisp_Object tested = Fassq (make_lisp_symbol (new_type), Vlibrary_cache);
596 if (CONSP (tested) && NILP (XCDR (tested))) 565 if (CONSP (tested) && NILP (XCDR (tested)))
597 type_valid = 0; 566 type_valid = 0;
598 else 567 else
599#endif 568#endif
600 { 569 {
601 type_valid = type->init (); 570 type_valid = type->init ();
602 CACHE_IMAGE_TYPE (target_type, type_valid ? Qt : Qnil); 571 CACHE_IMAGE_TYPE (make_lisp_symbol (new_type),
572 type_valid ? Qt : Qnil);
603 } 573 }
604 } 574 }
605 575
@@ -1777,7 +1747,7 @@ lookup_image (struct frame *f, Lisp_Object spec)
1777 1747
1778 /* Do image transformations and compute masks, unless we 1748 /* Do image transformations and compute masks, unless we
1779 don't have the image yet. */ 1749 don't have the image yet. */
1780 if (!EQ (*img->type->type, Qpostscript)) 1750 if (!EQ (make_lisp_symbol (img->type->type), Qpostscript))
1781 postprocess_image (f, img); 1751 postprocess_image (f, img);
1782 } 1752 }
1783 1753
@@ -2362,7 +2332,7 @@ static const struct image_keyword xbm_format[XBM_LAST] =
2362 2332
2363static struct image_type xbm_type = 2333static struct image_type xbm_type =
2364{ 2334{
2365 &Qxbm, 2335 XSYMBOL_INIT (Qxbm),
2366 xbm_image_p, 2336 xbm_image_p,
2367 xbm_load, 2337 xbm_load,
2368 x_clear_image, 2338 x_clear_image,
@@ -3121,9 +3091,6 @@ static bool xpm_load (struct frame *f, struct image *img);
3121#endif /* HAVE_XPM */ 3091#endif /* HAVE_XPM */
3122 3092
3123#if defined (HAVE_XPM) || defined (HAVE_NS) 3093#if defined (HAVE_XPM) || defined (HAVE_NS)
3124/* The symbol `xpm' identifying XPM-format images. */
3125
3126static Lisp_Object Qxpm;
3127 3094
3128/* Indices of image specification fields in xpm_format, below. */ 3095/* Indices of image specification fields in xpm_format, below. */
3129 3096
@@ -3171,7 +3138,7 @@ static bool init_xpm_functions (void);
3171 3138
3172static struct image_type xpm_type = 3139static struct image_type xpm_type =
3173{ 3140{
3174 &Qxpm, 3141 XSYMBOL_INIT (Qxpm),
3175 xpm_image_p, 3142 xpm_image_p,
3176 xpm_load, 3143 xpm_load,
3177 x_clear_image, 3144 x_clear_image,
@@ -5059,10 +5026,6 @@ x_build_heuristic_mask (struct frame *f, struct image *img, Lisp_Object how)
5059static bool pbm_image_p (Lisp_Object object); 5026static bool pbm_image_p (Lisp_Object object);
5060static bool pbm_load (struct frame *f, struct image *img); 5027static bool pbm_load (struct frame *f, struct image *img);
5061 5028
5062/* The symbol `pbm' identifying images of this type. */
5063
5064static Lisp_Object Qpbm;
5065
5066/* Indices of image specification fields in gs_format, below. */ 5029/* Indices of image specification fields in gs_format, below. */
5067 5030
5068enum pbm_keyword_index 5031enum pbm_keyword_index
@@ -5103,7 +5066,7 @@ static const struct image_keyword pbm_format[PBM_LAST] =
5103 5066
5104static struct image_type pbm_type = 5067static struct image_type pbm_type =
5105{ 5068{
5106 &Qpbm, 5069 XSYMBOL_INIT (Qpbm),
5107 pbm_image_p, 5070 pbm_image_p,
5108 pbm_load, 5071 pbm_load,
5109 x_clear_image, 5072 x_clear_image,
@@ -5446,10 +5409,6 @@ pbm_load (struct frame *f, struct image *img)
5446static bool png_image_p (Lisp_Object object); 5409static bool png_image_p (Lisp_Object object);
5447static bool png_load (struct frame *f, struct image *img); 5410static bool png_load (struct frame *f, struct image *img);
5448 5411
5449/* The symbol `png' identifying images of this type. */
5450
5451static Lisp_Object Qpng;
5452
5453/* Indices of image specification fields in png_format, below. */ 5412/* Indices of image specification fields in png_format, below. */
5454 5413
5455enum png_keyword_index 5414enum png_keyword_index
@@ -5494,7 +5453,7 @@ static bool init_png_functions (void);
5494 5453
5495static struct image_type png_type = 5454static struct image_type png_type =
5496{ 5455{
5497 &Qpng, 5456 XSYMBOL_INIT (Qpng),
5498 png_image_p, 5457 png_image_p,
5499 png_load, 5458 png_load,
5500 x_clear_image, 5459 x_clear_image,
@@ -6102,10 +6061,6 @@ png_load (struct frame *f, struct image *img)
6102static bool jpeg_image_p (Lisp_Object object); 6061static bool jpeg_image_p (Lisp_Object object);
6103static bool jpeg_load (struct frame *f, struct image *img); 6062static bool jpeg_load (struct frame *f, struct image *img);
6104 6063
6105/* The symbol `jpeg' identifying images of this type. */
6106
6107static Lisp_Object Qjpeg;
6108
6109/* Indices of image specification fields in gs_format, below. */ 6064/* Indices of image specification fields in gs_format, below. */
6110 6065
6111enum jpeg_keyword_index 6066enum jpeg_keyword_index
@@ -6150,7 +6105,7 @@ static bool init_jpeg_functions (void);
6150 6105
6151static struct image_type jpeg_type = 6106static struct image_type jpeg_type =
6152{ 6107{
6153 &Qjpeg, 6108 XSYMBOL_INIT (Qjpeg),
6154 jpeg_image_p, 6109 jpeg_image_p,
6155 jpeg_load, 6110 jpeg_load,
6156 x_clear_image, 6111 x_clear_image,
@@ -6704,10 +6659,6 @@ jpeg_load (struct frame *f, struct image *img)
6704static bool tiff_image_p (Lisp_Object object); 6659static bool tiff_image_p (Lisp_Object object);
6705static bool tiff_load (struct frame *f, struct image *img); 6660static bool tiff_load (struct frame *f, struct image *img);
6706 6661
6707/* The symbol `tiff' identifying images of this type. */
6708
6709static Lisp_Object Qtiff;
6710
6711/* Indices of image specification fields in tiff_format, below. */ 6662/* Indices of image specification fields in tiff_format, below. */
6712 6663
6713enum tiff_keyword_index 6664enum tiff_keyword_index
@@ -6754,7 +6705,7 @@ static bool init_tiff_functions (void);
6754 6705
6755static struct image_type tiff_type = 6706static struct image_type tiff_type =
6756{ 6707{
6757 &Qtiff, 6708 XSYMBOL_INIT (Qtiff),
6758 tiff_image_p, 6709 tiff_image_p,
6759 tiff_load, 6710 tiff_load,
6760 x_clear_image, 6711 x_clear_image,
@@ -7167,10 +7118,6 @@ static bool gif_image_p (Lisp_Object object);
7167static bool gif_load (struct frame *f, struct image *img); 7118static bool gif_load (struct frame *f, struct image *img);
7168static void gif_clear_image (struct frame *f, struct image *img); 7119static void gif_clear_image (struct frame *f, struct image *img);
7169 7120
7170/* The symbol `gif' identifying images of this type. */
7171
7172static Lisp_Object Qgif;
7173
7174/* Indices of image specification fields in gif_format, below. */ 7121/* Indices of image specification fields in gif_format, below. */
7175 7122
7176enum gif_keyword_index 7123enum gif_keyword_index
@@ -7217,7 +7164,7 @@ static bool init_gif_functions (void);
7217 7164
7218static struct image_type gif_type = 7165static struct image_type gif_type =
7219{ 7166{
7220 &Qgif, 7167 XSYMBOL_INIT (Qgif),
7221 gif_image_p, 7168 gif_image_p,
7222 gif_load, 7169 gif_load,
7223 gif_clear_image, 7170 gif_clear_image,
@@ -7841,8 +7788,6 @@ compute_image_size (size_t width, size_t height,
7841 *d_height = desired_height; 7788 *d_height = desired_height;
7842} 7789}
7843 7790
7844static Lisp_Object Qimagemagick;
7845
7846static bool imagemagick_image_p (Lisp_Object); 7791static bool imagemagick_image_p (Lisp_Object);
7847static bool imagemagick_load (struct frame *, struct image *); 7792static bool imagemagick_load (struct frame *, struct image *);
7848static void imagemagick_clear_image (struct frame *, struct image *); 7793static void imagemagick_clear_image (struct frame *, struct image *);
@@ -7906,7 +7851,7 @@ static bool init_imagemagick_functions (void);
7906 7851
7907static struct image_type imagemagick_type = 7852static struct image_type imagemagick_type =
7908 { 7853 {
7909 &Qimagemagick, 7854 XSYMBOL_INIT (Qimagemagick),
7910 imagemagick_image_p, 7855 imagemagick_image_p,
7911 imagemagick_load, 7856 imagemagick_load,
7912 imagemagick_clear_image, 7857 imagemagick_clear_image,
@@ -8632,10 +8577,6 @@ static bool svg_load (struct frame *f, struct image *img);
8632static bool svg_load_image (struct frame *, struct image *, 8577static bool svg_load_image (struct frame *, struct image *,
8633 unsigned char *, ptrdiff_t, char *); 8578 unsigned char *, ptrdiff_t, char *);
8634 8579
8635/* The symbol `svg' identifying images of this type. */
8636
8637static Lisp_Object Qsvg;
8638
8639/* Indices of image specification fields in svg_format, below. */ 8580/* Indices of image specification fields in svg_format, below. */
8640 8581
8641enum svg_keyword_index 8582enum svg_keyword_index
@@ -8682,7 +8623,7 @@ static bool init_svg_functions (void);
8682 8623
8683static struct image_type svg_type = 8624static struct image_type svg_type =
8684{ 8625{
8685 &Qsvg, 8626 XSYMBOL_INIT (Qsvg),
8686 svg_image_p, 8627 svg_image_p,
8687 svg_load, 8628 svg_load,
8688 x_clear_image, 8629 x_clear_image,
@@ -8737,8 +8678,6 @@ DEF_DLL_FN (void, g_type_init, (void));
8737DEF_DLL_FN (void, g_object_unref, (gpointer)); 8678DEF_DLL_FN (void, g_object_unref, (gpointer));
8738DEF_DLL_FN (void, g_error_free, (GError *)); 8679DEF_DLL_FN (void, g_error_free, (GError *));
8739 8680
8740Lisp_Object Qgdk_pixbuf, Qglib, Qgobject;
8741
8742static bool 8681static bool
8743init_svg_functions (void) 8682init_svg_functions (void)
8744{ 8683{
@@ -9056,10 +8995,6 @@ static bool gs_image_p (Lisp_Object object);
9056static bool gs_load (struct frame *f, struct image *img); 8995static bool gs_load (struct frame *f, struct image *img);
9057static void gs_clear_image (struct frame *f, struct image *img); 8996static void gs_clear_image (struct frame *f, struct image *img);
9058 8997
9059/* Keyword symbols. */
9060
9061static Lisp_Object QCloader, QCbounding_box, QCpt_width, QCpt_height;
9062
9063/* Indices of image specification fields in gs_format, below. */ 8998/* Indices of image specification fields in gs_format, below. */
9064 8999
9065enum gs_keyword_index 9000enum gs_keyword_index
@@ -9104,7 +9039,7 @@ static const struct image_keyword gs_format[GS_LAST] =
9104 9039
9105static struct image_type gs_type = 9040static struct image_type gs_type =
9106{ 9041{
9107 &Qpostscript, 9042 XSYMBOL_INIT (Qpostscript),
9108 gs_image_p, 9043 gs_image_p,
9109 gs_load, 9044 gs_load,
9110 gs_clear_image, 9045 gs_clear_image,
@@ -9479,10 +9414,12 @@ as a ratio to the frame height and width. If the value is
9479non-numeric, there is no explicit limit on the size of images. */); 9414non-numeric, there is no explicit limit on the size of images. */);
9480 Vmax_image_size = make_float (MAX_IMAGE_SIZE); 9415 Vmax_image_size = make_float (MAX_IMAGE_SIZE);
9481 9416
9417 /* Other symbols. */
9482 DEFSYM (Qcount, "count"); 9418 DEFSYM (Qcount, "count");
9483 DEFSYM (Qextension_data, "extension-data"); 9419 DEFSYM (Qextension_data, "extension-data");
9484 DEFSYM (Qdelay, "delay"); 9420 DEFSYM (Qdelay, "delay");
9485 9421
9422 /* Keywords. */
9486 DEFSYM (QCascent, ":ascent"); 9423 DEFSYM (QCascent, ":ascent");
9487 DEFSYM (QCmargin, ":margin"); 9424 DEFSYM (QCmargin, ":margin");
9488 DEFSYM (QCrelief, ":relief"); 9425 DEFSYM (QCrelief, ":relief");
@@ -9497,6 +9434,7 @@ non-numeric, there is no explicit limit on the size of images. */);
9497 DEFSYM (QCcolor_adjustment, ":color-adjustment"); 9434 DEFSYM (QCcolor_adjustment, ":color-adjustment");
9498 DEFSYM (QCmask, ":mask"); 9435 DEFSYM (QCmask, ":mask");
9499 9436
9437 /* Other symbols. */
9500 DEFSYM (Qlaplace, "laplace"); 9438 DEFSYM (Qlaplace, "laplace");
9501 DEFSYM (Qemboss, "emboss"); 9439 DEFSYM (Qemboss, "emboss");
9502 DEFSYM (Qedge_detection, "edge-detection"); 9440 DEFSYM (Qedge_detection, "edge-detection");
@@ -9514,6 +9452,10 @@ non-numeric, there is no explicit limit on the size of images. */);
9514#endif /* HAVE_GHOSTSCRIPT */ 9452#endif /* HAVE_GHOSTSCRIPT */
9515 9453
9516#ifdef HAVE_NTGUI 9454#ifdef HAVE_NTGUI
9455 /* Versions of libpng, libgif, and libjpeg that we were compiled with,
9456 or -1 if no PNG/GIF support was compiled in. This is tested by
9457 w32-win.el to correctly set up the alist used to search for the
9458 respective image libraries. */
9517 DEFSYM (Qlibpng_version, "libpng-version"); 9459 DEFSYM (Qlibpng_version, "libpng-version");
9518 Fset (Qlibpng_version, 9460 Fset (Qlibpng_version,
9519#if HAVE_PNG 9461#if HAVE_PNG
diff --git a/src/inotify.c b/src/inotify.c
index 8e8ab202c41..eddad73e8f7 100644
--- a/src/inotify.c
+++ b/src/inotify.c
@@ -29,34 +29,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
29#include "frame.h" /* Required for termhooks.h. */ 29#include "frame.h" /* Required for termhooks.h. */
30#include "termhooks.h" 30#include "termhooks.h"
31 31
32static Lisp_Object Qaccess; /* IN_ACCESS */
33static Lisp_Object Qattrib; /* IN_ATTRIB */
34static Lisp_Object Qclose_write; /* IN_CLOSE_WRITE */
35static Lisp_Object Qclose_nowrite; /* IN_CLOSE_NOWRITE */
36static Lisp_Object Qcreate; /* IN_CREATE */
37static Lisp_Object Qdelete; /* IN_DELETE */
38static Lisp_Object Qdelete_self; /* IN_DELETE_SELF */
39static Lisp_Object Qmodify; /* IN_MODIFY */
40static Lisp_Object Qmove_self; /* IN_MOVE_SELF */
41static Lisp_Object Qmoved_from; /* IN_MOVED_FROM */
42static Lisp_Object Qmoved_to; /* IN_MOVED_TO */
43static Lisp_Object Qopen; /* IN_OPEN */
44
45static Lisp_Object Qall_events; /* IN_ALL_EVENTS */
46static Lisp_Object Qmove; /* IN_MOVE */
47static Lisp_Object Qclose; /* IN_CLOSE */
48
49static Lisp_Object Qdont_follow; /* IN_DONT_FOLLOW */
50static Lisp_Object Qexcl_unlink; /* IN_EXCL_UNLINK */
51static Lisp_Object Qmask_add; /* IN_MASK_ADD */
52static Lisp_Object Qoneshot; /* IN_ONESHOT */
53static Lisp_Object Qonlydir; /* IN_ONLYDIR */
54
55static Lisp_Object Qignored; /* IN_IGNORED */
56static Lisp_Object Qisdir; /* IN_ISDIR */
57static Lisp_Object Qq_overflow; /* IN_Q_OVERFLOW */
58static Lisp_Object Qunmount; /* IN_UNMOUNT */
59
60#include <sys/inotify.h> 32#include <sys/inotify.h>
61#include <sys/ioctl.h> 33#include <sys/ioctl.h>
62 34
@@ -398,33 +370,34 @@ See inotify_rm_watch(2) for more information.
398void 370void
399syms_of_inotify (void) 371syms_of_inotify (void)
400{ 372{
401 DEFSYM (Qaccess, "access"); 373 DEFSYM (Qaccess, "access"); /* IN_ACCESS */
402 DEFSYM (Qattrib, "attrib"); 374 DEFSYM (Qattrib, "attrib"); /* IN_ATTRIB */
403 DEFSYM (Qclose_write, "close-write"); 375 DEFSYM (Qclose_write, "close-write"); /* IN_CLOSE_WRITE */
404 DEFSYM (Qclose_nowrite, "close-nowrite"); 376 DEFSYM (Qclose_nowrite, "close-nowrite");
405 DEFSYM (Qcreate, "create"); 377 /* IN_CLOSE_NOWRITE */
406 DEFSYM (Qdelete, "delete"); 378 DEFSYM (Qcreate, "create"); /* IN_CREATE */
407 DEFSYM (Qdelete_self, "delete-self"); 379 DEFSYM (Qdelete, "delete"); /* IN_DELETE */
408 DEFSYM (Qmodify, "modify"); 380 DEFSYM (Qdelete_self, "delete-self"); /* IN_DELETE_SELF */
409 DEFSYM (Qmove_self, "move-self"); 381 DEFSYM (Qmodify, "modify"); /* IN_MODIFY */
410 DEFSYM (Qmoved_from, "moved-from"); 382 DEFSYM (Qmove_self, "move-self"); /* IN_MOVE_SELF */
411 DEFSYM (Qmoved_to, "moved-to"); 383 DEFSYM (Qmoved_from, "moved-from"); /* IN_MOVED_FROM */
412 DEFSYM (Qopen, "open"); 384 DEFSYM (Qmoved_to, "moved-to"); /* IN_MOVED_TO */
413 385 DEFSYM (Qopen, "open"); /* IN_OPEN */
414 DEFSYM (Qall_events, "all-events"); 386
415 DEFSYM (Qmove, "move"); 387 DEFSYM (Qall_events, "all-events"); /* IN_ALL_EVENTS */
416 DEFSYM (Qclose, "close"); 388 DEFSYM (Qmove, "move"); /* IN_MOVE */
417 389 DEFSYM (Qclose, "close"); /* IN_CLOSE */
418 DEFSYM (Qdont_follow, "dont-follow"); 390
419 DEFSYM (Qexcl_unlink, "excl-unlink"); 391 DEFSYM (Qdont_follow, "dont-follow"); /* IN_DONT_FOLLOW */
420 DEFSYM (Qmask_add, "mask-add"); 392 DEFSYM (Qexcl_unlink, "excl-unlink"); /* IN_EXCL_UNLINK */
421 DEFSYM (Qoneshot, "oneshot"); 393 DEFSYM (Qmask_add, "mask-add"); /* IN_MASK_ADD */
422 DEFSYM (Qonlydir, "onlydir"); 394 DEFSYM (Qoneshot, "oneshot"); /* IN_ONESHOT */
423 395 DEFSYM (Qonlydir, "onlydir"); /* IN_ONLYDIR */
424 DEFSYM (Qignored, "ignored"); 396
425 DEFSYM (Qisdir, "isdir"); 397 DEFSYM (Qignored, "ignored"); /* IN_IGNORED */
426 DEFSYM (Qq_overflow, "q-overflow"); 398 DEFSYM (Qisdir, "isdir"); /* IN_ISDIR */
427 DEFSYM (Qunmount, "unmount"); 399 DEFSYM (Qq_overflow, "q-overflow"); /* IN_Q_OVERFLOW */
400 DEFSYM (Qunmount, "unmount"); /* IN_UNMOUNT */
428 401
429 defsubr (&Sinotify_add_watch); 402 defsubr (&Sinotify_add_watch);
430 defsubr (&Sinotify_rm_watch); 403 defsubr (&Sinotify_rm_watch);
diff --git a/src/insdel.c b/src/insdel.c
index a1bec4a9a6d..4463721b897 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -52,8 +52,6 @@ static Lisp_Object combine_after_change_list;
52/* Buffer which combine_after_change_list is about. */ 52/* Buffer which combine_after_change_list is about. */
53static Lisp_Object combine_after_change_buffer; 53static Lisp_Object combine_after_change_buffer;
54 54
55Lisp_Object Qinhibit_modification_hooks;
56
57static void signal_before_change (ptrdiff_t, ptrdiff_t, ptrdiff_t *); 55static void signal_before_change (ptrdiff_t, ptrdiff_t, ptrdiff_t *);
58 56
59/* Also used in marker.c to enable expensive marker checks. */ 57/* Also used in marker.c to enable expensive marker checks. */
@@ -1781,8 +1779,6 @@ modify_text (ptrdiff_t start, ptrdiff_t end)
1781 bset_point_before_scroll (current_buffer, Qnil); 1779 bset_point_before_scroll (current_buffer, Qnil);
1782} 1780}
1783 1781
1784Lisp_Object Qregion_extract_function;
1785
1786/* Check that it is okay to modify the buffer between START and END, 1782/* Check that it is okay to modify the buffer between START and END,
1787 which are char positions. 1783 which are char positions.
1788 1784
@@ -1995,7 +1991,7 @@ signal_before_change (ptrdiff_t start_int, ptrdiff_t end_int,
1995 { 1991 {
1996 PRESERVE_VALUE; 1992 PRESERVE_VALUE;
1997 PRESERVE_START_END; 1993 PRESERVE_START_END;
1998 Frun_hooks (1, &Qfirst_change_hook); 1994 run_hook (Qfirst_change_hook);
1999 } 1995 }
2000 1996
2001 /* Now run the before-change-functions if any. */ 1997 /* Now run the before-change-functions if any. */
diff --git a/src/intervals.h b/src/intervals.h
index 8f0f3482ea5..b2260d002e6 100644
--- a/src/intervals.h
+++ b/src/intervals.h
@@ -271,21 +271,7 @@ extern INTERVAL interval_of (ptrdiff_t, Lisp_Object);
271/* Defined in xdisp.c. */ 271/* Defined in xdisp.c. */
272extern int invisible_p (Lisp_Object, Lisp_Object); 272extern int invisible_p (Lisp_Object, Lisp_Object);
273 273
274/* Declared in textprop.c. */ 274/* Defined in textprop.c. */
275
276/* Types of hooks. */
277extern Lisp_Object Qpoint_left;
278extern Lisp_Object Qpoint_entered;
279extern Lisp_Object Qmodification_hooks;
280extern Lisp_Object Qcategory;
281extern Lisp_Object Qlocal_map;
282
283/* Visual properties text (including strings) may have. */
284extern Lisp_Object Qinvisible, Qintangible;
285
286/* Sticky properties. */
287extern Lisp_Object Qfront_sticky, Qrear_nonsticky;
288
289extern Lisp_Object copy_text_properties (Lisp_Object, Lisp_Object, 275extern Lisp_Object copy_text_properties (Lisp_Object, Lisp_Object,
290 Lisp_Object, Lisp_Object, 276 Lisp_Object, Lisp_Object,
291 Lisp_Object, Lisp_Object); 277 Lisp_Object, Lisp_Object);
diff --git a/src/keyboard.c b/src/keyboard.c
index 43a0dc97404..c177c804bad 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -88,11 +88,6 @@ static KBOARD *all_kboards;
88/* True in the single-kboard state, false in the any-kboard state. */ 88/* True in the single-kboard state, false in the any-kboard state. */
89static bool single_kboard; 89static bool single_kboard;
90 90
91/* Non-nil disable property on a command means
92 do not execute it; call disabled-command-function's value instead. */
93Lisp_Object Qdisabled;
94static Lisp_Object Qdisabled_command_function;
95
96#define NUM_RECENT_KEYS (300) 91#define NUM_RECENT_KEYS (300)
97 92
98/* Index for storing next element into recent_keys. */ 93/* Index for storing next element into recent_keys. */
@@ -232,42 +227,11 @@ static ptrdiff_t last_point_position;
232 'volatile' here. */ 227 'volatile' here. */
233Lisp_Object internal_last_event_frame; 228Lisp_Object internal_last_event_frame;
234 229
235static Lisp_Object Qgui_set_selection, Qhandle_switch_frame;
236static Lisp_Object Qhandle_select_window;
237Lisp_Object QPRIMARY;
238
239static Lisp_Object Qself_insert_command;
240static Lisp_Object Qforward_char;
241static Lisp_Object Qbackward_char;
242Lisp_Object Qundefined;
243static Lisp_Object Qtimer_event_handler;
244
245/* `read_key_sequence' stores here the command definition of the 230/* `read_key_sequence' stores here the command definition of the
246 key sequence that it reads. */ 231 key sequence that it reads. */
247static Lisp_Object read_key_sequence_cmd; 232static Lisp_Object read_key_sequence_cmd;
248static Lisp_Object read_key_sequence_remapped; 233static Lisp_Object read_key_sequence_remapped;
249 234
250static Lisp_Object Qinput_method_function;
251
252static Lisp_Object Qdeactivate_mark;
253
254Lisp_Object Qrecompute_lucid_menubar, Qactivate_menubar_hook;
255
256static Lisp_Object Qecho_area_clear_hook;
257
258/* Hooks to run before and after each command. */
259static Lisp_Object Qpre_command_hook;
260static Lisp_Object Qpost_command_hook;
261
262static Lisp_Object Qdeferred_action_function;
263
264static Lisp_Object Qdelayed_warnings_hook;
265
266static Lisp_Object Qinput_method_exit_on_first_char;
267static Lisp_Object Qinput_method_use_echo_area;
268
269static Lisp_Object Qhelp_form_show;
270
271/* File in which we write all commands we read. */ 235/* File in which we write all commands we read. */
272static FILE *dribble; 236static FILE *dribble;
273 237
@@ -346,83 +310,12 @@ static struct input_event * volatile kbd_store_ptr;
346 dequeuing functions? Such a flag could be screwed up by interrupts 310 dequeuing functions? Such a flag could be screwed up by interrupts
347 at inopportune times. */ 311 at inopportune times. */
348 312
349/* Symbols to head events. */
350static Lisp_Object Qmouse_movement;
351static Lisp_Object Qscroll_bar_movement;
352Lisp_Object Qswitch_frame;
353static Lisp_Object Qfocus_in, Qfocus_out;
354static Lisp_Object Qdelete_frame;
355static Lisp_Object Qiconify_frame;
356static Lisp_Object Qmake_frame_visible;
357static Lisp_Object Qselect_window;
358Lisp_Object Qhelp_echo;
359
360static Lisp_Object Qmouse_fixup_help_message;
361
362/* Symbols to denote kinds of events. */
363static Lisp_Object Qfunction_key;
364Lisp_Object Qmouse_click;
365#ifdef HAVE_NTGUI
366Lisp_Object Qlanguage_change;
367#endif
368static Lisp_Object Qdrag_n_drop;
369static Lisp_Object Qsave_session;
370#ifdef HAVE_DBUS
371static Lisp_Object Qdbus_event;
372#endif
373#ifdef USE_FILE_NOTIFY
374static Lisp_Object Qfile_notify;
375#endif /* USE_FILE_NOTIFY */
376static Lisp_Object Qconfig_changed_event;
377
378/* Lisp_Object Qmouse_movement; - also an event header */
379
380/* Properties of event headers. */
381Lisp_Object Qevent_kind;
382static Lisp_Object Qevent_symbol_elements;
383
384/* Menu and tool bar item parts. */
385static Lisp_Object Qmenu_enable;
386static Lisp_Object QCenable, QCvisible, QChelp, QCkeys, QCkey_sequence;
387Lisp_Object QCfilter;
388
389/* Non-nil disable property on a command means
390 do not execute it; call disabled-command-function's value instead. */
391Lisp_Object QCtoggle, QCradio;
392static Lisp_Object QCbutton, QClabel;
393
394static Lisp_Object QCvert_only;
395
396/* An event header symbol HEAD may have a property named
397 Qevent_symbol_element_mask, which is of the form (BASE MODIFIERS);
398 BASE is the base, unmodified version of HEAD, and MODIFIERS is the
399 mask of modifiers applied to it. If present, this is used to help
400 speed up parse_modifiers. */
401Lisp_Object Qevent_symbol_element_mask;
402
403/* An unmodified event header BASE may have a property named
404 Qmodifier_cache, which is an alist mapping modifier masks onto
405 modified versions of BASE. If present, this helps speed up
406 apply_modifiers. */
407static Lisp_Object Qmodifier_cache;
408
409/* Symbols to use for parts of windows. */
410Lisp_Object Qmode_line;
411Lisp_Object Qvertical_line;
412Lisp_Object Qright_divider, Qbottom_divider;
413Lisp_Object Qmenu_bar;
414
415static Lisp_Object Qecho_keystrokes;
416
417static void recursive_edit_unwind (Lisp_Object buffer); 313static void recursive_edit_unwind (Lisp_Object buffer);
418static Lisp_Object command_loop (void); 314static Lisp_Object command_loop (void);
419static Lisp_Object Qcommand_execute;
420 315
421static void echo_now (void); 316static void echo_now (void);
422static ptrdiff_t echo_length (void); 317static ptrdiff_t echo_length (void);
423 318
424static Lisp_Object Qpolling_period;
425
426/* Incremented whenever a timer is run. */ 319/* Incremented whenever a timer is run. */
427unsigned timers_run; 320unsigned timers_run;
428 321
@@ -1713,10 +1606,7 @@ command_loop_1 (void)
1713 } 1606 }
1714 1607
1715 if (current_buffer != prev_buffer || MODIFF != prev_modiff) 1608 if (current_buffer != prev_buffer || MODIFF != prev_modiff)
1716 { 1609 run_hook (intern ("activate-mark-hook"));
1717 Lisp_Object hook = intern ("activate-mark-hook");
1718 Frun_hooks (1, &hook);
1719 }
1720 } 1610 }
1721 1611
1722 Vsaved_region_selection = Qnil; 1612 Vsaved_region_selection = Qnil;
@@ -5278,22 +5168,17 @@ static const char *const lispy_drag_n_drop_names[] =
5278 "drag-n-drop" 5168 "drag-n-drop"
5279}; 5169};
5280 5170
5281/* Scroll bar parts. */
5282static Lisp_Object Qabove_handle, Qhandle, Qbelow_handle;
5283static Lisp_Object Qbefore_handle, Qhorizontal_handle, Qafter_handle;
5284Lisp_Object Qup, Qdown, Qtop, Qbottom;
5285static Lisp_Object Qleftmost, Qrightmost;
5286static Lisp_Object Qend_scroll;
5287static Lisp_Object Qratio;
5288
5289/* An array of scroll bar parts, indexed by an enum scroll_bar_part value. 5171/* An array of scroll bar parts, indexed by an enum scroll_bar_part value.
5290 Note that Qnil corresponds to scroll_bar_nowhere and should not appear 5172 Note that Qnil corresponds to scroll_bar_nowhere and should not appear
5291 in Lisp events. */ 5173 in Lisp events. */
5292static Lisp_Object *const scroll_bar_parts[] = { 5174static struct Lisp_Symbol *const scroll_bar_parts[] = {
5293 &Qnil, &Qabove_handle, &Qhandle, &Qbelow_handle, 5175 XSYMBOL_INIT (Qnil), XSYMBOL_INIT (Qabove_handle), XSYMBOL_INIT (Qhandle),
5294 &Qup, &Qdown, &Qtop, &Qbottom, &Qend_scroll, &Qratio, 5176 XSYMBOL_INIT (Qbelow_handle), XSYMBOL_INIT (Qup), XSYMBOL_INIT (Qdown),
5295 &Qbefore_handle, &Qhorizontal_handle, &Qafter_handle, 5177 XSYMBOL_INIT (Qtop), XSYMBOL_INIT (Qbottom), XSYMBOL_INIT (Qend_scroll),
5296 &Qleft, &Qright, &Qleftmost, &Qrightmost, &Qend_scroll, &Qratio 5178 XSYMBOL_INIT (Qratio), XSYMBOL_INIT (Qbefore_handle),
5179 XSYMBOL_INIT (Qhorizontal_handle), XSYMBOL_INIT (Qafter_handle),
5180 XSYMBOL_INIT (Qleft), XSYMBOL_INIT (Qright), XSYMBOL_INIT (Qleftmost),
5181 XSYMBOL_INIT (Qrightmost), XSYMBOL_INIT (Qend_scroll), XSYMBOL_INIT (Qratio)
5297}; 5182};
5298 5183
5299/* A vector, indexed by button number, giving the down-going location 5184/* A vector, indexed by button number, giving the down-going location
@@ -5566,7 +5451,8 @@ static Lisp_Object
5566make_scroll_bar_position (struct input_event *ev, Lisp_Object type) 5451make_scroll_bar_position (struct input_event *ev, Lisp_Object type)
5567{ 5452{
5568 return list5 (ev->frame_or_window, type, Fcons (ev->x, ev->y), 5453 return list5 (ev->frame_or_window, type, Fcons (ev->x, ev->y),
5569 make_number (ev->timestamp), *scroll_bar_parts[ev->part]); 5454 make_number (ev->timestamp),
5455 make_lisp_symbol (scroll_bar_parts[ev->part]));
5570} 5456}
5571 5457
5572/* Given a struct input_event, build the lisp event which represents 5458/* Given a struct input_event, build the lisp event which represents
@@ -6205,7 +6091,7 @@ make_lispy_movement (struct frame *frame, Lisp_Object bar_window, enum scroll_ba
6205 { 6091 {
6206 Lisp_Object part_sym; 6092 Lisp_Object part_sym;
6207 6093
6208 part_sym = *scroll_bar_parts[(int) part]; 6094 part_sym = make_lisp_symbol (scroll_bar_parts[part]);
6209 return list2 (Qscroll_bar_movement, 6095 return list2 (Qscroll_bar_movement,
6210 list5 (bar_window, 6096 list5 (bar_window,
6211 Qvertical_scroll_bar, 6097 Qvertical_scroll_bar,
@@ -8069,11 +7955,6 @@ static Lisp_Object tool_bar_item_properties;
8069 7955
8070static int ntool_bar_items; 7956static int ntool_bar_items;
8071 7957
8072/* The symbols `:image' and `:rtl'. */
8073
8074static Lisp_Object QCimage;
8075static Lisp_Object QCrtl;
8076
8077/* Function prototypes. */ 7958/* Function prototypes. */
8078 7959
8079static void init_tool_bar_items (Lisp_Object); 7960static void init_tool_bar_items (Lisp_Object);
@@ -10332,7 +10213,6 @@ On such systems, Emacs starts a subshell instead of suspending. */)
10332 int old_height, old_width; 10213 int old_height, old_width;
10333 int width, height; 10214 int width, height;
10334 struct gcpro gcpro1; 10215 struct gcpro gcpro1;
10335 Lisp_Object hook;
10336 10216
10337 if (tty_list && tty_list->next) 10217 if (tty_list && tty_list->next)
10338 error ("There are other tty frames open; close them before suspending Emacs"); 10218 error ("There are other tty frames open; close them before suspending Emacs");
@@ -10340,9 +10220,7 @@ On such systems, Emacs starts a subshell instead of suspending. */)
10340 if (!NILP (stuffstring)) 10220 if (!NILP (stuffstring))
10341 CHECK_STRING (stuffstring); 10221 CHECK_STRING (stuffstring);
10342 10222
10343 /* Run the functions in suspend-hook. */ 10223 run_hook (intern ("suspend-hook"));
10344 hook = intern ("suspend-hook");
10345 Frun_hooks (1, &hook);
10346 10224
10347 GCPRO1 (stuffstring); 10225 GCPRO1 (stuffstring);
10348 get_tty_size (fileno (CURTTY ()->input), &old_width, &old_height); 10226 get_tty_size (fileno (CURTTY ()->input), &old_width, &old_height);
@@ -10366,9 +10244,7 @@ On such systems, Emacs starts a subshell instead of suspending. */)
10366 height - FRAME_MENU_BAR_LINES (SELECTED_FRAME ()), 10244 height - FRAME_MENU_BAR_LINES (SELECTED_FRAME ()),
10367 0, 0, 0, 0); 10245 0, 0, 0, 0);
10368 10246
10369 /* Run suspend-resume-hook. */ 10247 run_hook (intern ("suspend-resume-hook"));
10370 hook = intern ("suspend-resume-hook");
10371 Frun_hooks (1, &hook);
10372 10248
10373 UNGCPRO; 10249 UNGCPRO;
10374 return Qnil; 10250 return Qnil;
@@ -11112,26 +10988,30 @@ init_keyboard (void)
11112#endif 10988#endif
11113} 10989}
11114 10990
11115/* This type's only use is in syms_of_keyboard, to initialize the 10991/* This type's only use is in syms_of_keyboard, to put properties on the
11116 event header symbols and put properties on them. */ 10992 event header symbols. */
11117struct event_head { 10993struct event_head {
11118 Lisp_Object *var; 10994 struct Lisp_Symbol *var;
11119 const char *name; 10995 struct Lisp_Symbol *kind;
11120 Lisp_Object *kind;
11121}; 10996};
11122 10997
10998
10999
11123static const struct event_head head_table[] = { 11000static const struct event_head head_table[] = {
11124 {&Qmouse_movement, "mouse-movement", &Qmouse_movement}, 11001 {XSYMBOL_INIT (Qmouse_movement), XSYMBOL_INIT (Qmouse_movement)},
11125 {&Qscroll_bar_movement, "scroll-bar-movement", &Qmouse_movement}, 11002 {XSYMBOL_INIT (Qscroll_bar_movement), XSYMBOL_INIT (Qmouse_movement)},
11126 {&Qswitch_frame, "switch-frame", &Qswitch_frame}, 11003
11127 {&Qfocus_in, "focus-in", &Qfocus_in}, 11004 /* Some of the event heads. */
11128 {&Qfocus_out, "focus-out", &Qfocus_out}, 11005 {XSYMBOL_INIT (Qswitch_frame), XSYMBOL_INIT (Qswitch_frame)},
11129 {&Qdelete_frame, "delete-frame", &Qdelete_frame}, 11006
11130 {&Qiconify_frame, "iconify-frame", &Qiconify_frame}, 11007 {XSYMBOL_INIT (Qfocus_in), XSYMBOL_INIT (Qfocus_in)},
11131 {&Qmake_frame_visible, "make-frame-visible", &Qmake_frame_visible}, 11008 {XSYMBOL_INIT (Qfocus_out), XSYMBOL_INIT (Qfocus_out)},
11009 {XSYMBOL_INIT (Qdelete_frame), XSYMBOL_INIT (Qdelete_frame)},
11010 {XSYMBOL_INIT (Qiconify_frame), XSYMBOL_INIT (Qiconify_frame)},
11011 {XSYMBOL_INIT (Qmake_frame_visible), XSYMBOL_INIT (Qmake_frame_visible)},
11132 /* `select-window' should be handled just like `switch-frame' 11012 /* `select-window' should be handled just like `switch-frame'
11133 in read_key_sequence. */ 11013 in read_key_sequence. */
11134 {&Qselect_window, "select-window", &Qswitch_frame} 11014 {XSYMBOL_INIT (Qselect_window), XSYMBOL_INIT (Qswitch_frame)}
11135}; 11015};
11136 11016
11137void 11017void
@@ -11170,17 +11050,29 @@ syms_of_keyboard (void)
11170 DEFSYM (Qself_insert_command, "self-insert-command"); 11050 DEFSYM (Qself_insert_command, "self-insert-command");
11171 DEFSYM (Qforward_char, "forward-char"); 11051 DEFSYM (Qforward_char, "forward-char");
11172 DEFSYM (Qbackward_char, "backward-char"); 11052 DEFSYM (Qbackward_char, "backward-char");
11053
11054 /* Non-nil disable property on a command means do not execute it;
11055 call disabled-command-function's value instead. */
11173 DEFSYM (Qdisabled, "disabled"); 11056 DEFSYM (Qdisabled, "disabled");
11057
11174 DEFSYM (Qundefined, "undefined"); 11058 DEFSYM (Qundefined, "undefined");
11059
11060 /* Hooks to run before and after each command. */
11175 DEFSYM (Qpre_command_hook, "pre-command-hook"); 11061 DEFSYM (Qpre_command_hook, "pre-command-hook");
11176 DEFSYM (Qpost_command_hook, "post-command-hook"); 11062 DEFSYM (Qpost_command_hook, "post-command-hook");
11063
11177 DEFSYM (Qdeferred_action_function, "deferred-action-function"); 11064 DEFSYM (Qdeferred_action_function, "deferred-action-function");
11178 DEFSYM (Qdelayed_warnings_hook, "delayed-warnings-hook"); 11065 DEFSYM (Qdelayed_warnings_hook, "delayed-warnings-hook");
11179 DEFSYM (Qfunction_key, "function-key"); 11066 DEFSYM (Qfunction_key, "function-key");
11067
11068 /* The values of Qevent_kind properties. */
11180 DEFSYM (Qmouse_click, "mouse-click"); 11069 DEFSYM (Qmouse_click, "mouse-click");
11070
11181 DEFSYM (Qdrag_n_drop, "drag-n-drop"); 11071 DEFSYM (Qdrag_n_drop, "drag-n-drop");
11182 DEFSYM (Qsave_session, "save-session"); 11072 DEFSYM (Qsave_session, "save-session");
11183 DEFSYM (Qconfig_changed_event, "config-changed-event"); 11073 DEFSYM (Qconfig_changed_event, "config-changed-event");
11074
11075 /* Menu and tool bar item parts. */
11184 DEFSYM (Qmenu_enable, "menu-enable"); 11076 DEFSYM (Qmenu_enable, "menu-enable");
11185 11077
11186#ifdef HAVE_NTGUI 11078#ifdef HAVE_NTGUI
@@ -11195,6 +11087,7 @@ syms_of_keyboard (void)
11195 DEFSYM (Qfile_notify, "file-notify"); 11087 DEFSYM (Qfile_notify, "file-notify");
11196#endif /* USE_FILE_NOTIFY */ 11088#endif /* USE_FILE_NOTIFY */
11197 11089
11090 /* Menu and tool bar item parts. */
11198 DEFSYM (QCenable, ":enable"); 11091 DEFSYM (QCenable, ":enable");
11199 DEFSYM (QCvisible, ":visible"); 11092 DEFSYM (QCvisible, ":visible");
11200 DEFSYM (QChelp, ":help"); 11093 DEFSYM (QChelp, ":help");
@@ -11202,14 +11095,16 @@ syms_of_keyboard (void)
11202 DEFSYM (QCbutton, ":button"); 11095 DEFSYM (QCbutton, ":button");
11203 DEFSYM (QCkeys, ":keys"); 11096 DEFSYM (QCkeys, ":keys");
11204 DEFSYM (QCkey_sequence, ":key-sequence"); 11097 DEFSYM (QCkey_sequence, ":key-sequence");
11098
11099 /* Non-nil disable property on a command means
11100 do not execute it; call disabled-command-function's value instead. */
11205 DEFSYM (QCtoggle, ":toggle"); 11101 DEFSYM (QCtoggle, ":toggle");
11206 DEFSYM (QCradio, ":radio"); 11102 DEFSYM (QCradio, ":radio");
11207 DEFSYM (QClabel, ":label"); 11103 DEFSYM (QClabel, ":label");
11208 DEFSYM (QCvert_only, ":vert-only"); 11104 DEFSYM (QCvert_only, ":vert-only");
11209 11105
11210 DEFSYM (Qmode_line, "mode-line"); 11106 /* Symbols to use for parts of windows. */
11211 DEFSYM (Qvertical_line, "vertical-line"); 11107 DEFSYM (Qvertical_line, "vertical-line");
11212 DEFSYM (Qmenu_bar, "menu-bar");
11213 DEFSYM (Qright_divider, "right-divider"); 11108 DEFSYM (Qright_divider, "right-divider");
11214 DEFSYM (Qbottom_divider, "bottom-divider"); 11109 DEFSYM (Qbottom_divider, "bottom-divider");
11215 11110
@@ -11232,9 +11127,21 @@ syms_of_keyboard (void)
11232 DEFSYM (Qleftmost, "leftmost"); 11127 DEFSYM (Qleftmost, "leftmost");
11233 DEFSYM (Qrightmost, "rightmost"); 11128 DEFSYM (Qrightmost, "rightmost");
11234 11129
11130 /* Properties of event headers. */
11235 DEFSYM (Qevent_kind, "event-kind"); 11131 DEFSYM (Qevent_kind, "event-kind");
11236 DEFSYM (Qevent_symbol_elements, "event-symbol-elements"); 11132 DEFSYM (Qevent_symbol_elements, "event-symbol-elements");
11133
11134 /* An event header symbol HEAD may have a property named
11135 Qevent_symbol_element_mask, which is of the form (BASE MODIFIERS);
11136 BASE is the base, unmodified version of HEAD, and MODIFIERS is the
11137 mask of modifiers applied to it. If present, this is used to help
11138 speed up parse_modifiers. */
11237 DEFSYM (Qevent_symbol_element_mask, "event-symbol-element-mask"); 11139 DEFSYM (Qevent_symbol_element_mask, "event-symbol-element-mask");
11140
11141 /* An unmodified event header BASE may have a property named
11142 Qmodifier_cache, which is an alist mapping modifier masks onto
11143 modified versions of BASE. If present, this helps speed up
11144 apply_modifiers. */
11238 DEFSYM (Qmodifier_cache, "modifier-cache"); 11145 DEFSYM (Qmodifier_cache, "modifier-cache");
11239 11146
11240 DEFSYM (Qrecompute_lucid_menubar, "recompute-lucid-menubar"); 11147 DEFSYM (Qrecompute_lucid_menubar, "recompute-lucid-menubar");
@@ -11243,7 +11150,10 @@ syms_of_keyboard (void)
11243 DEFSYM (Qpolling_period, "polling-period"); 11150 DEFSYM (Qpolling_period, "polling-period");
11244 11151
11245 DEFSYM (Qgui_set_selection, "gui-set-selection"); 11152 DEFSYM (Qgui_set_selection, "gui-set-selection");
11153
11154 /* The primary selection. */
11246 DEFSYM (QPRIMARY, "PRIMARY"); 11155 DEFSYM (QPRIMARY, "PRIMARY");
11156
11247 DEFSYM (Qhandle_switch_frame, "handle-switch-frame"); 11157 DEFSYM (Qhandle_switch_frame, "handle-switch-frame");
11248 DEFSYM (Qhandle_select_window, "handle-select-window"); 11158 DEFSYM (Qhandle_select_window, "handle-select-window");
11249 11159
@@ -11258,17 +11168,26 @@ syms_of_keyboard (void)
11258 Fset (Qinput_method_exit_on_first_char, Qnil); 11168 Fset (Qinput_method_exit_on_first_char, Qnil);
11259 Fset (Qinput_method_use_echo_area, Qnil); 11169 Fset (Qinput_method_use_echo_area, Qnil);
11260 11170
11171 /* Symbols to head events. */
11172 DEFSYM (Qmouse_movement, "mouse-movement");
11173 DEFSYM (Qscroll_bar_movement, "scroll-bar-movement");
11174 DEFSYM (Qswitch_frame, "switch-frame");
11175 DEFSYM (Qfocus_in, "focus-in");
11176 DEFSYM (Qfocus_out, "focus-out");
11177 DEFSYM (Qdelete_frame, "delete-frame");
11178 DEFSYM (Qiconify_frame, "iconify-frame");
11179 DEFSYM (Qmake_frame_visible, "make-frame-visible");
11180 DEFSYM (Qselect_window, "select-window");
11261 { 11181 {
11262 int i; 11182 int i;
11263 int len = ARRAYELTS (head_table);
11264 11183
11265 for (i = 0; i < len; i++) 11184 for (i = 0; i < ARRAYELTS (head_table); i++)
11266 { 11185 {
11267 const struct event_head *p = &head_table[i]; 11186 const struct event_head *p = &head_table[i];
11268 *p->var = intern_c_string (p->name); 11187 Lisp_Object var = make_lisp_symbol (p->var);
11269 staticpro (p->var); 11188 Lisp_Object kind = make_lisp_symbol (p->kind);
11270 Fput (*p->var, Qevent_kind, *p->kind); 11189 Fput (var, Qevent_kind, kind);
11271 Fput (*p->var, Qevent_symbol_elements, list1 (*p->var)); 11190 Fput (var, Qevent_symbol_elements, list1 (var));
11272 } 11191 }
11273 } 11192 }
11274 11193
@@ -11594,13 +11513,13 @@ with no modifiers; thus, setting `extra-keyboard-modifiers' to zero
11594cancels any modification. */); 11513cancels any modification. */);
11595 extra_keyboard_modifiers = 0; 11514 extra_keyboard_modifiers = 0;
11596 11515
11516 DEFSYM (Qdeactivate_mark, "deactivate-mark");
11597 DEFVAR_LISP ("deactivate-mark", Vdeactivate_mark, 11517 DEFVAR_LISP ("deactivate-mark", Vdeactivate_mark,
11598 doc: /* If an editing command sets this to t, deactivate the mark afterward. 11518 doc: /* If an editing command sets this to t, deactivate the mark afterward.
11599The command loop sets this to nil before each command, 11519The command loop sets this to nil before each command,
11600and tests the value when the command returns. 11520and tests the value when the command returns.
11601Buffer modification stores t in this variable. */); 11521Buffer modification stores t in this variable. */);
11602 Vdeactivate_mark = Qnil; 11522 Vdeactivate_mark = Qnil;
11603 DEFSYM (Qdeactivate_mark, "deactivate-mark");
11604 Fmake_variable_buffer_local (Qdeactivate_mark); 11523 Fmake_variable_buffer_local (Qdeactivate_mark);
11605 11524
11606 DEFVAR_LISP ("pre-command-hook", Vpre_command_hook, 11525 DEFVAR_LISP ("pre-command-hook", Vpre_command_hook,
diff --git a/src/keyboard.h b/src/keyboard.h
index 534e2018a52..0ce6d184482 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -248,8 +248,6 @@ extern ptrdiff_t this_command_key_count;
248 generated by the next character. */ 248 generated by the next character. */
249extern Lisp_Object internal_last_event_frame; 249extern Lisp_Object internal_last_event_frame;
250 250
251extern Lisp_Object Qrecompute_lucid_menubar, Qactivate_menubar_hook;
252
253/* This holds a Lisp vector that holds the properties of a single 251/* This holds a Lisp vector that holds the properties of a single
254 menu item while decoding it in parse_menu_item. 252 menu item while decoding it in parse_menu_item.
255 Using a Lisp vector to hold this information while we decode it 253 Using a Lisp vector to hold this information while we decode it
@@ -387,25 +385,10 @@ extern void unuse_menu_items (void);
387#define POSN_INBUFFER_P(posn) (NILP (POSN_STRING (posn))) 385#define POSN_INBUFFER_P(posn) (NILP (POSN_STRING (posn)))
388#define POSN_BUFFER_POSN(posn) (Fnth (make_number (5), (posn))) 386#define POSN_BUFFER_POSN(posn) (Fnth (make_number (5), (posn)))
389 387
390/* Some of the event heads. */
391extern Lisp_Object Qswitch_frame;
392
393/* Properties on event heads. */
394extern Lisp_Object Qevent_kind;
395
396/* The values of Qevent_kind properties. */
397extern Lisp_Object Qmouse_click;
398
399extern Lisp_Object Qhelp_echo;
400
401/* Getting the kind of an event head. */ 388/* Getting the kind of an event head. */
402#define EVENT_HEAD_KIND(event_head) \ 389#define EVENT_HEAD_KIND(event_head) \
403 (Fget ((event_head), Qevent_kind)) 390 (Fget ((event_head), Qevent_kind))
404 391
405/* Symbols to use for non-text mouse positions. */
406extern Lisp_Object Qmode_line, Qvertical_line, Qheader_line;
407extern Lisp_Object Qright_divider, Qbottom_divider;
408
409/* True while doing kbd input. */ 392/* True while doing kbd input. */
410extern bool waiting_for_input; 393extern bool waiting_for_input;
411 394
@@ -415,9 +398,6 @@ extern struct timespec *input_available_clear_time;
415 398
416extern bool ignore_mouse_drag_p; 399extern bool ignore_mouse_drag_p;
417 400
418/* The primary selection. */
419extern Lisp_Object QPRIMARY;
420
421extern Lisp_Object parse_modifiers (Lisp_Object); 401extern Lisp_Object parse_modifiers (Lisp_Object);
422extern Lisp_Object reorder_modifiers (Lisp_Object); 402extern Lisp_Object reorder_modifiers (Lisp_Object);
423extern Lisp_Object read_char (int, Lisp_Object, Lisp_Object, 403extern Lisp_Object read_char (int, Lisp_Object, Lisp_Object,
@@ -428,17 +408,6 @@ extern int parse_solitary_modifier (Lisp_Object symbol);
428/* This is like Vthis_command, except that commands never set it. */ 408/* This is like Vthis_command, except that commands never set it. */
429extern Lisp_Object real_this_command; 409extern Lisp_Object real_this_command;
430 410
431/* Non-nil disable property on a command means
432 do not execute it; call disabled-command-function's value instead. */
433extern Lisp_Object QCtoggle, QCradio;
434
435/* An event header symbol HEAD may have a property named
436 Qevent_symbol_element_mask, which is of the form (BASE MODIFIERS);
437 BASE is the base, unmodified version of HEAD, and MODIFIERS is the
438 mask of modifiers applied to it. If present, this is used to help
439 speed up parse_modifiers. */
440extern Lisp_Object Qevent_symbol_element_mask;
441
442extern int quit_char; 411extern int quit_char;
443 412
444extern unsigned int timers_run; 413extern unsigned int timers_run;
diff --git a/src/keymap.c b/src/keymap.c
index ab21a226271..9c7b4d29a3e 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -76,12 +76,6 @@ Lisp_Object control_x_map; /* The keymap used for globally bound
76 bindings when spaces are not encouraged 76 bindings when spaces are not encouraged
77 in the minibuf. */ 77 in the minibuf. */
78 78
79/* Keymap used for minibuffers when doing completion. */
80/* Keymap used for minibuffers when doing completion and require a match. */
81static Lisp_Object Qkeymapp, Qnon_ascii;
82Lisp_Object Qkeymap, Qmenu_item, Qremap;
83static Lisp_Object QCadvertised_binding;
84
85/* Alist of elements like (DEL . "\d"). */ 79/* Alist of elements like (DEL . "\d"). */
86static Lisp_Object exclude_keys; 80static Lisp_Object exclude_keys;
87 81
@@ -654,8 +648,6 @@ map_keymap (Lisp_Object map, map_keymap_function_t fun, Lisp_Object args,
654 UNGCPRO; 648 UNGCPRO;
655} 649}
656 650
657static Lisp_Object Qkeymap_canonicalize;
658
659/* Same as map_keymap, but does it right, properly eliminating duplicate 651/* Same as map_keymap, but does it right, properly eliminating duplicate
660 bindings due to inheritance. */ 652 bindings due to inheritance. */
661void 653void
@@ -1998,7 +1990,6 @@ then the value includes only maps for prefixes that start with PREFIX. */)
1998 } 1990 }
1999 return maps; 1991 return maps;
2000} 1992}
2001static Lisp_Object Qsingle_key_description, Qkey_description;
2002 1993
2003/* This function cannot GC. */ 1994/* This function cannot GC. */
2004 1995
@@ -3734,12 +3725,15 @@ be preferred. */);
3734 Vwhere_is_preferred_modifier = Qnil; 3725 Vwhere_is_preferred_modifier = Qnil;
3735 where_is_preferred_modifier = 0; 3726 where_is_preferred_modifier = 0;
3736 3727
3728 DEFSYM (Qmenu_bar, "menu-bar");
3729 DEFSYM (Qmode_line, "mode-line");
3730
3737 staticpro (&Vmouse_events); 3731 staticpro (&Vmouse_events);
3738 Vmouse_events = listn (CONSTYPE_PURE, 9, 3732 Vmouse_events = listn (CONSTYPE_PURE, 9,
3739 intern_c_string ("menu-bar"), 3733 Qmenu_bar,
3740 intern_c_string ("tool-bar"), 3734 intern_c_string ("tool-bar"),
3741 intern_c_string ("header-line"), 3735 intern_c_string ("header-line"),
3742 intern_c_string ("mode-line"), 3736 Qmode_line,
3743 intern_c_string ("mouse-1"), 3737 intern_c_string ("mouse-1"),
3744 intern_c_string ("mouse-2"), 3738 intern_c_string ("mouse-2"),
3745 intern_c_string ("mouse-3"), 3739 intern_c_string ("mouse-3"),
@@ -3748,6 +3742,9 @@ be preferred. */);
3748 3742
3749 DEFSYM (Qsingle_key_description, "single-key-description"); 3743 DEFSYM (Qsingle_key_description, "single-key-description");
3750 DEFSYM (Qkey_description, "key-description"); 3744 DEFSYM (Qkey_description, "key-description");
3745
3746 /* Keymap used for minibuffers when doing completion. */
3747 /* Keymap used for minibuffers when doing completion and require a match. */
3751 DEFSYM (Qkeymapp, "keymapp"); 3748 DEFSYM (Qkeymapp, "keymapp");
3752 DEFSYM (Qnon_ascii, "non-ascii"); 3749 DEFSYM (Qnon_ascii, "non-ascii");
3753 DEFSYM (Qmenu_item, "menu-item"); 3750 DEFSYM (Qmenu_item, "menu-item");
diff --git a/src/keymap.h b/src/keymap.h
index 4649acb719f..215dd3f289f 100644
--- a/src/keymap.h
+++ b/src/keymap.h
@@ -30,9 +30,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
30#define KEY_DESCRIPTION_SIZE ((2 * 6) + 1 + (CHARACTERBITS / 3) + 1 + 1) 30#define KEY_DESCRIPTION_SIZE ((2 * 6) + 1 + (CHARACTERBITS / 3) + 1 + 1)
31 31
32#define KEYMAPP(m) (!NILP (get_keymap (m, false, false))) 32#define KEYMAPP(m) (!NILP (get_keymap (m, false, false)))
33extern Lisp_Object Qkeymap, Qmenu_bar;
34extern Lisp_Object Qremap;
35extern Lisp_Object Qmenu_item;
36extern Lisp_Object current_global_map; 33extern Lisp_Object current_global_map;
37extern char *push_key_description (EMACS_INT, char *); 34extern char *push_key_description (EMACS_INT, char *);
38extern Lisp_Object access_keymap (Lisp_Object, Lisp_Object, bool, bool, bool); 35extern Lisp_Object access_keymap (Lisp_Object, Lisp_Object, bool, bool, bool);
diff --git a/src/lisp.h b/src/lisp.h
index 8d44b972717..962fed4d81f 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -562,7 +562,7 @@ enum Lisp_Fwd_Type
562 562
563typedef struct { EMACS_INT i; } Lisp_Object; 563typedef struct { EMACS_INT i; } Lisp_Object;
564 564
565#define LISP_INITIALLY_ZERO {0} 565#define LISP_INITIALLY(i) {i}
566 566
567#undef CHECK_LISP_OBJECT_TYPE 567#undef CHECK_LISP_OBJECT_TYPE
568enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = true }; 568enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = true };
@@ -571,9 +571,11 @@ enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = true };
571/* If a struct type is not wanted, define Lisp_Object as just a number. */ 571/* If a struct type is not wanted, define Lisp_Object as just a number. */
572 572
573typedef EMACS_INT Lisp_Object; 573typedef EMACS_INT Lisp_Object;
574#define LISP_INITIALLY_ZERO 0 574#define LISP_INITIALLY(i) (i)
575enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = false }; 575enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = false };
576#endif /* CHECK_LISP_OBJECT_TYPE */ 576#endif /* CHECK_LISP_OBJECT_TYPE */
577
578#define LISP_INITIALLY_ZERO LISP_INITIALLY (0)
577 579
578/* Forward declarations. */ 580/* Forward declarations. */
579 581
@@ -610,12 +612,6 @@ extern Lisp_Object char_table_ref (Lisp_Object, int);
610extern void char_table_set (Lisp_Object, int, Lisp_Object); 612extern void char_table_set (Lisp_Object, int, Lisp_Object);
611 613
612/* Defined in data.c. */ 614/* 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); 615extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object);
620extern _Noreturn void wrong_choice (Lisp_Object, Lisp_Object); 616extern _Noreturn void wrong_choice (Lisp_Object, Lisp_Object);
621 617
@@ -625,22 +621,116 @@ extern bool might_dump;
625 Used during startup to detect startup of dumped Emacs. */ 621 Used during startup to detect startup of dumped Emacs. */
626extern bool initialized; 622extern bool initialized;
627 623
628/* Defined in eval.c. */
629extern Lisp_Object Qautoload;
630
631/* Defined in floatfns.c. */ 624/* Defined in floatfns.c. */
632extern double extract_float (Lisp_Object); 625extern double extract_float (Lisp_Object);
633 626
634/* Defined in process.c. */ 627
635extern Lisp_Object Qprocessp; 628/* Interned state of a symbol. */
636 629
637/* Defined in window.c. */ 630enum symbol_interned
638extern Lisp_Object Qwindowp; 631{
632 SYMBOL_UNINTERNED = 0,
633 SYMBOL_INTERNED = 1,
634 SYMBOL_INTERNED_IN_INITIAL_OBARRAY = 2
635};
636
637enum symbol_redirect
638{
639 SYMBOL_PLAINVAL = 4,
640 SYMBOL_VARALIAS = 1,
641 SYMBOL_LOCALIZED = 2,
642 SYMBOL_FORWARDED = 3
643};
644
645struct Lisp_Symbol
646{
647 bool_bf gcmarkbit : 1;
648
649 /* Indicates where the value can be found:
650 0 : it's a plain var, the value is in the `value' field.
651 1 : it's a varalias, the value is really in the `alias' symbol.
652 2 : it's a localized var, the value is in the `blv' object.
653 3 : it's a forwarding variable, the value is in `forward'. */
654 ENUM_BF (symbol_redirect) redirect : 3;
655
656 /* Non-zero means symbol is constant, i.e. changing its value
657 should signal an error. If the value is 3, then the var
658 can be changed, but only by `defconst'. */
659 unsigned constant : 2;
660
661 /* Interned state of the symbol. This is an enumerator from
662 enum symbol_interned. */
663 unsigned interned : 2;
664
665 /* True means that this variable has been explicitly declared
666 special (with `defvar' etc), and shouldn't be lexically bound. */
667 bool_bf declared_special : 1;
668
669 /* True if pointed to from purespace and hence can't be GC'd. */
670 bool_bf pinned : 1;
671
672 /* The symbol's name, as a Lisp string. */
673 Lisp_Object name;
674
675 /* Value of the symbol or Qunbound if unbound. Which alternative of the
676 union is used depends on the `redirect' field above. */
677 union {
678 Lisp_Object value;
679 struct Lisp_Symbol *alias;
680 struct Lisp_Buffer_Local_Value *blv;
681 union Lisp_Fwd *fwd;
682 } val;
683
684 /* Function value of the symbol or Qnil if not fboundp. */
685 Lisp_Object function;
686
687 /* The symbol's property list. */
688 Lisp_Object plist;
689
690 /* Next symbol in obarray bucket, if the symbol is interned. */
691 struct Lisp_Symbol *next;
692};
693
694/* Declare a Lisp-callable function. The MAXARGS parameter has the same
695 meaning as in the DEFUN macro, and is used to construct a prototype. */
696/* We can use the same trick as in the DEFUN macro to generate the
697 appropriate prototype. */
698#define EXFUN(fnname, maxargs) \
699 extern Lisp_Object fnname DEFUN_ARGS_ ## maxargs
700
701/* Note that the weird token-substitution semantics of ANSI C makes
702 this work for MANY and UNEVALLED. */
703#define DEFUN_ARGS_MANY (ptrdiff_t, Lisp_Object *)
704#define DEFUN_ARGS_UNEVALLED (Lisp_Object)
705#define DEFUN_ARGS_0 (void)
706#define DEFUN_ARGS_1 (Lisp_Object)
707#define DEFUN_ARGS_2 (Lisp_Object, Lisp_Object)
708#define DEFUN_ARGS_3 (Lisp_Object, Lisp_Object, Lisp_Object)
709#define DEFUN_ARGS_4 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object)
710#define DEFUN_ARGS_5 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
711 Lisp_Object)
712#define DEFUN_ARGS_6 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
713 Lisp_Object, Lisp_Object)
714#define DEFUN_ARGS_7 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
715 Lisp_Object, Lisp_Object, Lisp_Object)
716#define DEFUN_ARGS_8 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
717 Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object)
718
719/* Yield an integer that contains TAG along with PTR. */
720#define TAG_PTR(tag, ptr) \
721 ((USE_LSB_TAG ? (tag) : (EMACS_UINT) (tag) << VALBITS) + (uintptr_t) (ptr))
722
723/* Declare extern constants for Lisp symbols. These can be helpful
724 when using a debugger like GDB, on older platforms where the debug
725 format does not represent C macros. Athough these symbols are
726 useless on modern platforms, they don't hurt performance all that much. */
727#define DEFINE_LISP_SYMBOL_BEGIN(name) \
728 DEFINE_GDB_SYMBOL_BEGIN (Lisp_Object, name)
729#define DEFINE_LISP_SYMBOL_END(name) \
730 DEFINE_GDB_SYMBOL_END (LISP_INITIALLY (TAG_PTR (Lisp_Symbol, name)))
731
732#include "globals.h"
639 733
640/* Defined in xdisp.c. */
641extern Lisp_Object Qimage;
642extern Lisp_Object Qfontification_functions;
643
644/* Convert a Lisp_Object to the corresponding EMACS_INT and vice versa. 734/* Convert a Lisp_Object to the corresponding EMACS_INT and vice versa.
645 At the machine level, these operations are no-ops. */ 735 At the machine level, these operations are no-ops. */
646LISP_MACRO_DEFUN (XLI, EMACS_INT, (Lisp_Object o), (o)) 736LISP_MACRO_DEFUN (XLI, EMACS_INT, (Lisp_Object o), (o))
@@ -861,6 +951,10 @@ XSTRING (Lisp_Object a)
861 951
862LISP_MACRO_DEFUN (XSYMBOL, struct Lisp_Symbol *, (Lisp_Object a), (a)) 952LISP_MACRO_DEFUN (XSYMBOL, struct Lisp_Symbol *, (Lisp_Object a), (a))
863 953
954/* XSYMBOL_INIT (Qfoo) is like XSYMBOL (Qfoo), except it is valid in
955 static initializers, and SYM must be a C-defined symbol. */
956#define XSYMBOL_INIT(sym) a##sym
957
864INLINE struct Lisp_Float * 958INLINE struct Lisp_Float *
865XFLOAT (Lisp_Object a) 959XFLOAT (Lisp_Object a)
866{ 960{
@@ -930,14 +1024,18 @@ XBOOL_VECTOR (Lisp_Object a)
930INLINE Lisp_Object 1024INLINE Lisp_Object
931make_lisp_ptr (void *ptr, enum Lisp_Type type) 1025make_lisp_ptr (void *ptr, enum Lisp_Type type)
932{ 1026{
933 EMACS_UINT utype = type; 1027 Lisp_Object a = XIL (TAG_PTR (type, ptr));
934 EMACS_UINT typebits = USE_LSB_TAG ? type : utype << VALBITS;
935 Lisp_Object a = XIL (typebits | (uintptr_t) ptr);
936 eassert (XTYPE (a) == type && XUNTAG (a, type) == ptr); 1028 eassert (XTYPE (a) == type && XUNTAG (a, type) == ptr);
937 return a; 1029 return a;
938} 1030}
939 1031
940INLINE Lisp_Object 1032INLINE Lisp_Object
1033make_lisp_symbol (struct Lisp_Symbol *sym)
1034{
1035 return make_lisp_ptr (sym, Lisp_Symbol);
1036}
1037
1038INLINE Lisp_Object
941make_lisp_proc (struct Lisp_Process *p) 1039make_lisp_proc (struct Lisp_Process *p)
942{ 1040{
943 return make_lisp_ptr (p, Lisp_Vectorlike); 1041 return make_lisp_ptr (p, Lisp_Vectorlike);
@@ -948,7 +1046,7 @@ make_lisp_proc (struct Lisp_Process *p)
948#define XSETCONS(a, b) ((a) = make_lisp_ptr (b, Lisp_Cons)) 1046#define XSETCONS(a, b) ((a) = make_lisp_ptr (b, Lisp_Cons))
949#define XSETVECTOR(a, b) ((a) = make_lisp_ptr (b, Lisp_Vectorlike)) 1047#define XSETVECTOR(a, b) ((a) = make_lisp_ptr (b, Lisp_Vectorlike))
950#define XSETSTRING(a, b) ((a) = make_lisp_ptr (b, Lisp_String)) 1048#define XSETSTRING(a, b) ((a) = make_lisp_ptr (b, Lisp_String))
951#define XSETSYMBOL(a, b) ((a) = make_lisp_ptr (b, Lisp_Symbol)) 1049#define XSETSYMBOL(a, b) ((a) = make_lisp_symbol (b))
952#define XSETFLOAT(a, b) ((a) = make_lisp_ptr (b, Lisp_Float)) 1050#define XSETFLOAT(a, b) ((a) = make_lisp_ptr (b, Lisp_Float))
953#define XSETMISC(a, b) ((a) = make_lisp_ptr (b, Lisp_Misc)) 1051#define XSETMISC(a, b) ((a) = make_lisp_ptr (b, Lisp_Misc))
954 1052
@@ -1555,72 +1653,6 @@ verify ((offsetof (struct Lisp_Sub_Char_Table, contents)
1555 Symbols 1653 Symbols
1556 ***********************************************************************/ 1654 ***********************************************************************/
1557 1655
1558/* Interned state of a symbol. */
1559
1560enum symbol_interned
1561{
1562 SYMBOL_UNINTERNED = 0,
1563 SYMBOL_INTERNED = 1,
1564 SYMBOL_INTERNED_IN_INITIAL_OBARRAY = 2
1565};
1566
1567enum symbol_redirect
1568{
1569 SYMBOL_PLAINVAL = 4,
1570 SYMBOL_VARALIAS = 1,
1571 SYMBOL_LOCALIZED = 2,
1572 SYMBOL_FORWARDED = 3
1573};
1574
1575struct Lisp_Symbol
1576{
1577 bool_bf gcmarkbit : 1;
1578
1579 /* Indicates where the value can be found:
1580 0 : it's a plain var, the value is in the `value' field.
1581 1 : it's a varalias, the value is really in the `alias' symbol.
1582 2 : it's a localized var, the value is in the `blv' object.
1583 3 : it's a forwarding variable, the value is in `forward'. */
1584 ENUM_BF (symbol_redirect) redirect : 3;
1585
1586 /* Non-zero means symbol is constant, i.e. changing its value
1587 should signal an error. If the value is 3, then the var
1588 can be changed, but only by `defconst'. */
1589 unsigned constant : 2;
1590
1591 /* Interned state of the symbol. This is an enumerator from
1592 enum symbol_interned. */
1593 unsigned interned : 2;
1594
1595 /* True means that this variable has been explicitly declared
1596 special (with `defvar' etc), and shouldn't be lexically bound. */
1597 bool_bf declared_special : 1;
1598
1599 /* True if pointed to from purespace and hence can't be GC'd. */
1600 bool_bf pinned : 1;
1601
1602 /* The symbol's name, as a Lisp string. */
1603 Lisp_Object name;
1604
1605 /* Value of the symbol or Qunbound if unbound. Which alternative of the
1606 union is used depends on the `redirect' field above. */
1607 union {
1608 Lisp_Object value;
1609 struct Lisp_Symbol *alias;
1610 struct Lisp_Buffer_Local_Value *blv;
1611 union Lisp_Fwd *fwd;
1612 } val;
1613
1614 /* Function value of the symbol or Qnil if not fboundp. */
1615 Lisp_Object function;
1616
1617 /* The symbol's property list. */
1618 Lisp_Object plist;
1619
1620 /* Next symbol in obarray bucket, if the symbol is interned. */
1621 struct Lisp_Symbol *next;
1622};
1623
1624/* Value is name of symbol. */ 1656/* Value is name of symbol. */
1625 1657
1626LISP_MACRO_DEFUN (SYMBOL_VAL, Lisp_Object, (struct Lisp_Symbol *sym), (sym)) 1658LISP_MACRO_DEFUN (SYMBOL_VAL, Lisp_Object, (struct Lisp_Symbol *sym), (sym))
@@ -1694,8 +1726,9 @@ SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P (Lisp_Object sym)
1694 1726
1695LISP_MACRO_DEFUN (SYMBOL_CONSTANT_P, int, (Lisp_Object sym), (sym)) 1727LISP_MACRO_DEFUN (SYMBOL_CONSTANT_P, int, (Lisp_Object sym), (sym))
1696 1728
1697#define DEFSYM(sym, name) \ 1729/* Placeholder for make-docfile to process. The actual symbol
1698 do { (sym) = intern_c_string ((name)); staticpro (&(sym)); } while (false) 1730 definition is done by lread.c's defsym. */
1731#define DEFSYM(sym, name) /* empty */
1699 1732
1700 1733
1701/*********************************************************************** 1734/***********************************************************************
@@ -2689,24 +2722,6 @@ CHECK_NUMBER_CDR (Lisp_Object x)
2689 Lisp_Object fnname 2722 Lisp_Object fnname
2690#endif 2723#endif
2691 2724
2692/* Note that the weird token-substitution semantics of ANSI C makes
2693 this work for MANY and UNEVALLED. */
2694#define DEFUN_ARGS_MANY (ptrdiff_t, Lisp_Object *)
2695#define DEFUN_ARGS_UNEVALLED (Lisp_Object)
2696#define DEFUN_ARGS_0 (void)
2697#define DEFUN_ARGS_1 (Lisp_Object)
2698#define DEFUN_ARGS_2 (Lisp_Object, Lisp_Object)
2699#define DEFUN_ARGS_3 (Lisp_Object, Lisp_Object, Lisp_Object)
2700#define DEFUN_ARGS_4 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object)
2701#define DEFUN_ARGS_5 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
2702 Lisp_Object)
2703#define DEFUN_ARGS_6 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
2704 Lisp_Object, Lisp_Object)
2705#define DEFUN_ARGS_7 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
2706 Lisp_Object, Lisp_Object, Lisp_Object)
2707#define DEFUN_ARGS_8 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
2708 Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object)
2709
2710/* True if OBJ is a Lisp function. */ 2725/* True if OBJ is a Lisp function. */
2711INLINE bool 2726INLINE bool
2712FUNCTIONP (Lisp_Object obj) 2727FUNCTIONP (Lisp_Object obj)
@@ -3255,15 +3270,6 @@ extern int gcpro_level;
3255 3270
3256void staticpro (Lisp_Object *); 3271void staticpro (Lisp_Object *);
3257 3272
3258/* Declare a Lisp-callable function. The MAXARGS parameter has the same
3259 meaning as in the DEFUN macro, and is used to construct a prototype. */
3260/* We can use the same trick as in the DEFUN macro to generate the
3261 appropriate prototype. */
3262#define EXFUN(fnname, maxargs) \
3263 extern Lisp_Object fnname DEFUN_ARGS_ ## maxargs
3264
3265#include "globals.h"
3266
3267/* Forward declarations for prototypes. */ 3273/* Forward declarations for prototypes. */
3268struct window; 3274struct window;
3269struct frame; 3275struct frame;
@@ -3382,30 +3388,6 @@ set_sub_char_table_contents (Lisp_Object table, ptrdiff_t idx, Lisp_Object val)
3382} 3388}
3383 3389
3384/* Defined in data.c. */ 3390/* Defined in data.c. */
3385extern Lisp_Object Qquote, Qunbound;
3386extern Lisp_Object Qerror_conditions, Qerror_message, Qtop_level;
3387extern Lisp_Object Qerror, Qquit, Qargs_out_of_range;
3388extern Lisp_Object Qvoid_variable, Qvoid_function;
3389extern Lisp_Object Qinvalid_read_syntax;
3390extern Lisp_Object Qinvalid_function, Qwrong_number_of_arguments, Qno_catch;
3391extern Lisp_Object Quser_error, Qend_of_file, Qarith_error, Qmark_inactive;
3392extern Lisp_Object Qbeginning_of_buffer, Qend_of_buffer, Qbuffer_read_only;
3393extern Lisp_Object Qtext_read_only;
3394extern Lisp_Object Qinteractive_form;
3395extern Lisp_Object Qcircular_list;
3396extern Lisp_Object Qsequencep;
3397extern Lisp_Object Qchar_or_string_p, Qinteger_or_marker_p;
3398extern Lisp_Object Qfboundp;
3399
3400extern Lisp_Object Qcdr;
3401
3402extern Lisp_Object Qrange_error, Qoverflow_error;
3403
3404extern Lisp_Object Qnumber_or_marker_p;
3405
3406extern Lisp_Object Qbuffer, Qinteger, Qsymbol;
3407
3408/* Defined in data.c. */
3409extern Lisp_Object indirect_function (Lisp_Object); 3391extern Lisp_Object indirect_function (Lisp_Object);
3410extern Lisp_Object find_symbol_value (Lisp_Object); 3392extern Lisp_Object find_symbol_value (Lisp_Object);
3411enum Arith_Comparison { 3393enum Arith_Comparison {
@@ -3461,7 +3443,6 @@ extern void syms_of_cmds (void);
3461extern void keys_of_cmds (void); 3443extern void keys_of_cmds (void);
3462 3444
3463/* Defined in coding.c. */ 3445/* Defined in coding.c. */
3464extern Lisp_Object Qcharset;
3465extern Lisp_Object detect_coding_system (const unsigned char *, ptrdiff_t, 3446extern Lisp_Object detect_coding_system (const unsigned char *, ptrdiff_t,
3466 ptrdiff_t, bool, bool, Lisp_Object); 3447 ptrdiff_t, bool, bool, Lisp_Object);
3467extern void init_coding (void); 3448extern void init_coding (void);
@@ -3485,14 +3466,10 @@ extern void init_syntax_once (void);
3485extern void syms_of_syntax (void); 3466extern void syms_of_syntax (void);
3486 3467
3487/* Defined in fns.c. */ 3468/* Defined in fns.c. */
3488extern Lisp_Object QCrehash_size, QCrehash_threshold;
3489enum { NEXT_ALMOST_PRIME_LIMIT = 11 }; 3469enum { NEXT_ALMOST_PRIME_LIMIT = 11 };
3490extern EMACS_INT next_almost_prime (EMACS_INT) ATTRIBUTE_CONST; 3470extern EMACS_INT next_almost_prime (EMACS_INT) ATTRIBUTE_CONST;
3491extern Lisp_Object larger_vector (Lisp_Object, ptrdiff_t, ptrdiff_t); 3471extern Lisp_Object larger_vector (Lisp_Object, ptrdiff_t, ptrdiff_t);
3492extern void sweep_weak_hash_tables (void); 3472extern void sweep_weak_hash_tables (void);
3493extern Lisp_Object Qcursor_in_echo_area;
3494extern Lisp_Object Qstring_lessp;
3495extern Lisp_Object QCsize, QCtest, QCweakness, Qequal, Qeq;
3496EMACS_UINT hash_string (char const *, ptrdiff_t); 3473EMACS_UINT hash_string (char const *, ptrdiff_t);
3497EMACS_UINT sxhash (Lisp_Object, int); 3474EMACS_UINT sxhash (Lisp_Object, int);
3498Lisp_Object make_hash_table (struct hash_table_test, Lisp_Object, Lisp_Object, 3475Lisp_Object make_hash_table (struct hash_table_test, Lisp_Object, Lisp_Object,
@@ -3532,15 +3509,11 @@ extern void init_fringe_once (void);
3532#endif /* HAVE_WINDOW_SYSTEM */ 3509#endif /* HAVE_WINDOW_SYSTEM */
3533 3510
3534/* Defined in image.c. */ 3511/* Defined in image.c. */
3535extern Lisp_Object QCascent, QCmargin, QCrelief;
3536extern Lisp_Object QCconversion;
3537extern int x_bitmap_mask (struct frame *, ptrdiff_t); 3512extern int x_bitmap_mask (struct frame *, ptrdiff_t);
3538extern void reset_image_types (void); 3513extern void reset_image_types (void);
3539extern void syms_of_image (void); 3514extern void syms_of_image (void);
3540 3515
3541/* Defined in insdel.c. */ 3516/* Defined in insdel.c. */
3542extern Lisp_Object Qinhibit_modification_hooks;
3543extern Lisp_Object Qregion_extract_function;
3544extern void move_gap_both (ptrdiff_t, ptrdiff_t); 3517extern void move_gap_both (ptrdiff_t, ptrdiff_t);
3545extern _Noreturn void buffer_overflow (void); 3518extern _Noreturn void buffer_overflow (void);
3546extern void make_gap (ptrdiff_t); 3519extern void make_gap (ptrdiff_t);
@@ -3595,18 +3568,6 @@ extern Lisp_Object Vwindow_system;
3595extern Lisp_Object sit_for (Lisp_Object, bool, int); 3568extern Lisp_Object sit_for (Lisp_Object, bool, int);
3596 3569
3597/* Defined in xdisp.c. */ 3570/* Defined in xdisp.c. */
3598extern Lisp_Object Qinhibit_point_motion_hooks;
3599extern Lisp_Object Qinhibit_redisplay;
3600extern Lisp_Object Qmenu_bar_update_hook;
3601extern Lisp_Object Qwindow_scroll_functions;
3602extern Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map;
3603extern Lisp_Object Qtext, Qboth, Qboth_horiz, Qtext_image_horiz;
3604extern Lisp_Object Qspace, Qcenter, QCalign_to;
3605extern Lisp_Object Qbar, Qhbar, Qhollow;
3606extern Lisp_Object Qleft_margin, Qright_margin;
3607extern Lisp_Object QCdata, QCfile;
3608extern Lisp_Object QCmap;
3609extern Lisp_Object Qrisky_local_variable;
3610extern bool noninteractive_need_newline; 3571extern bool noninteractive_need_newline;
3611extern Lisp_Object echo_area_buffer[2]; 3572extern Lisp_Object echo_area_buffer[2];
3612extern void add_to_log (const char *, Lisp_Object, Lisp_Object); 3573extern void add_to_log (const char *, Lisp_Object, Lisp_Object);
@@ -3740,8 +3701,6 @@ build_string (const char *str)
3740 3701
3741extern Lisp_Object pure_cons (Lisp_Object, Lisp_Object); 3702extern Lisp_Object pure_cons (Lisp_Object, Lisp_Object);
3742extern void make_byte_code (struct Lisp_Vector *); 3703extern void make_byte_code (struct Lisp_Vector *);
3743extern Lisp_Object Qautomatic_gc;
3744extern Lisp_Object Qchar_table_extra_slots;
3745extern struct Lisp_Vector *allocate_vector (EMACS_INT); 3704extern struct Lisp_Vector *allocate_vector (EMACS_INT);
3746 3705
3747/* Make an uninitialized vector for SIZE objects. NOTE: you must 3706/* Make an uninitialized vector for SIZE objects. NOTE: you must
@@ -3845,11 +3804,8 @@ extern void syms_of_chartab (void);
3845/* Defined in print.c. */ 3804/* Defined in print.c. */
3846extern Lisp_Object Vprin1_to_string_buffer; 3805extern Lisp_Object Vprin1_to_string_buffer;
3847extern void debug_print (Lisp_Object) EXTERNALLY_VISIBLE; 3806extern void debug_print (Lisp_Object) EXTERNALLY_VISIBLE;
3848extern Lisp_Object Qstandard_output;
3849extern Lisp_Object Qexternal_debugging_output;
3850extern void temp_output_buffer_setup (const char *); 3807extern void temp_output_buffer_setup (const char *);
3851extern int print_level; 3808extern int print_level;
3852extern Lisp_Object Qprint_escape_newlines;
3853extern void write_string (const char *, int); 3809extern void write_string (const char *, int);
3854extern void print_error_message (Lisp_Object, Lisp_Object, const char *, 3810extern void print_error_message (Lisp_Object, Lisp_Object, const char *,
3855 Lisp_Object); 3811 Lisp_Object);
@@ -3873,13 +3829,11 @@ extern ptrdiff_t evxprintf (char **, ptrdiff_t *, char const *, ptrdiff_t,
3873 ATTRIBUTE_FORMAT_PRINTF (5, 0); 3829 ATTRIBUTE_FORMAT_PRINTF (5, 0);
3874 3830
3875/* Defined in lread.c. */ 3831/* Defined in lread.c. */
3876extern Lisp_Object Qsize, Qvariable_documentation, Qstandard_input;
3877extern Lisp_Object Qbackquote, Qcomma, Qcomma_at, Qcomma_dot, Qfunction;
3878extern Lisp_Object Qlexical_binding;
3879extern Lisp_Object check_obarray (Lisp_Object); 3832extern Lisp_Object check_obarray (Lisp_Object);
3880extern Lisp_Object intern_1 (const char *, ptrdiff_t); 3833extern Lisp_Object intern_1 (const char *, ptrdiff_t);
3881extern Lisp_Object intern_c_string_1 (const char *, ptrdiff_t); 3834extern Lisp_Object intern_c_string_1 (const char *, ptrdiff_t);
3882extern Lisp_Object intern_driver (Lisp_Object, Lisp_Object, ptrdiff_t); 3835extern Lisp_Object intern_driver (Lisp_Object, Lisp_Object, Lisp_Object);
3836extern void init_symbol (Lisp_Object, Lisp_Object);
3883extern Lisp_Object oblookup (Lisp_Object, const char *, ptrdiff_t, ptrdiff_t); 3837extern Lisp_Object oblookup (Lisp_Object, const char *, ptrdiff_t, ptrdiff_t);
3884INLINE void 3838INLINE void
3885LOADHIST_ATTACH (Lisp_Object x) 3839LOADHIST_ATTACH (Lisp_Object x)
@@ -3911,10 +3865,8 @@ intern_c_string (const char *str)
3911 3865
3912/* Defined in eval.c. */ 3866/* Defined in eval.c. */
3913extern EMACS_INT lisp_eval_depth; 3867extern EMACS_INT lisp_eval_depth;
3914extern Lisp_Object Qexit, Qinteractive, Qcommandp, Qmacro;
3915extern Lisp_Object Qinhibit_quit, Qinternal_interpreter_environment, Qclosure;
3916extern Lisp_Object Qand_rest;
3917extern Lisp_Object Vautoload_queue; 3868extern Lisp_Object Vautoload_queue;
3869extern Lisp_Object Vrun_hooks;
3918extern Lisp_Object Vsignaling_function; 3870extern Lisp_Object Vsignaling_function;
3919extern Lisp_Object inhibit_lisp_code; 3871extern Lisp_Object inhibit_lisp_code;
3920extern struct handler *handlerlist; 3872extern struct handler *handlerlist;
@@ -3926,7 +3878,7 @@ extern struct handler *handlerlist;
3926 call1 (Vrun_hooks, Qmy_funny_hook); 3878 call1 (Vrun_hooks, Qmy_funny_hook);
3927 3879
3928 should no longer be used. */ 3880 should no longer be used. */
3929extern Lisp_Object Vrun_hooks; 3881extern void run_hook (Lisp_Object);
3930extern void run_hook_with_args_2 (Lisp_Object, Lisp_Object, Lisp_Object); 3882extern void run_hook_with_args_2 (Lisp_Object, Lisp_Object, Lisp_Object);
3931extern Lisp_Object run_hook_with_args (ptrdiff_t nargs, Lisp_Object *args, 3883extern Lisp_Object run_hook_with_args (ptrdiff_t nargs, Lisp_Object *args,
3932 Lisp_Object (*funcall) 3884 Lisp_Object (*funcall)
@@ -3987,7 +3939,6 @@ extern bool let_shadows_global_binding_p (Lisp_Object symbol);
3987 3939
3988 3940
3989/* Defined in editfns.c. */ 3941/* Defined in editfns.c. */
3990extern Lisp_Object Qfield;
3991extern void insert1 (Lisp_Object); 3942extern void insert1 (Lisp_Object);
3992extern Lisp_Object format2 (const char *, Lisp_Object, Lisp_Object); 3943extern Lisp_Object format2 (const char *, Lisp_Object, Lisp_Object);
3993extern Lisp_Object save_excursion_save (void); 3944extern Lisp_Object save_excursion_save (void);
@@ -4034,12 +3985,6 @@ extern void syms_of_marker (void);
4034 3985
4035/* Defined in fileio.c. */ 3986/* Defined in fileio.c. */
4036 3987
4037extern Lisp_Object Qfile_error;
4038extern Lisp_Object Qfile_notify_error;
4039extern Lisp_Object Qfile_exists_p;
4040extern Lisp_Object Qfile_directory_p;
4041extern Lisp_Object Qinsert_file_contents;
4042extern Lisp_Object Qfile_name_history;
4043extern Lisp_Object expand_and_dir_to_file (Lisp_Object, Lisp_Object); 3988extern Lisp_Object expand_and_dir_to_file (Lisp_Object, Lisp_Object);
4044extern Lisp_Object write_region (Lisp_Object, Lisp_Object, Lisp_Object, 3989extern Lisp_Object write_region (Lisp_Object, Lisp_Object, Lisp_Object,
4045 Lisp_Object, Lisp_Object, Lisp_Object, 3990 Lisp_Object, Lisp_Object, Lisp_Object,
@@ -4056,7 +4001,6 @@ extern bool file_accessible_directory_p (Lisp_Object);
4056extern void init_fileio (void); 4001extern void init_fileio (void);
4057extern void syms_of_fileio (void); 4002extern void syms_of_fileio (void);
4058extern Lisp_Object make_temp_name (Lisp_Object, bool); 4003extern Lisp_Object make_temp_name (Lisp_Object, bool);
4059extern Lisp_Object Qdelete_file;
4060 4004
4061/* Defined in search.c. */ 4005/* Defined in search.c. */
4062extern void shrink_regexp_cache (void); 4006extern void shrink_regexp_cache (void);
@@ -4086,7 +4030,6 @@ extern void clear_regexp_cache (void);
4086 4030
4087/* Defined in minibuf.c. */ 4031/* Defined in minibuf.c. */
4088 4032
4089extern Lisp_Object Qcompletion_ignore_case;
4090extern Lisp_Object Vminibuffer_list; 4033extern Lisp_Object Vminibuffer_list;
4091extern Lisp_Object last_minibuf_string; 4034extern Lisp_Object last_minibuf_string;
4092extern Lisp_Object get_minibuffer (EMACS_INT); 4035extern Lisp_Object get_minibuffer (EMACS_INT);
@@ -4095,15 +4038,10 @@ extern void syms_of_minibuf (void);
4095 4038
4096/* Defined in callint.c. */ 4039/* Defined in callint.c. */
4097 4040
4098extern Lisp_Object Qminus, Qplus;
4099extern Lisp_Object Qprogn;
4100extern Lisp_Object Qwhen;
4101extern Lisp_Object Qmouse_leave_buffer_hook;
4102extern void syms_of_callint (void); 4041extern void syms_of_callint (void);
4103 4042
4104/* Defined in casefiddle.c. */ 4043/* Defined in casefiddle.c. */
4105 4044
4106extern Lisp_Object Qidentity;
4107extern void syms_of_casefiddle (void); 4045extern void syms_of_casefiddle (void);
4108extern void keys_of_casefiddle (void); 4046extern void keys_of_casefiddle (void);
4109 4047
@@ -4117,8 +4055,6 @@ extern void syms_of_casetab (void);
4117extern Lisp_Object echo_message_buffer; 4055extern Lisp_Object echo_message_buffer;
4118extern struct kboard *echo_kboard; 4056extern struct kboard *echo_kboard;
4119extern void cancel_echoing (void); 4057extern void cancel_echoing (void);
4120extern Lisp_Object Qdisabled, QCfilter;
4121extern Lisp_Object Qup, Qdown;
4122extern Lisp_Object last_undo_boundary; 4058extern Lisp_Object last_undo_boundary;
4123extern bool input_pending; 4059extern bool input_pending;
4124#ifdef HAVE_STACK_OVERFLOW_HANDLING 4060#ifdef HAVE_STACK_OVERFLOW_HANDLING
@@ -4152,7 +4088,6 @@ extern bool indented_beyond_p (ptrdiff_t, ptrdiff_t, EMACS_INT);
4152extern void syms_of_indent (void); 4088extern void syms_of_indent (void);
4153 4089
4154/* Defined in frame.c. */ 4090/* Defined in frame.c. */
4155extern Lisp_Object Qonly, Qnone;
4156extern void store_frame_param (struct frame *, Lisp_Object, Lisp_Object); 4091extern void store_frame_param (struct frame *, Lisp_Object, Lisp_Object);
4157extern void store_in_alist (Lisp_Object *, Lisp_Object, Lisp_Object); 4092extern void store_in_alist (Lisp_Object *, Lisp_Object, Lisp_Object);
4158extern Lisp_Object do_switch_frame (Lisp_Object, int, int, Lisp_Object); 4093extern Lisp_Object do_switch_frame (Lisp_Object, int, int, Lisp_Object);
@@ -4168,9 +4103,7 @@ extern bool display_arg;
4168#endif 4103#endif
4169extern Lisp_Object decode_env_path (const char *, const char *, bool); 4104extern Lisp_Object decode_env_path (const char *, const char *, bool);
4170extern Lisp_Object empty_unibyte_string, empty_multibyte_string; 4105extern Lisp_Object empty_unibyte_string, empty_multibyte_string;
4171extern Lisp_Object Qfile_name_handler_alist;
4172extern _Noreturn void terminate_due_to_signal (int, int); 4106extern _Noreturn void terminate_due_to_signal (int, int);
4173extern Lisp_Object Qkill_emacs;
4174#ifdef WINDOWSNT 4107#ifdef WINDOWSNT
4175extern Lisp_Object Vlibrary_cache; 4108extern Lisp_Object Vlibrary_cache;
4176#endif 4109#endif
@@ -4205,7 +4138,6 @@ extern bool inhibit_window_system;
4205extern bool running_asynch_code; 4138extern bool running_asynch_code;
4206 4139
4207/* Defined in process.c. */ 4140/* Defined in process.c. */
4208extern Lisp_Object QCtype, Qlocal;
4209extern void kill_buffer_processes (Lisp_Object); 4141extern void kill_buffer_processes (Lisp_Object);
4210extern int wait_reading_process_output (intmax_t, int, int, bool, Lisp_Object, 4142extern int wait_reading_process_output (intmax_t, int, int, bool, Lisp_Object,
4211 struct Lisp_Process *, int); 4143 struct Lisp_Process *, int);
@@ -4241,7 +4173,6 @@ extern void set_initial_environment (void);
4241extern void syms_of_callproc (void); 4173extern void syms_of_callproc (void);
4242 4174
4243/* Defined in doc.c. */ 4175/* Defined in doc.c. */
4244extern Lisp_Object Qfunction_documentation;
4245extern Lisp_Object read_doc_string (Lisp_Object); 4176extern Lisp_Object read_doc_string (Lisp_Object);
4246extern Lisp_Object get_doc_string (Lisp_Object, bool, bool); 4177extern Lisp_Object get_doc_string (Lisp_Object, bool, bool);
4247extern void syms_of_doc (void); 4178extern void syms_of_doc (void);
@@ -4262,8 +4193,6 @@ extern void init_macros (void);
4262extern void syms_of_macros (void); 4193extern void syms_of_macros (void);
4263 4194
4264/* Defined in undo.c. */ 4195/* Defined in undo.c. */
4265extern Lisp_Object Qapply;
4266extern Lisp_Object Qinhibit_read_only;
4267extern void truncate_undo_list (struct buffer *); 4196extern void truncate_undo_list (struct buffer *);
4268extern void record_insert (ptrdiff_t, ptrdiff_t); 4197extern void record_insert (ptrdiff_t, ptrdiff_t);
4269extern void record_delete (ptrdiff_t, Lisp_Object, bool); 4198extern void record_delete (ptrdiff_t, Lisp_Object, bool);
@@ -4273,11 +4202,8 @@ extern void record_property_change (ptrdiff_t, ptrdiff_t,
4273 Lisp_Object, Lisp_Object, 4202 Lisp_Object, Lisp_Object,
4274 Lisp_Object); 4203 Lisp_Object);
4275extern void syms_of_undo (void); 4204extern void syms_of_undo (void);
4276/* Defined in textprop.c. */
4277extern Lisp_Object Qmouse_face;
4278extern Lisp_Object Qinsert_in_front_hooks, Qinsert_behind_hooks;
4279extern Lisp_Object Qminibuffer_prompt;
4280 4205
4206/* Defined in textprop.c. */
4281extern void report_interval_modification (Lisp_Object, Lisp_Object); 4207extern void report_interval_modification (Lisp_Object, Lisp_Object);
4282 4208
4283/* Defined in menu.c. */ 4209/* Defined in menu.c. */
@@ -4361,9 +4287,6 @@ extern void init_font (void);
4361#ifdef HAVE_WINDOW_SYSTEM 4287#ifdef HAVE_WINDOW_SYSTEM
4362/* Defined in fontset.c. */ 4288/* Defined in fontset.c. */
4363extern void syms_of_fontset (void); 4289extern void syms_of_fontset (void);
4364
4365/* Defined in xfns.c, w32fns.c, or macfns.c. */
4366extern Lisp_Object Qfont_param;
4367#endif 4290#endif
4368 4291
4369/* Defined in gfilenotify.c */ 4292/* Defined in gfilenotify.c */
@@ -4383,16 +4306,6 @@ extern void syms_of_w32notify (void);
4383#endif 4306#endif
4384 4307
4385/* Defined in xfaces.c. */ 4308/* Defined in xfaces.c. */
4386extern Lisp_Object Qdefault, Qfringe;
4387extern Lisp_Object Qscroll_bar, Qcursor;
4388extern Lisp_Object Qmode_line_inactive;
4389extern Lisp_Object Qface;
4390extern Lisp_Object Qnormal;
4391extern Lisp_Object QCfamily, QCweight, QCslant;
4392extern Lisp_Object QCheight, QCname, QCwidth, QCforeground, QCbackground;
4393extern Lisp_Object Qextra_light, Qlight, Qsemi_light, Qsemi_bold;
4394extern Lisp_Object Qbold, Qextra_bold, Qultra_bold;
4395extern Lisp_Object Qoblique, Qitalic;
4396extern Lisp_Object Vface_alternative_font_family_alist; 4309extern Lisp_Object Vface_alternative_font_family_alist;
4397extern Lisp_Object Vface_alternative_font_registry_alist; 4310extern Lisp_Object Vface_alternative_font_registry_alist;
4398extern void syms_of_xfaces (void); 4311extern void syms_of_xfaces (void);
diff --git a/src/lread.c b/src/lread.c
index 6463e1051b5..324052462fe 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -18,6 +18,8 @@ GNU General Public License for more details.
18You should have received a copy of the GNU General Public License 18You should have received a copy of the GNU General Public License
19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21/* Tell globals.h to define tables needed by init_obarray. */
22#define DEFINE_SYMBOLS
21 23
22#include <config.h> 24#include <config.h>
23#include "sysstdio.h" 25#include "sysstdio.h"
@@ -64,32 +66,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
64#define file_tell ftell 66#define file_tell ftell
65#endif 67#endif
66 68
67/* Hash table read constants. */
68static Lisp_Object Qhash_table, Qdata;
69static Lisp_Object Qtest;
70Lisp_Object Qsize;
71static Lisp_Object Qweakness;
72static Lisp_Object Qrehash_size;
73static Lisp_Object Qrehash_threshold;
74
75static Lisp_Object Qread_char, Qget_file_char, Qcurrent_load_list;
76Lisp_Object Qstandard_input;
77Lisp_Object Qvariable_documentation;
78static Lisp_Object Qascii_character, Qload, Qload_file_name;
79Lisp_Object Qbackquote, Qcomma, Qcomma_at, Qcomma_dot, Qfunction;
80static Lisp_Object Qinhibit_file_name_operation;
81static Lisp_Object Qeval_buffer_list;
82Lisp_Object Qlexical_binding;
83static Lisp_Object Qfile_truename, Qdo_after_load_evaluation; /* ACM 2006/5/16 */
84
85/* Used instead of Qget_file_char while loading *.elc files compiled
86 by Emacs 21 or older. */
87static Lisp_Object Qget_emacs_mule_file_char;
88
89static Lisp_Object Qload_force_doc_strings;
90
91static Lisp_Object Qload_in_progress;
92
93/* The association list of objects read with the #n=object form. 69/* The association list of objects read with the #n=object form.
94 Each member of the list has the form (n . object), and is used to 70 Each member of the list has the form (n . object), and is used to
95 look up the object for the corresponding #n# construct. 71 look up the object for the corresponding #n# construct.
@@ -133,7 +109,6 @@ static file_offset prev_saved_doc_string_position;
133 Fread initializes this to false, so we need not specbind it 109 Fread initializes this to false, so we need not specbind it
134 or worry about what happens to it when there is an error. */ 110 or worry about what happens to it when there is an error. */
135static bool new_backquote_flag; 111static bool new_backquote_flag;
136static Lisp_Object Qold_style_backquotes;
137 112
138/* A list of file names for files being loaded in Fload. Used to 113/* A list of file names for files being loaded in Fload. Used to
139 check for recursive loads. */ 114 check for recursive loads. */
@@ -1430,8 +1405,6 @@ directories, make sure the PREDICATE function returns `dir-ok' for them. */)
1430 return file; 1405 return file;
1431} 1406}
1432 1407
1433static Lisp_Object Qdir_ok;
1434
1435/* Search for a file whose name is STR, looking in directories 1408/* Search for a file whose name is STR, looking in directories
1436 in the Lisp list PATH, and trying suffixes from SUFFIX. 1409 in the Lisp list PATH, and trying suffixes from SUFFIX.
1437 On success, return a file descriptor (or 1 or -2 as described below). 1410 On success, return a file descriptor (or 1 or -2 as described below).
@@ -3792,30 +3765,38 @@ check_obarray (Lisp_Object obarray)
3792 return obarray; 3765 return obarray;
3793} 3766}
3794 3767
3795/* Intern a symbol with name STRING in OBARRAY using bucket INDEX. */ 3768/* Intern symbol SYM in OBARRAY using bucket INDEX. */
3796 3769
3797Lisp_Object 3770static Lisp_Object
3798intern_driver (Lisp_Object string, Lisp_Object obarray, ptrdiff_t index) 3771intern_sym (Lisp_Object sym, Lisp_Object obarray, Lisp_Object index)
3799{ 3772{
3800 Lisp_Object *ptr, sym = Fmake_symbol (string); 3773 Lisp_Object *ptr;
3801 3774
3802 XSYMBOL (sym)->interned = (EQ (obarray, initial_obarray) 3775 XSYMBOL (sym)->interned = (EQ (obarray, initial_obarray)
3803 ? SYMBOL_INTERNED_IN_INITIAL_OBARRAY 3776 ? SYMBOL_INTERNED_IN_INITIAL_OBARRAY
3804 : SYMBOL_INTERNED); 3777 : SYMBOL_INTERNED);
3805 3778
3806 if ((SREF (string, 0) == ':') && EQ (obarray, initial_obarray)) 3779 if (SREF (SYMBOL_NAME (sym), 0) == ':' && EQ (obarray, initial_obarray))
3807 { 3780 {
3808 XSYMBOL (sym)->constant = 1; 3781 XSYMBOL (sym)->constant = 1;
3809 XSYMBOL (sym)->redirect = SYMBOL_PLAINVAL; 3782 XSYMBOL (sym)->redirect = SYMBOL_PLAINVAL;
3810 SET_SYMBOL_VAL (XSYMBOL (sym), sym); 3783 SET_SYMBOL_VAL (XSYMBOL (sym), sym);
3811 } 3784 }
3812 3785
3813 ptr = aref_addr (obarray, index); 3786 ptr = aref_addr (obarray, XINT (index));
3814 set_symbol_next (sym, SYMBOLP (*ptr) ? XSYMBOL (*ptr) : NULL); 3787 set_symbol_next (sym, SYMBOLP (*ptr) ? XSYMBOL (*ptr) : NULL);
3815 *ptr = sym; 3788 *ptr = sym;
3816 return sym; 3789 return sym;
3817} 3790}
3818 3791
3792/* Intern a symbol with name STRING in OBARRAY using bucket INDEX. */
3793
3794Lisp_Object
3795intern_driver (Lisp_Object string, Lisp_Object obarray, Lisp_Object index)
3796{
3797 return intern_sym (Fmake_symbol (string), obarray, index);
3798}
3799
3819/* Intern the C string STR: return a symbol with that name, 3800/* Intern the C string STR: return a symbol with that name,
3820 interned in the current obarray. */ 3801 interned in the current obarray. */
3821 3802
@@ -3826,7 +3807,7 @@ intern_1 (const char *str, ptrdiff_t len)
3826 Lisp_Object tem = oblookup (obarray, str, len, len); 3807 Lisp_Object tem = oblookup (obarray, str, len, len);
3827 3808
3828 return SYMBOLP (tem) ? tem : intern_driver (make_string (str, len), 3809 return SYMBOLP (tem) ? tem : intern_driver (make_string (str, len),
3829 obarray, XINT (tem)); 3810 obarray, tem);
3830} 3811}
3831 3812
3832Lisp_Object 3813Lisp_Object
@@ -3840,10 +3821,27 @@ intern_c_string_1 (const char *str, ptrdiff_t len)
3840 /* Creating a non-pure string from a string literal not implemented yet. 3821 /* Creating a non-pure string from a string literal not implemented yet.
3841 We could just use make_string here and live with the extra copy. */ 3822 We could just use make_string here and live with the extra copy. */
3842 eassert (!NILP (Vpurify_flag)); 3823 eassert (!NILP (Vpurify_flag));
3843 tem = intern_driver (make_pure_c_string (str, len), obarray, XINT (tem)); 3824 tem = intern_driver (make_pure_c_string (str, len), obarray, tem);
3844 } 3825 }
3845 return tem; 3826 return tem;
3846} 3827}
3828
3829static void
3830define_symbol (Lisp_Object sym, char const *str)
3831{
3832 ptrdiff_t len = strlen (str);
3833 Lisp_Object string = make_pure_c_string (str, len);
3834 init_symbol (sym, string);
3835
3836 /* Qunbound is uninterned, so that it's not confused with any symbol
3837 'unbound' created by a Lisp program. */
3838 if (! EQ (sym, Qunbound))
3839 {
3840 Lisp_Object bucket = oblookup (initial_obarray, str, len, len);
3841 eassert (INTEGERP (bucket));
3842 intern_sym (sym, initial_obarray, bucket);
3843 }
3844}
3847 3845
3848DEFUN ("intern", Fintern, Sintern, 1, 2, 0, 3846DEFUN ("intern", Fintern, Sintern, 1, 2, 0,
3849 doc: /* Return the canonical symbol whose name is STRING. 3847 doc: /* Return the canonical symbol whose name is STRING.
@@ -3859,8 +3857,8 @@ it defaults to the value of `obarray'. */)
3859 3857
3860 tem = oblookup (obarray, SSDATA (string), SCHARS (string), SBYTES (string)); 3858 tem = oblookup (obarray, SSDATA (string), SCHARS (string), SBYTES (string));
3861 if (!SYMBOLP (tem)) 3859 if (!SYMBOLP (tem))
3862 tem = intern_driver (NILP (Vpurify_flag) ? string 3860 tem = intern_driver (NILP (Vpurify_flag) ? string : Fpurecopy (string),
3863 : Fpurecopy (string), obarray, XINT (tem)); 3861 obarray, tem);
3864 return tem; 3862 return tem;
3865} 3863}
3866 3864
@@ -4059,24 +4057,17 @@ init_obarray (void)
4059 initial_obarray = Vobarray; 4057 initial_obarray = Vobarray;
4060 staticpro (&initial_obarray); 4058 staticpro (&initial_obarray);
4061 4059
4062 Qunbound = Fmake_symbol (build_pure_c_string ("unbound")); 4060 for (int i = 0; i < ARRAYELTS (lispsym); i++)
4063 /* Set temporary dummy values to Qnil and Vpurify_flag to satisfy the 4061 define_symbol (make_lisp_symbol (&lispsym[i]), defsym_name[i]);
4064 NILP (Vpurify_flag) check in intern_c_string. */ 4062
4065 Qnil = make_number (-1); Vpurify_flag = make_number (1); 4063 DEFSYM (Qunbound, "unbound");
4066 Qnil = intern_c_string ("nil"); 4064
4067 4065 DEFSYM (Qnil, "nil");
4068 /* Fmake_symbol inits fields of new symbols with Qunbound and Qnil,
4069 so those two need to be fixed manually. */
4070 SET_SYMBOL_VAL (XSYMBOL (Qunbound), Qunbound);
4071 set_symbol_function (Qunbound, Qnil);
4072 set_symbol_plist (Qunbound, Qnil);
4073 SET_SYMBOL_VAL (XSYMBOL (Qnil), Qnil); 4066 SET_SYMBOL_VAL (XSYMBOL (Qnil), Qnil);
4074 XSYMBOL (Qnil)->constant = 1; 4067 XSYMBOL (Qnil)->constant = 1;
4075 XSYMBOL (Qnil)->declared_special = true; 4068 XSYMBOL (Qnil)->declared_special = true;
4076 set_symbol_plist (Qnil, Qnil);
4077 set_symbol_function (Qnil, Qnil);
4078 4069
4079 Qt = intern_c_string ("t"); 4070 DEFSYM (Qt, "t");
4080 SET_SYMBOL_VAL (XSYMBOL (Qt), Qt); 4071 SET_SYMBOL_VAL (XSYMBOL (Qt), Qt);
4081 XSYMBOL (Qt)->constant = 1; 4072 XSYMBOL (Qt)->constant = 1;
4082 XSYMBOL (Qt)->declared_special = true; 4073 XSYMBOL (Qt)->declared_special = true;
@@ -4729,7 +4720,11 @@ that are loaded before your customizations are read! */);
4729 DEFSYM (Qstandard_input, "standard-input"); 4720 DEFSYM (Qstandard_input, "standard-input");
4730 DEFSYM (Qread_char, "read-char"); 4721 DEFSYM (Qread_char, "read-char");
4731 DEFSYM (Qget_file_char, "get-file-char"); 4722 DEFSYM (Qget_file_char, "get-file-char");
4723
4724 /* Used instead of Qget_file_char while loading *.elc files compiled
4725 by Emacs 21 or older. */
4732 DEFSYM (Qget_emacs_mule_file_char, "get-emacs-mule-file-char"); 4726 DEFSYM (Qget_emacs_mule_file_char, "get-emacs-mule-file-char");
4727
4733 DEFSYM (Qload_force_doc_strings, "load-force-doc-strings"); 4728 DEFSYM (Qload_force_doc_strings, "load-force-doc-strings");
4734 4729
4735 DEFSYM (Qbackquote, "`"); 4730 DEFSYM (Qbackquote, "`");
diff --git a/src/macfont.m b/src/macfont.m
index fb28dc85d0f..f569934128f 100644
--- a/src/macfont.m
+++ b/src/macfont.m
@@ -40,9 +40,6 @@ Original author: YAMAMOTO Mitsuharu
40 40
41static struct font_driver macfont_driver; 41static struct font_driver macfont_driver;
42 42
43/* Core Text, for Mac OS X. */
44static Lisp_Object Qmac_ct;
45
46static double mac_ctfont_get_advance_width_for_glyph (CTFontRef, CGGlyph); 43static double mac_ctfont_get_advance_width_for_glyph (CTFontRef, CGGlyph);
47static CGRect mac_ctfont_get_bounding_rect_for_glyph (CTFontRef, CGGlyph); 44static CGRect mac_ctfont_get_bounding_rect_for_glyph (CTFontRef, CGGlyph);
48static CFArrayRef mac_ctfont_create_available_families (void); 45static CFArrayRef mac_ctfont_create_available_families (void);
@@ -69,18 +66,6 @@ static CGGlyph mac_ctfont_get_glyph_for_cid (CTFontRef,
69 CGFontIndex); 66 CGFontIndex);
70#endif 67#endif
71 68
72/* The font property key specifying the font design destination. The
73 value is an unsigned integer code: 0 for WYSIWYG, and 1 for Video
74 text. (See the documentation of X Logical Font Description
75 Conventions.) In the Mac font driver, 1 means the screen font is
76 used for calculating some glyph metrics. You can see the
77 difference with Monaco 8pt or 9pt, for example. */
78static Lisp_Object QCdestination;
79
80/* The boolean-valued font property key specifying the use of
81 leading. */
82static Lisp_Object QCminspace;
83
84struct macfont_metrics; 69struct macfont_metrics;
85 70
86/* The actual structure for Mac font that can be cast to struct font. */ 71/* The actual structure for Mac font that can be cast to struct font. */
@@ -3927,10 +3912,19 @@ syms_of_macfont (void)
3927{ 3912{
3928 static struct font_driver mac_font_driver; 3913 static struct font_driver mac_font_driver;
3929 3914
3915 /* Core Text, for Mac OS X. */
3930 DEFSYM (Qmac_ct, "mac-ct"); 3916 DEFSYM (Qmac_ct, "mac-ct");
3931 macfont_driver.type = Qmac_ct; 3917 macfont_driver.type = Qmac_ct;
3932 register_font_driver (&macfont_driver, NULL); 3918 register_font_driver (&macfont_driver, NULL);
3933 3919
3920 /* The font property key specifying the font design destination. The
3921 value is an unsigned integer code: 0 for WYSIWYG, and 1 for Video
3922 text. (See the documentation of X Logical Font Description
3923 Conventions.) In the Mac font driver, 1 means the screen font is
3924 used for calculating some glyph metrics. You can see the
3925 difference with Monaco 8pt or 9pt, for example. */
3934 DEFSYM (QCdestination, ":destination"); 3926 DEFSYM (QCdestination, ":destination");
3927
3928 /* The boolean-valued font property key specifying the use of leading. */
3935 DEFSYM (QCminspace, ":minspace"); 3929 DEFSYM (QCminspace, ":minspace");
3936} 3930}
diff --git a/src/macros.c b/src/macros.c
index 0801f0ac288..e5b8ab70870 100644
--- a/src/macros.c
+++ b/src/macros.c
@@ -28,9 +28,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
28#include "window.h" 28#include "window.h"
29#include "keyboard.h" 29#include "keyboard.h"
30 30
31static Lisp_Object Qexecute_kbd_macro;
32static Lisp_Object Qkbd_macro_termination_hook;
33
34/* Number of successful iterations so far 31/* Number of successful iterations so far
35 for innermost keyboard macro. 32 for innermost keyboard macro.
36 This is not bound at each level, 33 This is not bound at each level,
@@ -280,7 +277,7 @@ pop_kbd_macro (Lisp_Object info)
280 tem = XCDR (info); 277 tem = XCDR (info);
281 executing_kbd_macro_index = XINT (XCAR (tem)); 278 executing_kbd_macro_index = XINT (XCAR (tem));
282 Vreal_this_command = XCDR (tem); 279 Vreal_this_command = XCDR (tem);
283 Frun_hooks (1, &Qkbd_macro_termination_hook); 280 run_hook (Qkbd_macro_termination_hook);
284} 281}
285 282
286DEFUN ("execute-kbd-macro", Fexecute_kbd_macro, Sexecute_kbd_macro, 1, 3, 0, 283DEFUN ("execute-kbd-macro", Fexecute_kbd_macro, Sexecute_kbd_macro, 1, 3, 0,
diff --git a/src/menu.h b/src/menu.h
index 182a1819b35..de586a5e101 100644
--- a/src/menu.h
+++ b/src/menu.h
@@ -22,10 +22,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
22#include "systime.h" /* for Time */ 22#include "systime.h" /* for Time */
23#include "../lwlib/lwlib-widget.h" 23#include "../lwlib/lwlib-widget.h"
24 24
25#ifdef HAVE_NTGUI
26extern Lisp_Object Qunsupported__w32_dialog;
27#endif
28
29/* Bit fields used by terminal-specific menu_show_hook. */ 25/* Bit fields used by terminal-specific menu_show_hook. */
30 26
31enum { 27enum {
diff --git a/src/minibuf.c b/src/minibuf.c
index b43bf7c39e9..07f489258e1 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -54,37 +54,10 @@ static Lisp_Object minibuf_save_list;
54 54
55EMACS_INT minibuf_level; 55EMACS_INT minibuf_level;
56 56
57/* The maximum length of a minibuffer history. */
58
59static Lisp_Object Qhistory_length;
60
61/* Fread_minibuffer leaves the input here as a string. */ 57/* Fread_minibuffer leaves the input here as a string. */
62 58
63Lisp_Object last_minibuf_string; 59Lisp_Object last_minibuf_string;
64 60
65static Lisp_Object Qminibuffer_history, Qbuffer_name_history;
66
67static Lisp_Object Qread_file_name_internal;
68
69/* Normal hooks for entry to and exit from minibuffer. */
70
71static Lisp_Object Qminibuffer_setup_hook;
72static Lisp_Object Qminibuffer_exit_hook;
73
74Lisp_Object Qcompletion_ignore_case;
75static Lisp_Object Qminibuffer_completion_table;
76static Lisp_Object Qminibuffer_completion_predicate;
77static Lisp_Object Qminibuffer_completion_confirm;
78static Lisp_Object Qcustom_variable_p;
79
80static Lisp_Object Qminibuffer_default;
81
82static Lisp_Object Qcurrent_input_method, Qactivate_input_method;
83
84static Lisp_Object Qcase_fold_search;
85
86static Lisp_Object Qread_expression_history;
87
88/* Prompt to display in front of the mini-buffer contents. */ 61/* Prompt to display in front of the mini-buffer contents. */
89 62
90static Lisp_Object minibuf_prompt; 63static Lisp_Object minibuf_prompt;
@@ -699,7 +672,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
699 if (STRINGP (input_method) && !NILP (Ffboundp (Qactivate_input_method))) 672 if (STRINGP (input_method) && !NILP (Ffboundp (Qactivate_input_method)))
700 call1 (Qactivate_input_method, input_method); 673 call1 (Qactivate_input_method, input_method);
701 674
702 Frun_hooks (1, &Qminibuffer_setup_hook); 675 run_hook (Qminibuffer_setup_hook);
703 676
704 /* Don't allow the user to undo past this point. */ 677 /* Don't allow the user to undo past this point. */
705 bset_undo_list (current_buffer, Qnil); 678 bset_undo_list (current_buffer, Qnil);
@@ -1821,8 +1794,6 @@ the values STRING, PREDICATE and `lambda'. */)
1821 return Qt; 1794 return Qt;
1822} 1795}
1823 1796
1824static Lisp_Object Qmetadata;
1825
1826DEFUN ("internal-complete-buffer", Finternal_complete_buffer, Sinternal_complete_buffer, 3, 3, 0, 1797DEFUN ("internal-complete-buffer", Finternal_complete_buffer, Sinternal_complete_buffer, 3, 3, 0,
1827 doc: /* Perform completion on buffer names. 1798 doc: /* Perform completion on buffer names.
1828STRING and PREDICATE have the same meanings as in `try-completion', 1799STRING and PREDICATE have the same meanings as in `try-completion',
@@ -1956,9 +1927,14 @@ syms_of_minibuf (void)
1956 Fset (Qbuffer_name_history, Qnil); 1927 Fset (Qbuffer_name_history, Qnil);
1957 1928
1958 DEFSYM (Qcustom_variable_p, "custom-variable-p"); 1929 DEFSYM (Qcustom_variable_p, "custom-variable-p");
1930
1931 /* Normal hooks for entry to and exit from minibuffer. */
1959 DEFSYM (Qminibuffer_setup_hook, "minibuffer-setup-hook"); 1932 DEFSYM (Qminibuffer_setup_hook, "minibuffer-setup-hook");
1960 DEFSYM (Qminibuffer_exit_hook, "minibuffer-exit-hook"); 1933 DEFSYM (Qminibuffer_exit_hook, "minibuffer-exit-hook");
1934
1935 /* The maximum length of a minibuffer history. */
1961 DEFSYM (Qhistory_length, "history-length"); 1936 DEFSYM (Qhistory_length, "history-length");
1937
1962 DEFSYM (Qcurrent_input_method, "current-input-method"); 1938 DEFSYM (Qcurrent_input_method, "current-input-method");
1963 DEFSYM (Qactivate_input_method, "activate-input-method"); 1939 DEFSYM (Qactivate_input_method, "activate-input-method");
1964 DEFSYM (Qcase_fold_search, "case-fold-search"); 1940 DEFSYM (Qcase_fold_search, "case-fold-search");
diff --git a/src/nsfns.m b/src/nsfns.m
index 42929b9f440..828ee88e635 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -61,35 +61,6 @@ int fns_trace_num = 1;
61 61
62extern NSArray *ns_send_types, *ns_return_types, *ns_drag_types; 62extern NSArray *ns_send_types, *ns_return_types, *ns_drag_types;
63 63
64extern Lisp_Object Qforeground_color;
65extern Lisp_Object Qbackground_color;
66extern Lisp_Object Qcursor_color;
67extern Lisp_Object Qinternal_border_width;
68extern Lisp_Object Qvisibility;
69extern Lisp_Object Qcursor_type;
70extern Lisp_Object Qicon_type;
71extern Lisp_Object Qicon_name;
72extern Lisp_Object Qicon_left;
73extern Lisp_Object Qicon_top;
74extern Lisp_Object Qtop;
75extern Lisp_Object Qdisplay;
76extern Lisp_Object Qvertical_scroll_bars;
77extern Lisp_Object Qhorizontal_scroll_bars;
78extern Lisp_Object Qauto_raise;
79extern Lisp_Object Qauto_lower;
80extern Lisp_Object Qbox;
81extern Lisp_Object Qscroll_bar_width;
82extern Lisp_Object Qscroll_bar_height;
83extern Lisp_Object Qx_resource_name;
84extern Lisp_Object Qface_set_after_frame_default;
85extern Lisp_Object Qunderline, Qundefined;
86extern Lisp_Object Qheight, Qminibuffer, Qname, Qonly, Qwidth;
87extern Lisp_Object Qunsplittable, Qmenu_bar_lines, Qbuffer_predicate, Qtitle;
88
89
90Lisp_Object Qbuffered;
91Lisp_Object Qfontsize;
92
93EmacsTooltip *ns_tooltip = nil; 64EmacsTooltip *ns_tooltip = nil;
94 65
95/* Need forward declaration here to preserve organizational integrity of file */ 66/* Need forward declaration here to preserve organizational integrity of file */
diff --git a/src/nsfont.m b/src/nsfont.m
index 22b37290a6b..f5e89d32bfc 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -45,11 +45,6 @@ Author: Adrian Robert (arobert@cogsci.ucsd.edu)
45#define NSFONT_TRACE 0 45#define NSFONT_TRACE 0
46#define LCD_SMOOTHING_MARGIN 2 46#define LCD_SMOOTHING_MARGIN 2
47 47
48extern Lisp_Object Qns;
49extern Lisp_Object Qnormal, Qbold, Qitalic;
50static Lisp_Object Qapple, Qroman, Qmedium;
51static Lisp_Object Qcondensed, Qexpanded;
52extern Lisp_Object Qappend;
53extern float ns_antialias_threshold; 48extern float ns_antialias_threshold;
54 49
55 50
@@ -1493,7 +1488,7 @@ ns_glyph_metrics (struct nsfont_info *font_info, unsigned char block)
1493 characterIndex: (NSUInteger)charIndex 1488 characterIndex: (NSUInteger)charIndex
1494{ 1489{
1495 len = glyphIndex+length; 1490 len = glyphIndex+length;
1496 for (i =glyphIndex; i<len; i++) 1491 for (i =glyphIndex; i<len; i++)
1497 cglyphs[i] = glyphs[i-glyphIndex]; 1492 cglyphs[i] = glyphs[i-glyphIndex];
1498 if (len > maxGlyph) 1493 if (len > maxGlyph)
1499 maxGlyph = len; 1494 maxGlyph = len;
diff --git a/src/nsimage.m b/src/nsimage.m
index 2da22f239f3..f37ad38ad1e 100644
--- a/src/nsimage.m
+++ b/src/nsimage.m
@@ -34,8 +34,6 @@ GNUstep port and post-20 update by Adrian Robert (arobert@cogsci.ucsd.edu)
34#include "nsterm.h" 34#include "nsterm.h"
35#include "frame.h" 35#include "frame.h"
36 36
37extern Lisp_Object QCfile, QCdata;
38
39/* call tracing */ 37/* call tracing */
40#if 0 38#if 0
41int image_trace_num = 0; 39int image_trace_num = 0;
diff --git a/src/nsmenu.m b/src/nsmenu.m
index 0e2f4d1f17c..26fe26e5e0d 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -59,12 +59,6 @@ int menu_trace_num = 0;
59#include "nsmenu_common.c" 59#include "nsmenu_common.c"
60#endif 60#endif
61 61
62extern Lisp_Object Qundefined, Qmenu_enable, Qmenu_bar_update_hook;
63extern Lisp_Object QCtoggle, QCradio;
64
65Lisp_Object Qdebug_on_next_call;
66extern Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map;
67
68extern long context_menu_value; 62extern long context_menu_value;
69EmacsMenu *mainMenu, *svcsMenu, *dockMenu; 63EmacsMenu *mainMenu, *svcsMenu, *dockMenu;
70 64
diff --git a/src/nsselect.m b/src/nsselect.m
index e2e5aadc10d..1544b16dc9d 100644
--- a/src/nsselect.m
+++ b/src/nsselect.m
@@ -34,8 +34,6 @@ GNUstep port and post-20 update by Adrian Robert (arobert@cogsci.ucsd.edu)
34#include "termhooks.h" 34#include "termhooks.h"
35#include "keyboard.h" 35#include "keyboard.h"
36 36
37static Lisp_Object QCLIPBOARD, QSECONDARY, QTEXT, QFILE_NAME;
38
39static Lisp_Object Vselection_alist; 37static Lisp_Object Vselection_alist;
40 38
41/* NSGeneralPboard is pretty much analogous to X11 CLIPBOARD */ 39/* NSGeneralPboard is pretty much analogous to X11 CLIPBOARD */
diff --git a/src/nsterm.h b/src/nsterm.h
index 30c14249d83..9035ee1a328 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -792,7 +792,6 @@ struct glyph_string;
792void ns_dump_glyphstring (struct glyph_string *s); 792void ns_dump_glyphstring (struct glyph_string *s);
793 793
794/* Implemented in nsterm, published in or needed from nsfns. */ 794/* Implemented in nsterm, published in or needed from nsfns. */
795extern Lisp_Object Qfontsize;
796extern Lisp_Object ns_list_fonts (struct frame *f, Lisp_Object pattern, 795extern Lisp_Object ns_list_fonts (struct frame *f, Lisp_Object pattern,
797 int size, int maxnames); 796 int size, int maxnames);
798extern void ns_clear_frame (struct frame *f); 797extern void ns_clear_frame (struct frame *f);
diff --git a/src/nsterm.m b/src/nsterm.m
index 4a831a8667b..2ccb7fe0c60 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -225,14 +225,6 @@ static unsigned convert_ns_to_X_keysym[] =
225 0x1B, 0x1B /* escape */ 225 0x1B, 0x1B /* escape */
226}; 226};
227 227
228static Lisp_Object Qmodifier_value;
229Lisp_Object Qalt, Qcontrol, Qhyper, Qmeta, Qsuper;
230extern Lisp_Object Qcursor_color, Qcursor_type, Qns;
231
232static Lisp_Object QUTF8_STRING;
233static Lisp_Object Qcocoa, Qgnustep;
234static Lisp_Object Qfile, Qurl;
235
236/* On OS X picks up the default NSGlobalDomain AppleAntiAliasingThreshold, 228/* On OS X picks up the default NSGlobalDomain AppleAntiAliasingThreshold,
237 the maximum font size to NOT antialias. On GNUstep there is currently 229 the maximum font size to NOT antialias. On GNUstep there is currently
238 no way to control this behavior. */ 230 no way to control this behavior. */
diff --git a/src/print.c b/src/print.c
index 5535bb4446e..f26837055f2 100644
--- a/src/print.c
+++ b/src/print.c
@@ -37,14 +37,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
37#include "termhooks.h" /* For struct terminal. */ 37#include "termhooks.h" /* For struct terminal. */
38#include "font.h" 38#include "font.h"
39 39
40Lisp_Object Qstandard_output;
41
42static Lisp_Object Qtemp_buffer_setup_hook;
43
44/* These are used to print like we read. */
45
46static Lisp_Object Qfloat_output_format;
47
48#include <float.h> 40#include <float.h>
49#include <ftoastr.h> 41#include <ftoastr.h>
50 42
@@ -72,9 +64,6 @@ static ptrdiff_t print_buffer_pos;
72/* Bytes stored in print_buffer. */ 64/* Bytes stored in print_buffer. */
73static ptrdiff_t print_buffer_pos_byte; 65static ptrdiff_t print_buffer_pos_byte;
74 66
75Lisp_Object Qprint_escape_newlines;
76static Lisp_Object Qprint_escape_multibyte, Qprint_escape_nonascii;
77
78/* Vprint_number_table is a table, that keeps objects that are going to 67/* Vprint_number_table is a table, that keeps objects that are going to
79 be printed, to allow use of #n= and #n# to express sharing. 68 be printed, to allow use of #n= and #n# to express sharing.
80 For any given object, the table can give the following values: 69 For any given object, the table can give the following values:
@@ -507,7 +496,7 @@ temp_output_buffer_setup (const char *bufname)
507 Ferase_buffer (); 496 Ferase_buffer ();
508 XSETBUFFER (buf, current_buffer); 497 XSETBUFFER (buf, current_buffer);
509 498
510 Frun_hooks (1, &Qtemp_buffer_setup_hook); 499 run_hook (Qtemp_buffer_setup_hook);
511 500
512 unbind_to (count, Qnil); 501 unbind_to (count, Qnil);
513 502
@@ -716,10 +705,6 @@ is used instead. */)
716 return object; 705 return object;
717} 706}
718 707
719/* The subroutine object for external-debugging-output is kept here
720 for the convenience of the debugger. */
721Lisp_Object Qexternal_debugging_output;
722
723DEFUN ("external-debugging-output", Fexternal_debugging_output, Sexternal_debugging_output, 1, 1, 0, 708DEFUN ("external-debugging-output", Fexternal_debugging_output, Sexternal_debugging_output, 1, 1, 0,
724 doc: /* Write CHARACTER to stderr. 709 doc: /* Write CHARACTER to stderr.
725You can call print while debugging emacs, and pass it this function 710You can call print while debugging emacs, and pass it this function
@@ -2220,7 +2205,10 @@ print_interval (INTERVAL interval, Lisp_Object printcharfun)
2220void 2205void
2221init_print_once (void) 2206init_print_once (void)
2222{ 2207{
2208 /* The subroutine object for external-debugging-output is kept here
2209 for the convenience of the debugger. */
2223 DEFSYM (Qexternal_debugging_output, "external-debugging-output"); 2210 DEFSYM (Qexternal_debugging_output, "external-debugging-output");
2211
2224 defsubr (&Sexternal_debugging_output); 2212 defsubr (&Sexternal_debugging_output);
2225} 2213}
2226 2214
diff --git a/src/process.c b/src/process.c
index 6eb0f9e2ab4..9015383b8b5 100644
--- a/src/process.c
+++ b/src/process.c
@@ -140,12 +140,6 @@ extern int sys_select (int, fd_set *, fd_set *, fd_set *,
140#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) 140#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
141# pragma GCC diagnostic ignored "-Wstrict-overflow" 141# pragma GCC diagnostic ignored "-Wstrict-overflow"
142#endif 142#endif
143
144Lisp_Object Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess, Qttname, Qtpgid;
145Lisp_Object Qminflt, Qmajflt, Qcminflt, Qcmajflt, Qutime, Qstime, Qcstime;
146Lisp_Object Qcutime, Qpri, Qnice, Qthcount, Qstart, Qvsize, Qrss, Qargs;
147Lisp_Object Quser, Qgroup, Qetime, Qpcpu, Qpmem, Qtime, Qctime;
148Lisp_Object QCname, QCtype;
149 143
150/* True if keyboard input is on hold, zero otherwise. */ 144/* True if keyboard input is on hold, zero otherwise. */
151 145
@@ -191,27 +185,6 @@ process_socket (int domain, int type, int protocol)
191# define socket(domain, type, protocol) process_socket (domain, type, protocol) 185# define socket(domain, type, protocol) process_socket (domain, type, protocol)
192#endif 186#endif
193 187
194Lisp_Object Qprocessp;
195static Lisp_Object Qrun, Qstop, Qsignal;
196static Lisp_Object Qopen, Qclosed, Qconnect, Qfailed, Qlisten;
197Lisp_Object Qlocal;
198static Lisp_Object Qipv4, Qdatagram, Qseqpacket;
199static Lisp_Object Qreal, Qnetwork, Qserial;
200#ifdef AF_INET6
201static Lisp_Object Qipv6;
202#endif
203static Lisp_Object QCport, QCprocess;
204Lisp_Object QCspeed;
205Lisp_Object QCbytesize, QCstopbits, QCparity, Qodd, Qeven;
206Lisp_Object QCflowcontrol, Qhw, Qsw, QCsummary;
207static Lisp_Object QCbuffer, QChost, QCservice;
208static Lisp_Object QClocal, QCremote, QCcoding;
209static Lisp_Object QCserver, QCnowait, QCnoquery, QCstop;
210static Lisp_Object QCsentinel, QClog, QCoptions, QCplist;
211static Lisp_Object Qlast_nonmenu_event;
212static Lisp_Object Qinternal_default_process_sentinel;
213static Lisp_Object Qinternal_default_process_filter;
214
215#define NETCONN_P(p) (EQ (XPROCESS (p)->type, Qnetwork)) 188#define NETCONN_P(p) (EQ (XPROCESS (p)->type, Qnetwork))
216#define NETCONN1_P(p) (EQ (p->type, Qnetwork)) 189#define NETCONN1_P(p) (EQ (p->type, Qnetwork))
217#define SERIALCONN_P(p) (EQ (XPROCESS (p)->type, Qserial)) 190#define SERIALCONN_P(p) (EQ (XPROCESS (p)->type, Qserial))
@@ -7228,10 +7201,7 @@ syms_of_process (void)
7228 DEFSYM (Qsignal, "signal"); 7201 DEFSYM (Qsignal, "signal");
7229 7202
7230 /* Qexit is already staticpro'd by syms_of_eval; don't staticpro it 7203 /* Qexit is already staticpro'd by syms_of_eval; don't staticpro it
7231 here again. 7204 here again. */
7232
7233 Qexit = intern_c_string ("exit");
7234 staticpro (&Qexit); */
7235 7205
7236 DEFSYM (Qopen, "open"); 7206 DEFSYM (Qopen, "open");
7237 DEFSYM (Qclosed, "closed"); 7207 DEFSYM (Qclosed, "closed");
diff --git a/src/process.h b/src/process.h
index 1c463502a5e..7803672d61a 100644
--- a/src/process.h
+++ b/src/process.h
@@ -197,15 +197,6 @@ pset_gnutls_cred_type (struct Lisp_Process *p, Lisp_Object val)
197 when exiting. */ 197 when exiting. */
198extern bool inhibit_sentinels; 198extern bool inhibit_sentinels;
199 199
200extern Lisp_Object Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess, Qttname;
201extern Lisp_Object Qminflt, Qmajflt, Qcminflt, Qcmajflt, Qutime, Qstime;
202extern Lisp_Object Qcutime, Qpri, Qnice, Qthcount, Qstart, Qvsize, Qrss, Qargs;
203extern Lisp_Object Quser, Qgroup, Qetime, Qpcpu, Qpmem, Qtpgid, Qcstime;
204extern Lisp_Object Qtime, Qctime;
205extern Lisp_Object QCspeed;
206extern Lisp_Object QCbytesize, QCstopbits, QCparity, Qodd, Qeven;
207extern Lisp_Object QCflowcontrol, Qhw, Qsw, QCsummary;
208
209/* Exit statuses for GNU programs that exec other programs. */ 200/* Exit statuses for GNU programs that exec other programs. */
210enum 201enum
211{ 202{
diff --git a/src/profiler.c b/src/profiler.c
index 3d2c001507b..1b49afe0331 100644
--- a/src/profiler.c
+++ b/src/profiler.c
@@ -35,7 +35,6 @@ saturated_add (EMACS_INT a, EMACS_INT b)
35 35
36typedef struct Lisp_Hash_Table log_t; 36typedef struct Lisp_Hash_Table log_t;
37 37
38static Lisp_Object Qprofiler_backtrace_equal;
39static struct hash_table_test hashtest_profiler; 38static struct hash_table_test hashtest_profiler;
40 39
41static Lisp_Object 40static Lisp_Object
diff --git a/src/search.c b/src/search.c
index 2e9c992dc24..0252542a361 100644
--- a/src/search.c
+++ b/src/search.c
@@ -84,12 +84,6 @@ static struct re_registers search_regs;
84 Qnil if no searching has been done yet. */ 84 Qnil if no searching has been done yet. */
85static Lisp_Object last_thing_searched; 85static Lisp_Object last_thing_searched;
86 86
87/* Error condition signaled when regexp compile_pattern fails. */
88static Lisp_Object Qinvalid_regexp;
89
90/* Error condition used for failing searches. */
91static Lisp_Object Qsearch_failed;
92
93static void set_search_regs (ptrdiff_t, ptrdiff_t); 87static void set_search_regs (ptrdiff_t, ptrdiff_t);
94static void save_search_regs (void); 88static void save_search_regs (void);
95static EMACS_INT simple_search (EMACS_INT, unsigned char *, ptrdiff_t, 89static EMACS_INT simple_search (EMACS_INT, unsigned char *, ptrdiff_t,
@@ -3329,7 +3323,10 @@ syms_of_search (void)
3329 } 3323 }
3330 searchbuf_head = &searchbufs[0]; 3324 searchbuf_head = &searchbufs[0];
3331 3325
3326 /* Error condition used for failing searches. */
3332 DEFSYM (Qsearch_failed, "search-failed"); 3327 DEFSYM (Qsearch_failed, "search-failed");
3328
3329 /* Error condition signaled when regexp compile_pattern fails. */
3333 DEFSYM (Qinvalid_regexp, "invalid-regexp"); 3330 DEFSYM (Qinvalid_regexp, "invalid-regexp");
3334 3331
3335 Fput (Qsearch_failed, Qerror_conditions, 3332 Fput (Qsearch_failed, Qerror_conditions,
diff --git a/src/sound.c b/src/sound.c
index 88d86f6f84a..6f7e2adecc9 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -99,12 +99,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
99 99
100/* BEGIN: Common Definitions */ 100/* BEGIN: Common Definitions */
101 101
102/* Symbols. */
103
104static Lisp_Object QCvolume, QCdevice;
105static Lisp_Object Qsound;
106static Lisp_Object Qplay_sound_functions;
107
108/* Indices of attributes in a sound attributes vector. */ 102/* Indices of attributes in a sound attributes vector. */
109 103
110enum sound_attr 104enum sound_attr
diff --git a/src/syntax.c b/src/syntax.c
index a7ca6ec9748..2f821564294 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -137,9 +137,6 @@ enum
137 ST_STRING_STYLE = 256 + 2 137 ST_STRING_STYLE = 256 + 2
138 }; 138 };
139 139
140static Lisp_Object Qsyntax_table_p;
141static Lisp_Object Qsyntax_table, Qscan_error;
142
143/* This is the internal form of the parse state used in parse-partial-sexp. */ 140/* This is the internal form of the parse state used in parse-partial-sexp. */
144 141
145struct lisp_parse_state 142struct lisp_parse_state
@@ -3500,11 +3497,6 @@ init_syntax_once (void)
3500 /* This has to be done here, before we call Fmake_char_table. */ 3497 /* This has to be done here, before we call Fmake_char_table. */
3501 DEFSYM (Qsyntax_table, "syntax-table"); 3498 DEFSYM (Qsyntax_table, "syntax-table");
3502 3499
3503 /* This variable is DEFSYMed in alloc.c and not initialized yet, so
3504 intern it here. NOTE: you must guarantee that init_syntax_once
3505 is called before all other users of this variable. */
3506 Qchar_table_extra_slots = intern_c_string ("char-table-extra-slots");
3507
3508 /* Create objects which can be shared among syntax tables. */ 3500 /* Create objects which can be shared among syntax tables. */
3509 Vsyntax_code_object = make_uninit_vector (Smax); 3501 Vsyntax_code_object = make_uninit_vector (Smax);
3510 for (i = 0; i < Smax; i++) 3502 for (i = 0; i < Smax; i++)
diff --git a/src/term.c b/src/term.c
index 48447bce5fd..d48bf7b6eaf 100644
--- a/src/term.c
+++ b/src/term.c
@@ -130,9 +130,6 @@ enum no_color_bit
130 130
131static int max_frame_cols; 131static int max_frame_cols;
132 132
133static Lisp_Object Qtty_mode_set_strings;
134static Lisp_Object Qtty_mode_reset_strings;
135
136 133
137 134
138#ifdef HAVE_GPM 135#ifdef HAVE_GPM
@@ -2710,12 +2707,6 @@ static const char *menu_help_message, *prev_menu_help_message;
2710 last menu help message. */ 2707 last menu help message. */
2711static int menu_help_paneno, menu_help_itemno; 2708static int menu_help_paneno, menu_help_itemno;
2712 2709
2713static Lisp_Object Qtty_menu_navigation_map, Qtty_menu_exit;
2714static Lisp_Object Qtty_menu_prev_item, Qtty_menu_next_item;
2715static Lisp_Object Qtty_menu_next_menu, Qtty_menu_prev_menu;
2716static Lisp_Object Qtty_menu_select, Qtty_menu_ignore;
2717static Lisp_Object Qtty_menu_mouse_movement;
2718
2719typedef struct tty_menu_struct 2710typedef struct tty_menu_struct
2720{ 2711{
2721 int count; 2712 int count;
diff --git a/src/terminal.c b/src/terminal.c
index 65b68955dbf..92befd28543 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -37,10 +37,6 @@ static int next_terminal_id;
37/* The initial terminal device, created by initial_term_init. */ 37/* The initial terminal device, created by initial_term_init. */
38struct terminal *initial_terminal; 38struct terminal *initial_terminal;
39 39
40Lisp_Object Qrun_hook_with_args;
41static Lisp_Object Qterminal_live_p;
42static Lisp_Object Qdelete_terminal_functions;
43
44static void delete_initial_terminal (struct terminal *); 40static void delete_initial_terminal (struct terminal *);
45 41
46/* This setter is used only in this file, so it can be private. */ 42/* This setter is used only in this file, so it can be private. */
diff --git a/src/textprop.c b/src/textprop.c
index 27ab08f628c..35f22bf454e 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -44,21 +44,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
44 is enforced by the subrs installing properties onto the intervals. */ 44 is enforced by the subrs installing properties onto the intervals. */
45 45
46 46
47/* Types of hooks. */
48static Lisp_Object Qmouse_left;
49static Lisp_Object Qmouse_entered;
50Lisp_Object Qpoint_left;
51Lisp_Object Qpoint_entered;
52Lisp_Object Qcategory;
53Lisp_Object Qlocal_map;
54
55/* Visual properties text (including strings) may have. */
56static Lisp_Object Qforeground, Qbackground, Qunderline;
57Lisp_Object Qfont;
58static Lisp_Object Qstipple;
59Lisp_Object Qinvisible, Qintangible, Qmouse_face;
60static Lisp_Object Qread_only;
61Lisp_Object Qminibuffer_prompt;
62 47
63enum property_set_type 48enum property_set_type
64{ 49{
@@ -67,9 +52,6 @@ enum property_set_type
67 TEXT_PROPERTY_APPEND 52 TEXT_PROPERTY_APPEND
68}; 53};
69 54
70/* Sticky properties. */
71Lisp_Object Qfront_sticky, Qrear_nonsticky;
72
73/* If o1 is a cons whose cdr is a cons, return non-zero and set o2 to 55/* If o1 is a cons whose cdr is a cons, return non-zero and set o2 to
74 the o1's cdr. Otherwise, return zero. This is handy for 56 the o1's cdr. Otherwise, return zero. This is handy for
75 traversing plists. */ 57 traversing plists. */
@@ -2383,7 +2365,7 @@ inherits it if NONSTICKINESS is nil. The `front-sticky' and
2383 interval_insert_in_front_hooks = Qnil; 2365 interval_insert_in_front_hooks = Qnil;
2384 2366
2385 2367
2386 /* Common attributes one might give text */ 2368 /* Common attributes one might give text. */
2387 2369
2388 DEFSYM (Qforeground, "foreground"); 2370 DEFSYM (Qforeground, "foreground");
2389 DEFSYM (Qbackground, "background"); 2371 DEFSYM (Qbackground, "background");
@@ -2401,7 +2383,7 @@ inherits it if NONSTICKINESS is nil. The `front-sticky' and
2401 DEFSYM (Qmouse_face, "mouse-face"); 2383 DEFSYM (Qmouse_face, "mouse-face");
2402 DEFSYM (Qminibuffer_prompt, "minibuffer-prompt"); 2384 DEFSYM (Qminibuffer_prompt, "minibuffer-prompt");
2403 2385
2404 /* Properties that text might use to specify certain actions */ 2386 /* Properties that text might use to specify certain actions. */
2405 2387
2406 DEFSYM (Qmouse_left, "mouse-left"); 2388 DEFSYM (Qmouse_left, "mouse-left");
2407 DEFSYM (Qmouse_entered, "mouse-entered"); 2389 DEFSYM (Qmouse_entered, "mouse-entered");
diff --git a/src/undo.c b/src/undo.c
index 46b467ac6b4..948dcf9ec1a 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -34,12 +34,6 @@ static struct buffer *last_undo_buffer;
34static struct buffer *last_boundary_buffer; 34static struct buffer *last_boundary_buffer;
35static ptrdiff_t last_boundary_position; 35static ptrdiff_t last_boundary_position;
36 36
37Lisp_Object Qinhibit_read_only;
38
39/* Marker for function call undo list elements. */
40
41Lisp_Object Qapply;
42
43/* The first time a command records something for undo. 37/* The first time a command records something for undo.
44 it also allocates the undo-boundary object 38 it also allocates the undo-boundary object
45 which will be added to the list at the end of the command. 39 which will be added to the list at the end of the command.
@@ -461,6 +455,8 @@ void
461syms_of_undo (void) 455syms_of_undo (void)
462{ 456{
463 DEFSYM (Qinhibit_read_only, "inhibit-read-only"); 457 DEFSYM (Qinhibit_read_only, "inhibit-read-only");
458
459 /* Marker for function call undo list elements. */
464 DEFSYM (Qapply, "apply"); 460 DEFSYM (Qapply, "apply");
465 461
466 pending_boundary = Qnil; 462 pending_boundary = Qnil;
diff --git a/src/w32font.c b/src/w32font.c
index 1b0a8a2e7c4..6b486b71b8e 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -291,7 +291,7 @@ intern_font_name (char * string)
291 Lisp_Object obarray = check_obarray (Vobarray); 291 Lisp_Object obarray = check_obarray (Vobarray);
292 Lisp_Object tem = oblookup (obarray, SDATA (str), len, len); 292 Lisp_Object tem = oblookup (obarray, SDATA (str), len, len);
293 /* This code is similar to intern function from lread.c. */ 293 /* This code is similar to intern function from lread.c. */
294 return SYMBOLP (tem) ? tem : intern_driver (str, obarray, XINT (tem)); 294 return SYMBOLP (tem) ? tem : intern_driver (str, obarray, tem);
295} 295}
296 296
297/* w32 implementation of get_cache for font backend. 297/* w32 implementation of get_cache for font backend.
diff --git a/src/window.c b/src/window.c
index 45dfb9ea1c2..b508988953f 100644
--- a/src/window.c
+++ b/src/window.c
@@ -45,20 +45,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
45#include "msdos.h" 45#include "msdos.h"
46#endif 46#endif
47 47
48Lisp_Object Qwindowp, Qwindow_live_p;
49static Lisp_Object Qwindow_valid_p;
50static Lisp_Object Qwindow_configuration_p;
51static Lisp_Object Qrecord_window_buffer;
52static Lisp_Object Qwindow_deletable_p, Qdelete_window, Qdisplay_buffer;
53static Lisp_Object Qreplace_buffer_in_windows, Qget_mru_window;
54static Lisp_Object Qwindow_resize_root_window, Qwindow_resize_root_window_vertically;
55static Lisp_Object Qwindow_sanitize_window_sizes;
56static Lisp_Object Qwindow_pixel_to_total;
57static Lisp_Object Qscroll_up, Qscroll_down, Qscroll_command;
58static Lisp_Object Qsafe, Qabove, Qbelow, Qwindow_size, Qclone_of;
59static Lisp_Object Qfloor, Qceiling;
60static Lisp_Object Qwindow_point_insertion_type;
61
62static int displayed_window_lines (struct window *); 48static int displayed_window_lines (struct window *);
63static int count_windows (struct window *); 49static int count_windows (struct window *);
64static int get_leaf_windows (struct window *, struct window **, int); 50static int get_leaf_windows (struct window *, struct window **, int);
@@ -115,15 +101,9 @@ Lisp_Object minibuf_window;
115 shown as the selected window when the minibuffer is selected. */ 101 shown as the selected window when the minibuffer is selected. */
116Lisp_Object minibuf_selected_window; 102Lisp_Object minibuf_selected_window;
117 103
118/* Hook run at end of temp_output_buffer_show. */
119static Lisp_Object Qtemp_buffer_show_hook;
120
121/* Incremented for each window created. */ 104/* Incremented for each window created. */
122static int sequence_number; 105static int sequence_number;
123 106
124/* Hook to run when window config changes. */
125static Lisp_Object Qwindow_configuration_change_hook;
126
127/* Used by the function window_scroll_pixel_based. */ 107/* Used by the function window_scroll_pixel_based. */
128static int window_scroll_pixel_based_preserve_x; 108static int window_scroll_pixel_based_preserve_x;
129static int window_scroll_pixel_based_preserve_y; 109static int window_scroll_pixel_based_preserve_y;
@@ -3653,7 +3633,7 @@ temp_output_buffer_show (register Lisp_Object buf)
3653 record_unwind_protect (select_window_norecord, prev_window); 3633 record_unwind_protect (select_window_norecord, prev_window);
3654 Fselect_window (window, Qt); 3634 Fselect_window (window, Qt);
3655 Fset_buffer (w->contents); 3635 Fset_buffer (w->contents);
3656 Frun_hooks (1, &Qtemp_buffer_show_hook); 3636 run_hook (Qtemp_buffer_show_hook);
3657 unbind_to (count, Qnil); 3637 unbind_to (count, Qnil);
3658 } 3638 }
3659 } 3639 }
diff --git a/src/window.h b/src/window.h
index 2ed0f3e9fbc..2ec28ab4e56 100644
--- a/src/window.h
+++ b/src/window.h
@@ -1085,7 +1085,6 @@ struct glyph *get_phys_cursor_glyph (struct window *w);
1085 CHECK_TYPE (WINDOW_LIVE_P (WINDOW), Qwindow_live_p, WINDOW) 1085 CHECK_TYPE (WINDOW_LIVE_P (WINDOW), Qwindow_live_p, WINDOW)
1086 1086
1087/* These used to be in lisp.h. */ 1087/* These used to be in lisp.h. */
1088extern Lisp_Object Qwindow_live_p;
1089extern Lisp_Object Vwindow_list; 1088extern Lisp_Object Vwindow_list;
1090 1089
1091extern Lisp_Object window_list (void); 1090extern Lisp_Object window_list (void);
diff --git a/src/xdisp.c b/src/xdisp.c
index aa5bfcbcbe4..58a4f43be81 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -324,52 +324,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
324 324
325#define INFINITY 10000000 325#define INFINITY 10000000
326 326
327Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map;
328Lisp_Object Qwindow_scroll_functions;
329static Lisp_Object Qwindow_text_change_functions;
330static Lisp_Object Qredisplay_end_trigger_functions;
331Lisp_Object Qinhibit_point_motion_hooks;
332static Lisp_Object QCeval, QCpropertize;
333Lisp_Object QCfile, QCdata;
334static Lisp_Object Qfontified;
335static Lisp_Object Qgrow_only;
336static Lisp_Object Qinhibit_eval_during_redisplay;
337static Lisp_Object Qbuffer_position, Qposition, Qobject;
338static Lisp_Object Qright_to_left, Qleft_to_right;
339
340/* Cursor shapes. */
341Lisp_Object Qbar, Qhbar, Qbox, Qhollow;
342
343/* Pointer shapes. */
344static Lisp_Object Qarrow, Qhand;
345Lisp_Object Qtext;
346
347/* Holds the list (error). */ 327/* Holds the list (error). */
348static Lisp_Object list_of_error; 328static Lisp_Object list_of_error;
349 329
350Lisp_Object Qfontification_functions;
351
352static Lisp_Object Qwrap_prefix;
353static Lisp_Object Qline_prefix;
354static Lisp_Object Qredisplay_internal;
355
356/* Non-nil means don't actually do any redisplay. */
357
358Lisp_Object Qinhibit_redisplay;
359
360/* Names of text properties relevant for redisplay. */
361
362Lisp_Object Qdisplay;
363
364Lisp_Object Qspace, QCalign_to;
365static Lisp_Object QCrelative_width, QCrelative_height;
366Lisp_Object Qleft_margin, Qright_margin;
367static Lisp_Object Qspace_width, Qraise;
368static Lisp_Object Qslice;
369Lisp_Object Qcenter;
370static Lisp_Object Qmargin, Qpointer;
371static Lisp_Object Qline_height;
372
373#ifdef HAVE_WINDOW_SYSTEM 330#ifdef HAVE_WINDOW_SYSTEM
374 331
375/* Test if overflow newline into fringe. Called with iterator IT 332/* Test if overflow newline into fringe. Called with iterator IT
@@ -403,31 +360,6 @@ static Lisp_Object Qline_height;
403 && (*BYTE_POS_ADDR (IT_BYTEPOS (*it)) == ' ' \ 360 && (*BYTE_POS_ADDR (IT_BYTEPOS (*it)) == ' ' \
404 || *BYTE_POS_ADDR (IT_BYTEPOS (*it)) == '\t')))) \ 361 || *BYTE_POS_ADDR (IT_BYTEPOS (*it)) == '\t')))) \
405 362
406/* Name of the face used to highlight trailing whitespace. */
407
408static Lisp_Object Qtrailing_whitespace;
409
410/* Name and number of the face used to highlight escape glyphs. */
411
412static Lisp_Object Qescape_glyph;
413
414/* Name and number of the face used to highlight non-breaking spaces. */
415
416static Lisp_Object Qnobreak_space;
417
418/* The symbol `image' which is the car of the lists used to represent
419 images in Lisp. Also a tool bar style. */
420
421Lisp_Object Qimage;
422
423/* The image map types. */
424Lisp_Object QCmap;
425static Lisp_Object QCpointer;
426static Lisp_Object Qrect, Qcircle, Qpoly;
427
428/* Tool bar styles */
429Lisp_Object Qboth, Qboth_horiz, Qtext_image_horiz;
430
431/* Non-zero means print newline to stdout before next mini-buffer 363/* Non-zero means print newline to stdout before next mini-buffer
432 message. */ 364 message. */
433 365
@@ -477,21 +409,6 @@ static struct text_pos this_line_min_pos;
477 409
478static struct buffer *this_line_buffer; 410static struct buffer *this_line_buffer;
479 411
480
481/* Values of those variables at last redisplay are stored as
482 properties on `overlay-arrow-position' symbol. However, if
483 Voverlay_arrow_position is a marker, last-arrow-position is its
484 numerical position. */
485
486static Lisp_Object Qlast_arrow_position, Qlast_arrow_string;
487
488/* Alternative overlay-arrow-string and overlay-arrow-bitmap
489 properties on a symbol in overlay-arrow-variable-list. */
490
491static Lisp_Object Qoverlay_arrow_string, Qoverlay_arrow_bitmap;
492
493Lisp_Object Qmenu_bar_update_hook;
494
495/* Nonzero if an overlay arrow has been displayed in this window. */ 412/* Nonzero if an overlay arrow has been displayed in this window. */
496 413
497static bool overlay_arrow_seen; 414static bool overlay_arrow_seen;
@@ -567,11 +484,6 @@ static bool display_last_displayed_message_p;
567 484
568static bool message_buf_print; 485static bool message_buf_print;
569 486
570/* The symbol `inhibit-menubar-update' and its DEFVAR_BOOL variable. */
571
572static Lisp_Object Qinhibit_menubar_update;
573static Lisp_Object Qmessage_truncate_lines;
574
575/* Set to 1 in clear_message to make redisplay_internal aware 487/* Set to 1 in clear_message to make redisplay_internal aware
576 of an emptied echo area. */ 488 of an emptied echo area. */
577 489
@@ -691,8 +603,6 @@ int trace_move;
691#define TRACE_MOVE(x) (void) 0 603#define TRACE_MOVE(x) (void) 0
692#endif 604#endif
693 605
694static Lisp_Object Qauto_hscroll_mode;
695
696/* Buffer being redisplayed -- for redisplay_window_error. */ 606/* Buffer being redisplayed -- for redisplay_window_error. */
697 607
698static struct buffer *displayed_buffer; 608static struct buffer *displayed_buffer;
@@ -713,7 +623,7 @@ enum prop_handled
713struct props 623struct props
714{ 624{
715 /* The name of the property. */ 625 /* The name of the property. */
716 Lisp_Object *name; 626 struct Lisp_Symbol *name;
717 627
718 /* A unique index for the property. */ 628 /* A unique index for the property. */
719 enum prop_idx idx; 629 enum prop_idx idx;
@@ -734,13 +644,13 @@ static enum prop_handled handle_fontified_prop (struct it *);
734 644
735static struct props it_props[] = 645static struct props it_props[] =
736{ 646{
737 {&Qfontified, FONTIFIED_PROP_IDX, handle_fontified_prop}, 647 {XSYMBOL_INIT (Qfontified), FONTIFIED_PROP_IDX, handle_fontified_prop},
738 /* Handle `face' before `display' because some sub-properties of 648 /* Handle `face' before `display' because some sub-properties of
739 `display' need to know the face. */ 649 `display' need to know the face. */
740 {&Qface, FACE_PROP_IDX, handle_face_prop}, 650 {XSYMBOL_INIT (Qface), FACE_PROP_IDX, handle_face_prop},
741 {&Qdisplay, DISPLAY_PROP_IDX, handle_display_prop}, 651 {XSYMBOL_INIT (Qdisplay), DISPLAY_PROP_IDX, handle_display_prop},
742 {&Qinvisible, INVISIBLE_PROP_IDX, handle_invisible_prop}, 652 {XSYMBOL_INIT (Qinvisible), INVISIBLE_PROP_IDX, handle_invisible_prop},
743 {&Qcomposition, COMPOSITION_PROP_IDX, handle_composition_prop}, 653 {XSYMBOL_INIT (Qcomposition), COMPOSITION_PROP_IDX, handle_composition_prop},
744 {NULL, 0, NULL} 654 {NULL, 0, NULL}
745}; 655};
746 656
@@ -796,9 +706,6 @@ static struct glyph_slice null_glyph_slice = { 0, 0, 0, 0 };
796 706
797bool redisplaying_p; 707bool redisplaying_p;
798 708
799static Lisp_Object Qinhibit_free_realized_faces;
800static Lisp_Object Qmode_line_default_help_echo;
801
802/* If a string, XTread_socket generates an event to display that string. 709/* If a string, XTread_socket generates an event to display that string.
803 (The display is done in read_char.) */ 710 (The display is done in read_char.) */
804 711
@@ -824,15 +731,6 @@ static struct atimer *hourglass_atimer;
824 731
825#endif /* HAVE_WINDOW_SYSTEM */ 732#endif /* HAVE_WINDOW_SYSTEM */
826 733
827/* Name of the face used to display glyphless characters. */
828static Lisp_Object Qglyphless_char;
829
830/* Symbol for the purpose of Vglyphless_char_display. */
831static Lisp_Object Qglyphless_char_display;
832
833/* Method symbols for Vglyphless_char_display. */
834static Lisp_Object Qhex_code, Qempty_box, Qthin_space, Qzero_width;
835
836/* Default number of seconds to wait before displaying an hourglass 734/* Default number of seconds to wait before displaying an hourglass
837 cursor. */ 735 cursor. */
838#define DEFAULT_HOURGLASS_DELAY 1 736#define DEFAULT_HOURGLASS_DELAY 1
@@ -2696,8 +2594,6 @@ safe__call1 (bool inhibit_quit, Lisp_Object fn, ...)
2696 return retval; 2594 return retval;
2697} 2595}
2698 2596
2699static Lisp_Object Qeval;
2700
2701Lisp_Object 2597Lisp_Object
2702safe_eval (Lisp_Object sexpr) 2598safe_eval (Lisp_Object sexpr)
2703{ 2599{
@@ -3620,7 +3516,7 @@ compute_stop_pos (struct it *it)
3620 3516
3621 /* Get properties here. */ 3517 /* Get properties here. */
3622 for (p = it_props; p->handler; ++p) 3518 for (p = it_props; p->handler; ++p)
3623 values_here[p->idx] = textget (iv->plist, *p->name); 3519 values_here[p->idx] = textget (iv->plist, make_lisp_symbol (p->name));
3624 3520
3625 /* Look for an interval following iv that has different 3521 /* Look for an interval following iv that has different
3626 properties. */ 3522 properties. */
@@ -3632,9 +3528,8 @@ compute_stop_pos (struct it *it)
3632 { 3528 {
3633 for (p = it_props; p->handler; ++p) 3529 for (p = it_props; p->handler; ++p)
3634 { 3530 {
3635 Lisp_Object new_value; 3531 Lisp_Object new_value = textget (next_iv->plist,
3636 3532 make_lisp_symbol (p->name));
3637 new_value = textget (next_iv->plist, *p->name);
3638 if (!EQ (values_here[p->idx], new_value)) 3533 if (!EQ (values_here[p->idx], new_value))
3639 break; 3534 break;
3640 } 3535 }
@@ -13478,7 +13373,7 @@ redisplay_internal (void)
13478 specbind (Qinhibit_free_realized_faces, Qnil); 13373 specbind (Qinhibit_free_realized_faces, Qnil);
13479 13374
13480 /* Record this function, so it appears on the profiler's backtraces. */ 13375 /* Record this function, so it appears on the profiler's backtraces. */
13481 record_in_backtrace (Qredisplay_internal, &Qnil, 0); 13376 record_in_backtrace (Qredisplay_internal, 0, 0);
13482 13377
13483 FOR_EACH_FRAME (tail, frame) 13378 FOR_EACH_FRAME (tail, frame)
13484 XFRAME (frame)->already_hscrolled_p = 0; 13379 XFRAME (frame)->already_hscrolled_p = 0;
@@ -30571,7 +30466,9 @@ syms_of_xdisp (void)
30571 Vmessage_stack = Qnil; 30466 Vmessage_stack = Qnil;
30572 staticpro (&Vmessage_stack); 30467 staticpro (&Vmessage_stack);
30573 30468
30469 /* Non-nil means don't actually do any redisplay. */
30574 DEFSYM (Qinhibit_redisplay, "inhibit-redisplay"); 30470 DEFSYM (Qinhibit_redisplay, "inhibit-redisplay");
30471
30575 DEFSYM (Qredisplay_internal, "redisplay_internal (C function)"); 30472 DEFSYM (Qredisplay_internal, "redisplay_internal (C function)");
30576 30473
30577 message_dolog_marker1 = Fmake_marker (); 30474 message_dolog_marker1 = Fmake_marker ();
@@ -30610,6 +30507,8 @@ syms_of_xdisp (void)
30610 DEFSYM (Qinhibit_point_motion_hooks, "inhibit-point-motion-hooks"); 30507 DEFSYM (Qinhibit_point_motion_hooks, "inhibit-point-motion-hooks");
30611 DEFSYM (Qeval, "eval"); 30508 DEFSYM (Qeval, "eval");
30612 DEFSYM (QCdata, ":data"); 30509 DEFSYM (QCdata, ":data");
30510
30511 /* Names of text properties relevant for redisplay. */
30613 DEFSYM (Qdisplay, "display"); 30512 DEFSYM (Qdisplay, "display");
30614 DEFSYM (Qspace_width, "space-width"); 30513 DEFSYM (Qspace_width, "space-width");
30615 DEFSYM (Qraise, "raise"); 30514 DEFSYM (Qraise, "raise");
@@ -30629,40 +30528,69 @@ syms_of_xdisp (void)
30629 DEFSYM (QCfile, ":file"); 30528 DEFSYM (QCfile, ":file");
30630 DEFSYM (Qfontified, "fontified"); 30529 DEFSYM (Qfontified, "fontified");
30631 DEFSYM (Qfontification_functions, "fontification-functions"); 30530 DEFSYM (Qfontification_functions, "fontification-functions");
30531
30532 /* Name of the face used to highlight trailing whitespace. */
30632 DEFSYM (Qtrailing_whitespace, "trailing-whitespace"); 30533 DEFSYM (Qtrailing_whitespace, "trailing-whitespace");
30534
30535 /* Name and number of the face used to highlight escape glyphs. */
30633 DEFSYM (Qescape_glyph, "escape-glyph"); 30536 DEFSYM (Qescape_glyph, "escape-glyph");
30537
30538 /* Name and number of the face used to highlight non-breaking spaces. */
30634 DEFSYM (Qnobreak_space, "nobreak-space"); 30539 DEFSYM (Qnobreak_space, "nobreak-space");
30540
30541 /* The symbol 'image' which is the car of the lists used to represent
30542 images in Lisp. Also a tool bar style. */
30635 DEFSYM (Qimage, "image"); 30543 DEFSYM (Qimage, "image");
30544
30545 /* Tool bar styles. */
30636 DEFSYM (Qtext, "text"); 30546 DEFSYM (Qtext, "text");
30637 DEFSYM (Qboth, "both"); 30547 DEFSYM (Qboth, "both");
30638 DEFSYM (Qboth_horiz, "both-horiz"); 30548 DEFSYM (Qboth_horiz, "both-horiz");
30639 DEFSYM (Qtext_image_horiz, "text-image-horiz"); 30549 DEFSYM (Qtext_image_horiz, "text-image-horiz");
30550
30551 /* The image map types. */
30640 DEFSYM (QCmap, ":map"); 30552 DEFSYM (QCmap, ":map");
30641 DEFSYM (QCpointer, ":pointer"); 30553 DEFSYM (QCpointer, ":pointer");
30642 DEFSYM (Qrect, "rect"); 30554 DEFSYM (Qrect, "rect");
30643 DEFSYM (Qcircle, "circle"); 30555 DEFSYM (Qcircle, "circle");
30644 DEFSYM (Qpoly, "poly"); 30556 DEFSYM (Qpoly, "poly");
30557
30558 /* The symbol `inhibit-menubar-update' and its DEFVAR_BOOL variable. */
30559 DEFSYM (Qinhibit_menubar_update, "inhibit-menubar-update");
30645 DEFSYM (Qmessage_truncate_lines, "message-truncate-lines"); 30560 DEFSYM (Qmessage_truncate_lines, "message-truncate-lines");
30561
30646 DEFSYM (Qgrow_only, "grow-only"); 30562 DEFSYM (Qgrow_only, "grow-only");
30647 DEFSYM (Qinhibit_menubar_update, "inhibit-menubar-update");
30648 DEFSYM (Qinhibit_eval_during_redisplay, "inhibit-eval-during-redisplay"); 30563 DEFSYM (Qinhibit_eval_during_redisplay, "inhibit-eval-during-redisplay");
30649 DEFSYM (Qposition, "position"); 30564 DEFSYM (Qposition, "position");
30650 DEFSYM (Qbuffer_position, "buffer-position"); 30565 DEFSYM (Qbuffer_position, "buffer-position");
30651 DEFSYM (Qobject, "object"); 30566 DEFSYM (Qobject, "object");
30567
30568 /* Cursor shapes. */
30652 DEFSYM (Qbar, "bar"); 30569 DEFSYM (Qbar, "bar");
30653 DEFSYM (Qhbar, "hbar"); 30570 DEFSYM (Qhbar, "hbar");
30654 DEFSYM (Qbox, "box"); 30571 DEFSYM (Qbox, "box");
30655 DEFSYM (Qhollow, "hollow"); 30572 DEFSYM (Qhollow, "hollow");
30573
30574 /* Pointer shapes. */
30656 DEFSYM (Qhand, "hand"); 30575 DEFSYM (Qhand, "hand");
30657 DEFSYM (Qarrow, "arrow"); 30576 DEFSYM (Qarrow, "arrow");
30577 /* also Qtext */
30578
30658 DEFSYM (Qinhibit_free_realized_faces, "inhibit-free-realized-faces"); 30579 DEFSYM (Qinhibit_free_realized_faces, "inhibit-free-realized-faces");
30659 30580
30660 list_of_error = list1 (list2 (intern_c_string ("error"), 30581 list_of_error = list1 (list2 (intern_c_string ("error"),
30661 intern_c_string ("void-variable"))); 30582 intern_c_string ("void-variable")));
30662 staticpro (&list_of_error); 30583 staticpro (&list_of_error);
30663 30584
30585 /* Values of those variables at last redisplay are stored as
30586 properties on 'overlay-arrow-position' symbol. However, if
30587 Voverlay_arrow_position is a marker, last-arrow-position is its
30588 numerical position. */
30664 DEFSYM (Qlast_arrow_position, "last-arrow-position"); 30589 DEFSYM (Qlast_arrow_position, "last-arrow-position");
30665 DEFSYM (Qlast_arrow_string, "last-arrow-string"); 30590 DEFSYM (Qlast_arrow_string, "last-arrow-string");
30591
30592 /* Alternative overlay-arrow-string and overlay-arrow-bitmap
30593 properties on a symbol in overlay-arrow-variable-list. */
30666 DEFSYM (Qoverlay_arrow_string, "overlay-arrow-string"); 30594 DEFSYM (Qoverlay_arrow_string, "overlay-arrow-string");
30667 DEFSYM (Qoverlay_arrow_bitmap, "overlay-arrow-bitmap"); 30595 DEFSYM (Qoverlay_arrow_bitmap, "overlay-arrow-bitmap");
30668 30596
@@ -31162,7 +31090,10 @@ cursor shapes. */);
31162 hourglass_shown_p = 0; 31090 hourglass_shown_p = 0;
31163#endif /* HAVE_WINDOW_SYSTEM */ 31091#endif /* HAVE_WINDOW_SYSTEM */
31164 31092
31093 /* Name of the face used to display glyphless characters. */
31165 DEFSYM (Qglyphless_char, "glyphless-char"); 31094 DEFSYM (Qglyphless_char, "glyphless-char");
31095
31096 /* Method symbols for Vglyphless_char_display. */
31166 DEFSYM (Qhex_code, "hex-code"); 31097 DEFSYM (Qhex_code, "hex-code");
31167 DEFSYM (Qempty_box, "empty-box"); 31098 DEFSYM (Qempty_box, "empty-box");
31168 DEFSYM (Qthin_space, "thin-space"); 31099 DEFSYM (Qthin_space, "thin-space");
@@ -31175,6 +31106,7 @@ be redisplayed. This set can be nil (meaning, only the selected window),
31175or t (meaning all windows). */); 31106or t (meaning all windows). */);
31176 Vpre_redisplay_function = intern ("ignore"); 31107 Vpre_redisplay_function = intern ("ignore");
31177 31108
31109 /* Symbol for the purpose of Vglyphless_char_display. */
31178 DEFSYM (Qglyphless_char_display, "glyphless-char-display"); 31110 DEFSYM (Qglyphless_char_display, "glyphless-char-display");
31179 Fput (Qglyphless_char_display, Qchar_table_extra_slots, make_number (1)); 31111 Fput (Qglyphless_char_display, Qchar_table_extra_slots, make_number (1));
31180 31112
diff --git a/src/xfaces.c b/src/xfaces.c
index 0600f53ba1e..6ecd857d685 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -278,57 +278,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
278 278
279#define FACE_CACHE_BUCKETS_SIZE 1001 279#define FACE_CACHE_BUCKETS_SIZE 1001
280 280
281/* Keyword symbols used for face attribute names. */
282
283Lisp_Object QCfamily, QCheight, QCweight, QCslant;
284static Lisp_Object QCunderline;
285static Lisp_Object QCinverse_video, QCstipple;
286Lisp_Object QCforeground, QCbackground;
287Lisp_Object QCwidth;
288static Lisp_Object QCfont, QCbold, QCitalic;
289static Lisp_Object QCreverse_video;
290static Lisp_Object QCoverline, QCstrike_through, QCbox, QCinherit;
291static Lisp_Object QCfontset, QCdistant_foreground;
292
293/* Symbols used for attribute values. */
294
295Lisp_Object Qnormal;
296Lisp_Object Qbold;
297static Lisp_Object Qline, Qwave;
298Lisp_Object Qextra_light, Qlight;
299Lisp_Object Qsemi_light, Qsemi_bold, Qextra_bold, Qultra_bold;
300Lisp_Object Qoblique;
301Lisp_Object Qitalic;
302static Lisp_Object Qreleased_button, Qpressed_button;
303static Lisp_Object QCstyle, QCcolor, QCline_width;
304Lisp_Object Qunspecified; /* used in dosfns.c */
305static Lisp_Object QCignore_defface;
306
307char unspecified_fg[] = "unspecified-fg", unspecified_bg[] = "unspecified-bg"; 281char unspecified_fg[] = "unspecified-fg", unspecified_bg[] = "unspecified-bg";
308 282
309/* The name of the function to call when the background of the frame
310 has changed, frame_set_background_mode. */
311
312static Lisp_Object Qframe_set_background_mode;
313
314/* Names of basic faces. */
315
316Lisp_Object Qdefault, Qtool_bar, Qfringe;
317static Lisp_Object Qregion;
318Lisp_Object Qheader_line, Qscroll_bar, Qcursor;
319static Lisp_Object Qborder, Qmouse, Qmenu;
320Lisp_Object Qmode_line_inactive;
321static Lisp_Object Qvertical_border;
322static Lisp_Object Qwindow_divider;
323static Lisp_Object Qwindow_divider_first_pixel;
324static Lisp_Object Qwindow_divider_last_pixel;
325
326/* The symbol `face-alias'. A symbols having that property is an
327 alias for another face. Value of the property is the name of
328 the aliased face. */
329
330static Lisp_Object Qface_alias;
331
332/* Alist of alternative font families. Each element is of the form 283/* Alist of alternative font families. Each element is of the form
333 (FAMILY FAMILY1 FAMILY2 ...). If fonts of FAMILY can't be loaded, 284 (FAMILY FAMILY1 FAMILY2 ...). If fonts of FAMILY can't be loaded,
334 try FAMILY1, then FAMILY2, ... */ 285 try FAMILY1, then FAMILY2, ... */
@@ -341,32 +292,6 @@ Lisp_Object Vface_alternative_font_family_alist;
341 292
342Lisp_Object Vface_alternative_font_registry_alist; 293Lisp_Object Vface_alternative_font_registry_alist;
343 294
344/* Allowed scalable fonts. A value of nil means don't allow any
345 scalable fonts. A value of t means allow the use of any scalable
346 font. Otherwise, value must be a list of regular expressions. A
347 font may be scaled if its name matches a regular expression in the
348 list. */
349
350static Lisp_Object Qscalable_fonts_allowed;
351
352/* The symbols `foreground-color' and `background-color' which can be
353 used as part of a `face' property. This is for compatibility with
354 Emacs 20.2. */
355
356Lisp_Object Qforeground_color, Qbackground_color;
357
358/* The symbols `face' and `mouse-face' used as text properties. */
359
360Lisp_Object Qface;
361
362/* Property for basic faces which other faces cannot inherit. */
363
364static Lisp_Object Qface_no_inherit;
365
366/* Error symbol for wrong_type_argument in load_pixmap. */
367
368static Lisp_Object Qbitmap_spec_p;
369
370/* The next ID to assign to Lisp faces. */ 295/* The next ID to assign to Lisp faces. */
371 296
372static int next_lface_id; 297static int next_lface_id;
@@ -376,14 +301,6 @@ static int next_lface_id;
376static Lisp_Object *lface_id_to_name; 301static Lisp_Object *lface_id_to_name;
377static ptrdiff_t lface_id_to_name_size; 302static ptrdiff_t lface_id_to_name_size;
378 303
379/* TTY color-related functions (defined in tty-colors.el). */
380
381static Lisp_Object Qtty_color_desc, Qtty_color_by_index, Qtty_color_standard_values;
382
383/* The name of the function used to compute colors on TTYs. */
384
385static Lisp_Object Qtty_color_alist;
386
387#ifdef HAVE_WINDOW_SYSTEM 304#ifdef HAVE_WINDOW_SYSTEM
388 305
389/* Counter for calls to clear_face_cache. If this counter reaches 306/* Counter for calls to clear_face_cache. If this counter reaches
@@ -6397,9 +6314,17 @@ DEFUN ("show-face-resources", Fshow_face_resources, Sshow_face_resources,
6397void 6314void
6398syms_of_xfaces (void) 6315syms_of_xfaces (void)
6399{ 6316{
6317 /* The symbols `face' and `mouse-face' used as text properties. */
6400 DEFSYM (Qface, "face"); 6318 DEFSYM (Qface, "face");
6319
6320 /* Property for basic faces which other faces cannot inherit. */
6401 DEFSYM (Qface_no_inherit, "face-no-inherit"); 6321 DEFSYM (Qface_no_inherit, "face-no-inherit");
6322
6323 /* Error symbol for wrong_type_argument in load_pixmap. */
6402 DEFSYM (Qbitmap_spec_p, "bitmap-spec-p"); 6324 DEFSYM (Qbitmap_spec_p, "bitmap-spec-p");
6325
6326 /* The name of the function to call when the background of the frame
6327 has changed, frame_set_background_mode. */
6403 DEFSYM (Qframe_set_background_mode, "frame-set-background-mode"); 6328 DEFSYM (Qframe_set_background_mode, "frame-set-background-mode");
6404 6329
6405 /* Lisp face attribute keywords. */ 6330 /* Lisp face attribute keywords. */
@@ -6442,12 +6367,22 @@ syms_of_xfaces (void)
6442 DEFSYM (Qultra_bold, "ultra-bold"); 6367 DEFSYM (Qultra_bold, "ultra-bold");
6443 DEFSYM (Qoblique, "oblique"); 6368 DEFSYM (Qoblique, "oblique");
6444 DEFSYM (Qitalic, "italic"); 6369 DEFSYM (Qitalic, "italic");
6370
6371 /* The symbols `foreground-color' and `background-color' which can be
6372 used as part of a `face' property. This is for compatibility with
6373 Emacs 20.2. */
6445 DEFSYM (Qbackground_color, "background-color"); 6374 DEFSYM (Qbackground_color, "background-color");
6446 DEFSYM (Qforeground_color, "foreground-color"); 6375 DEFSYM (Qforeground_color, "foreground-color");
6376
6447 DEFSYM (Qunspecified, "unspecified"); 6377 DEFSYM (Qunspecified, "unspecified");
6448 DEFSYM (QCignore_defface, ":ignore-defface"); 6378 DEFSYM (QCignore_defface, ":ignore-defface");
6449 6379
6380 /* The symbol `face-alias'. A symbol having that property is an
6381 alias for another face. Value of the property is the name of
6382 the aliased face. */
6450 DEFSYM (Qface_alias, "face-alias"); 6383 DEFSYM (Qface_alias, "face-alias");
6384
6385 /* Names of basic faces. */
6451 DEFSYM (Qdefault, "default"); 6386 DEFSYM (Qdefault, "default");
6452 DEFSYM (Qtool_bar, "tool-bar"); 6387 DEFSYM (Qtool_bar, "tool-bar");
6453 DEFSYM (Qregion, "region"); 6388 DEFSYM (Qregion, "region");
@@ -6460,13 +6395,23 @@ syms_of_xfaces (void)
6460 DEFSYM (Qmouse, "mouse"); 6395 DEFSYM (Qmouse, "mouse");
6461 DEFSYM (Qmode_line_inactive, "mode-line-inactive"); 6396 DEFSYM (Qmode_line_inactive, "mode-line-inactive");
6462 DEFSYM (Qvertical_border, "vertical-border"); 6397 DEFSYM (Qvertical_border, "vertical-border");
6398
6399 /* TTY color-related functions (defined in tty-colors.el). */
6463 DEFSYM (Qwindow_divider, "window-divider"); 6400 DEFSYM (Qwindow_divider, "window-divider");
6464 DEFSYM (Qwindow_divider_first_pixel, "window-divider-first-pixel"); 6401 DEFSYM (Qwindow_divider_first_pixel, "window-divider-first-pixel");
6465 DEFSYM (Qwindow_divider_last_pixel, "window-divider-last-pixel"); 6402 DEFSYM (Qwindow_divider_last_pixel, "window-divider-last-pixel");
6466 DEFSYM (Qtty_color_desc, "tty-color-desc"); 6403 DEFSYM (Qtty_color_desc, "tty-color-desc");
6467 DEFSYM (Qtty_color_standard_values, "tty-color-standard-values"); 6404 DEFSYM (Qtty_color_standard_values, "tty-color-standard-values");
6468 DEFSYM (Qtty_color_by_index, "tty-color-by-index"); 6405 DEFSYM (Qtty_color_by_index, "tty-color-by-index");
6406
6407 /* The name of the function used to compute colors on TTYs. */
6469 DEFSYM (Qtty_color_alist, "tty-color-alist"); 6408 DEFSYM (Qtty_color_alist, "tty-color-alist");
6409
6410 /* Allowed scalable fonts. A value of nil means don't allow any
6411 scalable fonts. A value of t means allow the use of any scalable
6412 font. Otherwise, value must be a list of regular expressions. A
6413 font may be scaled if its name matches a regular expression in the
6414 list. */
6470 DEFSYM (Qscalable_fonts_allowed, "scalable-fonts-allowed"); 6415 DEFSYM (Qscalable_fonts_allowed, "scalable-fonts-allowed");
6471 6416
6472 Vparam_value_alist = list1 (Fcons (Qnil, Qnil)); 6417 Vparam_value_alist = list1 (Fcons (Qnil, Qnil));
diff --git a/src/xfns.c b/src/xfns.c
index 2ea5f06e063..d4f96c61b07 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -125,10 +125,6 @@ extern LWLIB_ID widget_id_tick;
125 125
126#define MAXREQUEST(dpy) (XMaxRequestSize (dpy)) 126#define MAXREQUEST(dpy) (XMaxRequestSize (dpy))
127 127
128static Lisp_Object Qundefined_color;
129static Lisp_Object Qcompound_text, Qcancel_timer;
130Lisp_Object Qfont_param;
131
132#ifdef GLYPH_DEBUG 128#ifdef GLYPH_DEBUG
133static ptrdiff_t image_cache_refcount; 129static ptrdiff_t image_cache_refcount;
134static int dpyinfo_refcount; 130static int dpyinfo_refcount;
diff --git a/src/xftfont.c b/src/xftfont.c
index f0ad8db0c28..c587d814efa 100644
--- a/src/xftfont.c
+++ b/src/xftfont.c
@@ -38,9 +38,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
38 38
39/* Xft font driver. */ 39/* Xft font driver. */
40 40
41Lisp_Object Qxft;
42static Lisp_Object QChinting, QCautohint, QChintstyle, QCrgba, QCembolden,
43 QClcdfilter;
44 41
45/* The actual structure for Xft font that can be cast to struct 42/* The actual structure for Xft font that can be cast to struct
46 font. */ 43 font. */
diff --git a/src/xmenu.c b/src/xmenu.c
index c6bb9faee66..fd667a84343 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -108,8 +108,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
108#define TRUE 1 108#define TRUE 1
109#endif /* no TRUE */ 109#endif /* no TRUE */
110 110
111static Lisp_Object Qdebug_on_next_call; 111
112
113/* Flag which when set indicates a dialog or menu has been posted by 112/* Flag which when set indicates a dialog or menu has been posted by
114 Xt on behalf of one of the widget sets. */ 113 Xt on behalf of one of the widget sets. */
115static int popup_activated_flag; 114static int popup_activated_flag;
diff --git a/src/xml.c b/src/xml.c
index 11a6e456450..3e64788f822 100644
--- a/src/xml.c
+++ b/src/xml.c
@@ -29,8 +29,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
29#include "buffer.h" 29#include "buffer.h"
30 30
31 31
32static Lisp_Object Qlibxml2_dll;
33
34#ifdef WINDOWSNT 32#ifdef WINDOWSNT
35 33
36# include <windows.h> 34# include <windows.h>
diff --git a/src/xselect.c b/src/xselect.c
index 92460d115db..33ff366b89c 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -80,19 +80,6 @@ static void lisp_data_to_selection_data (struct x_display_info *, Lisp_Object,
80#define TRACE2(fmt, a0, a1) (void) 0 80#define TRACE2(fmt, a0, a1) (void) 0
81#endif 81#endif
82 82
83
84static Lisp_Object QSECONDARY, QSTRING, QINTEGER, QCLIPBOARD, QTIMESTAMP,
85 QTEXT, QDELETE, QMULTIPLE, QINCR, QEMACS_TMP, QTARGETS, QATOM, QNULL,
86 QATOM_PAIR, QCLIPBOARD_MANAGER, QSAVE_TARGETS;
87
88static Lisp_Object QCOMPOUND_TEXT; /* This is a type of selection. */
89static Lisp_Object QUTF8_STRING; /* This is a type of selection. */
90
91static Lisp_Object Qcompound_text_with_extensions;
92
93static Lisp_Object Qforeign_selection;
94static Lisp_Object Qx_lost_selection_functions, Qx_sent_selection_functions;
95
96/* Bytes needed to represent 'long' data. This is as per libX11; it 83/* Bytes needed to represent 'long' data. This is as per libX11; it
97 is not necessarily sizeof (long). */ 84 is not necessarily sizeof (long). */
98#define X_LONG_SIZE 4 85#define X_LONG_SIZE 4
@@ -2687,8 +2674,11 @@ A value of 0 means wait as long as necessary. This is initialized from the
2687 DEFSYM (QCLIPBOARD, "CLIPBOARD"); 2674 DEFSYM (QCLIPBOARD, "CLIPBOARD");
2688 DEFSYM (QTIMESTAMP, "TIMESTAMP"); 2675 DEFSYM (QTIMESTAMP, "TIMESTAMP");
2689 DEFSYM (QTEXT, "TEXT"); 2676 DEFSYM (QTEXT, "TEXT");
2677
2678 /* These are types of selection. */
2690 DEFSYM (QCOMPOUND_TEXT, "COMPOUND_TEXT"); 2679 DEFSYM (QCOMPOUND_TEXT, "COMPOUND_TEXT");
2691 DEFSYM (QUTF8_STRING, "UTF8_STRING"); 2680 DEFSYM (QUTF8_STRING, "UTF8_STRING");
2681
2692 DEFSYM (QDELETE, "DELETE"); 2682 DEFSYM (QDELETE, "DELETE");
2693 DEFSYM (QMULTIPLE, "MULTIPLE"); 2683 DEFSYM (QMULTIPLE, "MULTIPLE");
2694 DEFSYM (QINCR, "INCR"); 2684 DEFSYM (QINCR, "INCR");
diff --git a/src/xsettings.c b/src/xsettings.c
index ec45d47f9b7..8dbc7d990fe 100644
--- a/src/xsettings.c
+++ b/src/xsettings.c
@@ -51,8 +51,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
51static char *current_mono_font; 51static char *current_mono_font;
52static char *current_font; 52static char *current_font;
53static struct x_display_info *first_dpyinfo; 53static struct x_display_info *first_dpyinfo;
54static Lisp_Object Qmonospace_font_name, Qfont_name, Qfont_render,
55 Qtool_bar_style;
56static Lisp_Object current_tool_bar_style; 54static Lisp_Object current_tool_bar_style;
57 55
58/* Store an config changed event in to the event queue. */ 56/* Store an config changed event in to the event queue. */
diff --git a/src/xterm.c b/src/xterm.c
index cf4aab0eb2d..05d04c8cc65 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -180,17 +180,9 @@ static Time ignore_next_mouse_click_timeout;
180 180
181static int x_noop_count; 181static int x_noop_count;
182 182
183static Lisp_Object Qalt, Qhyper, Qmeta, Qsuper, Qmodifier_value;
184
185static Lisp_Object Qvendor_specific_keysyms;
186static Lisp_Object Qlatin_1;
187
188#ifdef USE_GTK 183#ifdef USE_GTK
189/* The name of the Emacs icon file. */ 184/* The name of the Emacs icon file. */
190static Lisp_Object xg_default_icon_file; 185static Lisp_Object xg_default_icon_file;
191
192/* Used in gtkutil.c. */
193Lisp_Object Qx_gtk_map_stock;
194#endif 186#endif
195 187
196/* Some functions take this as char *, not const char *. */ 188/* Some functions take this as char *, not const char *. */
diff --git a/src/xterm.h b/src/xterm.h
index 25ce67b55d0..f2aff72e3ac 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -1111,9 +1111,6 @@ extern bool x_session_have_connection (void);
1111extern void x_session_close (void); 1111extern void x_session_close (void);
1112#endif 1112#endif
1113 1113
1114/* Defined in xterm.c */
1115
1116extern Lisp_Object Qx_gtk_map_stock;
1117 1114
1118/* Is the frame embedded into another application? */ 1115/* Is the frame embedded into another application? */
1119 1116