aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoakim Verona2011-06-26 22:00:24 +0200
committerJoakim Verona2011-06-26 22:00:24 +0200
commit76d08552619c83268f1353f449099f50ed6f93fa (patch)
tree321a375628d83d5c8aeea5876cf375ec7ad93f58 /src
parent9fa0e291e866fb7945e18cd2ad8514090c13d510 (diff)
parent5b66d427c05eba5493c27da28c460a129b4203cc (diff)
downloademacs-76d08552619c83268f1353f449099f50ed6f93fa.tar.gz
emacs-76d08552619c83268f1353f449099f50ed6f93fa.zip
first working example of mvc. multiple views of a slider are kept in sync
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog123
-rw-r--r--src/alloc.c10
-rw-r--r--src/buffer.c51
-rw-r--r--src/bytecode.c6
-rw-r--r--src/callint.c49
-rw-r--r--src/casefiddle.c3
-rw-r--r--src/casetab.c6
-rw-r--r--src/category.c12
-rw-r--r--src/ccl.c23
-rw-r--r--src/character.h3
-rw-r--r--src/cmds.c19
-rw-r--r--src/composite.c10
-rw-r--r--src/dbusbind.c144
-rw-r--r--src/dired.c22
-rw-r--r--src/dispnew.c7
-rw-r--r--src/doc.c3
-rw-r--r--src/editfns.c10
-rw-r--r--src/emacs.c6
-rw-r--r--src/eval.c56
-rw-r--r--src/fileio.c153
-rw-r--r--src/fns.c75
-rw-r--r--src/frame.c145
-rw-r--r--src/fringe.c18
-rw-r--r--src/gnutls.c78
-rw-r--r--src/image.c2
-rw-r--r--src/insdel.c3
-rw-r--r--src/keyboard.h2
-rw-r--r--src/keymap.c34
-rw-r--r--src/lisp.h8
-rw-r--r--src/lread.c259
-rw-r--r--src/macros.c25
-rw-r--r--src/minibuf.c96
-rw-r--r--src/msdos.c3
-rw-r--r--src/print.c52
-rw-r--r--src/process.c243
-rw-r--r--src/search.c6
-rw-r--r--src/sound.c12
-rw-r--r--src/syntax.c9
-rw-r--r--src/sysdep.c31
-rw-r--r--src/terminal.c6
-rw-r--r--src/textprop.c54
-rw-r--r--src/undo.c7
-rw-r--r--src/w32.c3
-rw-r--r--src/w32menu.c1
-rw-r--r--src/w32proc.c1
-rw-r--r--src/w32select.c1
-rw-r--r--src/window.c79
-rw-r--r--src/xdisp.c207
-rw-r--r--src/xfaces.c215
-rw-r--r--src/xfns.c19
-rw-r--r--src/xmenu.c3
-rw-r--r--src/xsettings.c12
-rw-r--r--src/xterm.c10
-rw-r--r--src/xwidget.c40
-rw-r--r--src/xwidget.h2
55 files changed, 912 insertions, 1565 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 78fca60ca28..e21412187c7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,124 @@
12011-06-25 Paul Eggert <eggert@cs.ucla.edu>
2
3 Use gnulib's dup2 module instead of rolling our own.
4 * sysdep.c (dup2) [!HAVE_DUP2]: Remove; gnulib now does this.
5
62011-06-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7
8 * dispnew.c (scrolling_window): Before scrolling, turn off a
9 mouse-highlight in the window being scrolled.
10
112011-06-24 Juanma Barranquero <lekktu@gmail.com>
12
13 Move DEFSYM to lisp.h and use everywhere.
14
15 * character.h (DEFSYM): Move declaration...
16 * lisp.h (DEFSYM): ...here.
17
18 * gnutls.c:
19 * minibuf.c:
20 * w32menu.c:
21 * w32proc.c:
22 * w32select.c: Don't include character.h.
23
24 * alloc.c (syms_of_alloc):
25 * buffer.c (syms_of_buffer):
26 * bytecode.c (syms_of_bytecode):
27 * callint.c (syms_of_callint):
28 * casefiddle.c (syms_of_casefiddle):
29 * casetab.c (init_casetab_once):
30 * category.c (init_category_once, syms_of_category):
31 * ccl.c (syms_of_ccl):
32 * cmds.c (syms_of_cmds):
33 * composite.c (syms_of_composite):
34 * dbusbind.c (syms_of_dbusbind):
35 * dired.c (syms_of_dired):
36 * dispnew.c (syms_of_display):
37 * doc.c (syms_of_doc):
38 * editfns.c (syms_of_editfns):
39 * emacs.c (syms_of_emacs):
40 * eval.c (syms_of_eval):
41 * fileio.c (syms_of_fileio):
42 * fns.c (syms_of_fns):
43 * frame.c (syms_of_frame):
44 * fringe.c (syms_of_fringe):
45 * insdel.c (syms_of_insdel):
46 * keymap.c (syms_of_keymap):
47 * lread.c (init_obarray, syms_of_lread):
48 * macros.c (syms_of_macros):
49 * msdos.c (syms_of_msdos):
50 * print.c (syms_of_print):
51 * process.c (syms_of_process):
52 * search.c (syms_of_search):
53 * sound.c (syms_of_sound):
54 * syntax.c (init_syntax_once, syms_of_syntax):
55 * terminal.c (syms_of_terminal):
56 * textprop.c (syms_of_textprop):
57 * undo.c (syms_of_undo):
58 * w32.c (globals_of_w32):
59 * window.c (syms_of_window):
60 * xdisp.c (syms_of_xdisp):
61 * xfaces.c (syms_of_xfaces):
62 * xfns.c (syms_of_xfns):
63 * xmenu.c (syms_of_xmenu):
64 * xsettings.c (syms_of_xsettings):
65 * xterm.c (syms_of_xterm): Use DEFSYM.
66
672011-06-24 Teodor Zlatanov <tzz@lifelogs.com>
68
69 * gnutls.c (syms_of_gnutls): Use the DEFSYM macro from character.h.
70
712011-06-23 Paul Eggert <eggert@cs.ucla.edu>
72
73 Integer and buffer overflow fixes (Bug#8873).
74
75 * print.c (printchar, strout): Check for string overflow.
76 (PRINTPREPARE, printchar, strout):
77 Don't set size unless allocation succeeds.
78
79 * minibuf.c (read_minibuf_noninteractive): Use ptrdiff_t, not int,
80 for sizes. Check for string overflow more accurately.
81 Simplify newline removal at end; this suppresses a GCC 4.6.0 warning.
82
83 * macros.c: Integer and buffer overflow fixes.
84 * keyboard.h (struct keyboard.kbd_macro_bufsize):
85 * macros.c (Fstart_kbd_macro, store_kbd_macro_char):
86 Use ptrdiff_t, not int, for sizes.
87 Don't increment bufsize until after realloc succeeds.
88 Check for size-calculation overflow.
89 (Fstart_kbd_macro): Use EMACS_INT, not int, for XINT result.
90
91 * lisp.h (DEFVAR_KBOARD): Use offsetof instead of char * finagling.
92
93 * lread.c: Integer overflow fixes.
94 (read_integer): Radix is now EMACS_INT, not int,
95 to improve quality of diagnostics for out-of-range radices.
96 Calculate buffer size correctly for out-of-range radices.
97 (read1): Check for integer overflow in radices, and in
98 read-circle numbers.
99 (read_escape): Avoid int overflow.
100 (Fload, openp, read_buffer_size, read1)
101 (substitute_object_recurse, read_vector, read_list, map_obarray):
102 Use ptrdiff_t, not int, for sizes.
103 (read1): Use EMACS_INT, not int, for sizes.
104 Check for size overflow.
105
106 * image.c (cache_image): Check for size arithmetic overflow.
107
108 * lread.c: Integer overflow issues.
109 (saved_doc_string_size, saved_doc_string_length)
110 (prev_saved_doc_string_size, prev_saved_doc_string_length):
111 Now ptrdiff_t, not int.
112 (read1): Don't assume doc string length fits in int. Check for
113 out-of-range doc string lengths.
114 (read_list): Don't assume file position fits in int.
115 (read_escape): Check for hex character overflow.
116
1172011-06-22 Leo Liu <sdl.web@gmail.com>
118
119 * minibuf.c (Fcompleting_read_default, Vcompleting_read_function):
120 Move to minibuffer.el.
121
12011-06-22 Paul Eggert <eggert@cs.ucla.edu> 1222011-06-22 Paul Eggert <eggert@cs.ucla.edu>
2 123
3 Fixes for GLYPH_DEBUG found by GCC 4.6.0 static checking. 124 Fixes for GLYPH_DEBUG found by GCC 4.6.0 static checking.
@@ -250,7 +371,7 @@
250 371
251 * fns.c (secure_hash): Rename from crypto_hash_function and change 372 * fns.c (secure_hash): Rename from crypto_hash_function and change
252 the first arg to accept symbols. 373 the first arg to accept symbols.
253 (Fsecure_hash): New primtive. 374 (Fsecure_hash): New primitive.
254 (syms_of_fns): New symbols. 375 (syms_of_fns): New symbols.
255 376
2562011-06-20 Deniz Dogan <deniz@dogan.se> 3772011-06-20 Deniz Dogan <deniz@dogan.se>
diff --git a/src/alloc.c b/src/alloc.c
index 69623d103c3..43befd722bb 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -6251,8 +6251,7 @@ do hash-consing of the objects allocated to pure space. */);
6251 DEFVAR_LISP ("post-gc-hook", Vpost_gc_hook, 6251 DEFVAR_LISP ("post-gc-hook", Vpost_gc_hook,
6252 doc: /* Hook run after garbage collection has finished. */); 6252 doc: /* Hook run after garbage collection has finished. */);
6253 Vpost_gc_hook = Qnil; 6253 Vpost_gc_hook = Qnil;
6254 Qpost_gc_hook = intern_c_string ("post-gc-hook"); 6254 DEFSYM (Qpost_gc_hook, "post-gc-hook");
6255 staticpro (&Qpost_gc_hook);
6256 6255
6257 DEFVAR_LISP ("memory-signal-data", Vmemory_signal_data, 6256 DEFVAR_LISP ("memory-signal-data", Vmemory_signal_data,
6258 doc: /* Precomputed `signal' argument for memory-full error. */); 6257 doc: /* Precomputed `signal' argument for memory-full error. */);
@@ -6266,11 +6265,8 @@ do hash-consing of the objects allocated to pure space. */);
6266 doc: /* Non-nil means Emacs cannot get much more Lisp memory. */); 6265 doc: /* Non-nil means Emacs cannot get much more Lisp memory. */);
6267 Vmemory_full = Qnil; 6266 Vmemory_full = Qnil;
6268 6267
6269 staticpro (&Qgc_cons_threshold); 6268 DEFSYM (Qgc_cons_threshold, "gc-cons-threshold");
6270 Qgc_cons_threshold = intern_c_string ("gc-cons-threshold"); 6269 DEFSYM (Qchar_table_extra_slots, "char-table-extra-slots");
6271
6272 staticpro (&Qchar_table_extra_slots);
6273 Qchar_table_extra_slots = intern_c_string ("char-table-extra-slots");
6274 6270
6275 DEFVAR_LISP ("gc-elapsed", Vgc_elapsed, 6271 DEFVAR_LISP ("gc-elapsed", Vgc_elapsed,
6276 doc: /* Accumulated time elapsed in garbage collections. 6272 doc: /* Accumulated time elapsed in garbage collections.
diff --git a/src/buffer.c b/src/buffer.c
index 238923a2ba0..006153b0424 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5209,39 +5209,26 @@ syms_of_buffer (void)
5209 staticpro (&Vbuffer_alist); 5209 staticpro (&Vbuffer_alist);
5210 staticpro (&Qprotected_field); 5210 staticpro (&Qprotected_field);
5211 staticpro (&Qpermanent_local); 5211 staticpro (&Qpermanent_local);
5212 Qpermanent_local_hook = intern_c_string ("permanent-local-hook");
5213 staticpro (&Qpermanent_local_hook);
5214 staticpro (&Qkill_buffer_hook); 5212 staticpro (&Qkill_buffer_hook);
5215 Qoverlayp = intern_c_string ("overlayp"); 5213
5216 staticpro (&Qoverlayp); 5214 DEFSYM (Qpermanent_local_hook, "permanent-local-hook");
5217 Qevaporate = intern_c_string ("evaporate"); 5215 DEFSYM (Qoverlayp, "overlayp");
5218 staticpro (&Qevaporate); 5216 DEFSYM (Qevaporate, "evaporate");
5219 Qmodification_hooks = intern_c_string ("modification-hooks"); 5217 DEFSYM (Qmodification_hooks, "modification-hooks");
5220 staticpro (&Qmodification_hooks); 5218 DEFSYM (Qinsert_in_front_hooks, "insert-in-front-hooks");
5221 Qinsert_in_front_hooks = intern_c_string ("insert-in-front-hooks"); 5219 DEFSYM (Qinsert_behind_hooks, "insert-behind-hooks");
5222 staticpro (&Qinsert_in_front_hooks); 5220 DEFSYM (Qget_file_buffer, "get-file-buffer");
5223 Qinsert_behind_hooks = intern_c_string ("insert-behind-hooks"); 5221 DEFSYM (Qpriority, "priority");
5224 staticpro (&Qinsert_behind_hooks); 5222 DEFSYM (Qbefore_string, "before-string");
5225 Qget_file_buffer = intern_c_string ("get-file-buffer"); 5223 DEFSYM (Qafter_string, "after-string");
5226 staticpro (&Qget_file_buffer); 5224 DEFSYM (Qfirst_change_hook, "first-change-hook");
5227 Qpriority = intern_c_string ("priority"); 5225 DEFSYM (Qbefore_change_functions, "before-change-functions");
5228 staticpro (&Qpriority); 5226 DEFSYM (Qafter_change_functions, "after-change-functions");
5229 Qbefore_string = intern_c_string ("before-string"); 5227 DEFSYM (Qkill_buffer_query_functions, "kill-buffer-query-functions");
5230 staticpro (&Qbefore_string); 5228
5231 Qafter_string = intern_c_string ("after-string");
5232 staticpro (&Qafter_string);
5233 Qfirst_change_hook = intern_c_string ("first-change-hook");
5234 staticpro (&Qfirst_change_hook);
5235 Qbefore_change_functions = intern_c_string ("before-change-functions");
5236 staticpro (&Qbefore_change_functions);
5237 Qafter_change_functions = intern_c_string ("after-change-functions");
5238 staticpro (&Qafter_change_functions);
5239 /* The next one is initialized in init_buffer_once. */ 5229 /* The next one is initialized in init_buffer_once. */
5240 staticpro (&Qucs_set_table_for_input); 5230 staticpro (&Qucs_set_table_for_input);
5241 5231
5242 Qkill_buffer_query_functions = intern_c_string ("kill-buffer-query-functions");
5243 staticpro (&Qkill_buffer_query_functions);
5244
5245 Fput (Qprotected_field, Qerror_conditions, 5232 Fput (Qprotected_field, Qerror_conditions,
5246 pure_cons (Qprotected_field, pure_cons (Qerror, Qnil))); 5233 pure_cons (Qprotected_field, pure_cons (Qerror, Qnil)));
5247 Fput (Qprotected_field, Qerror_message, 5234 Fput (Qprotected_field, Qerror_message,
@@ -6035,8 +6022,7 @@ If any of them returns nil, the buffer is not killed. */);
6035 doc: /* Normal hook run before changing the major mode of a buffer. 6022 doc: /* Normal hook run before changing the major mode of a buffer.
6036The function `kill-all-local-variables' runs this before doing anything else. */); 6023The function `kill-all-local-variables' runs this before doing anything else. */);
6037 Vchange_major_mode_hook = Qnil; 6024 Vchange_major_mode_hook = Qnil;
6038 Qchange_major_mode_hook = intern_c_string ("change-major-mode-hook"); 6025 DEFSYM (Qchange_major_mode_hook, "change-major-mode-hook");
6039 staticpro (&Qchange_major_mode_hook);
6040 6026
6041 DEFVAR_LISP ("buffer-list-update-hook", Vbuffer_list_update_hook, 6027 DEFVAR_LISP ("buffer-list-update-hook", Vbuffer_list_update_hook,
6042 doc: /* Hook run when the buffer list changes. 6028 doc: /* Hook run when the buffer list changes.
@@ -6044,8 +6030,7 @@ Functions running this hook are `get-buffer-create',
6044`make-indirect-buffer', `rename-buffer', `kill-buffer', 6030`make-indirect-buffer', `rename-buffer', `kill-buffer',
6045`record-buffer' and `unrecord-buffer'. */); 6031`record-buffer' and `unrecord-buffer'. */);
6046 Vbuffer_list_update_hook = Qnil; 6032 Vbuffer_list_update_hook = Qnil;
6047 Qbuffer_list_update_hook = intern_c_string ("buffer-list-update-hook"); 6033 DEFSYM (Qbuffer_list_update_hook, "buffer-list-update-hook");
6048 staticpro (&Qbuffer_list_update_hook);
6049 6034
6050 defsubr (&Sbuffer_live_p); 6035 defsubr (&Sbuffer_live_p);
6051 defsubr (&Sbuffer_list); 6036 defsubr (&Sbuffer_list);
diff --git a/src/bytecode.c b/src/bytecode.c
index 58b26c79b84..9ed29e94b54 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -1840,8 +1840,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
1840void 1840void
1841syms_of_bytecode (void) 1841syms_of_bytecode (void)
1842{ 1842{
1843 Qbytecode = intern_c_string ("byte-code"); 1843 DEFSYM (Qbytecode, "byte-code");
1844 staticpro (&Qbytecode);
1845 1844
1846 defsubr (&Sbyte_code); 1845 defsubr (&Sbyte_code);
1847 1846
@@ -1863,8 +1862,7 @@ integer, it is incremented each time that symbol's function is called. */);
1863 1862
1864 byte_metering_on = 0; 1863 byte_metering_on = 0;
1865 Vbyte_code_meter = Fmake_vector (make_number (256), make_number (0)); 1864 Vbyte_code_meter = Fmake_vector (make_number (256), make_number (0));
1866 Qbyte_code_meter = intern_c_string ("byte-code-meter"); 1865 DEFSYM (Qbyte_code_meter, "byte-code-meter");
1867 staticpro (&Qbyte_code_meter);
1868 { 1866 {
1869 int i = 256; 1867 int i = 256;
1870 while (i--) 1868 while (i--)
diff --git a/src/callint.c b/src/callint.c
index dc5e6a4c37a..4d0a2a07921 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -896,41 +896,20 @@ syms_of_callint (void)
896 pure_cons (intern_c_string ("point"), 896 pure_cons (intern_c_string ("point"),
897 pure_cons (intern_c_string ("mark"), Qnil)))); 897 pure_cons (intern_c_string ("mark"), Qnil))));
898 898
899 Qlist = intern_c_string ("list"); 899 DEFSYM (Qlist, "list");
900 staticpro (&Qlist); 900 DEFSYM (Qlet, "let");
901 Qlet = intern_c_string ("let"); 901 DEFSYM (Qif, "if");
902 staticpro (&Qlet); 902 DEFSYM (Qwhen, "when");
903 Qif = intern_c_string ("if"); 903 DEFSYM (Qletx, "let*");
904 staticpro (&Qif); 904 DEFSYM (Qsave_excursion, "save-excursion");
905 Qwhen = intern_c_string ("when"); 905 DEFSYM (Qprogn, "progn");
906 staticpro (&Qwhen); 906 DEFSYM (Qminus, "-");
907 Qletx = intern_c_string ("let*"); 907 DEFSYM (Qplus, "+");
908 staticpro (&Qletx); 908 DEFSYM (Qhandle_shift_selection, "handle-shift-selection");
909 Qsave_excursion = intern_c_string ("save-excursion"); 909 DEFSYM (Qcall_interactively, "call-interactively");
910 staticpro (&Qsave_excursion); 910 DEFSYM (Qcommand_debug_status, "command-debug-status");
911 Qprogn = intern_c_string ("progn"); 911 DEFSYM (Qenable_recursive_minibuffers, "enable-recursive-minibuffers");
912 staticpro (&Qprogn); 912 DEFSYM (Qmouse_leave_buffer_hook, "mouse-leave-buffer-hook");
913
914 Qminus = intern_c_string ("-");
915 staticpro (&Qminus);
916
917 Qplus = intern_c_string ("+");
918 staticpro (&Qplus);
919
920 Qhandle_shift_selection = intern_c_string ("handle-shift-selection");
921 staticpro (&Qhandle_shift_selection);
922
923 Qcall_interactively = intern_c_string ("call-interactively");
924 staticpro (&Qcall_interactively);
925
926 Qcommand_debug_status = intern_c_string ("command-debug-status");
927 staticpro (&Qcommand_debug_status);
928
929 Qenable_recursive_minibuffers = intern_c_string ("enable-recursive-minibuffers");
930 staticpro (&Qenable_recursive_minibuffers);
931
932 Qmouse_leave_buffer_hook = intern_c_string ("mouse-leave-buffer-hook");
933 staticpro (&Qmouse_leave_buffer_hook);
934 913
935 DEFVAR_KBOARD ("prefix-arg", Vprefix_arg, 914 DEFVAR_KBOARD ("prefix-arg", Vprefix_arg,
936 doc: /* The value of the prefix argument for the next editing command. 915 doc: /* The value of the prefix argument for the next editing command.
diff --git a/src/casefiddle.c b/src/casefiddle.c
index 1a0a62f273c..50ad4eeda74 100644
--- a/src/casefiddle.c
+++ b/src/casefiddle.c
@@ -417,8 +417,7 @@ With negative argument, capitalize previous words but do not move. */)
417void 417void
418syms_of_casefiddle (void) 418syms_of_casefiddle (void)
419{ 419{
420 Qidentity = intern_c_string ("identity"); 420 DEFSYM (Qidentity, "identity");
421 staticpro (&Qidentity);
422 defsubr (&Supcase); 421 defsubr (&Supcase);
423 defsubr (&Sdowncase); 422 defsubr (&Sdowncase);
424 defsubr (&Scapitalize); 423 defsubr (&Scapitalize);
diff --git a/src/casetab.c b/src/casetab.c
index 29120dd08ce..3433b313c03 100644
--- a/src/casetab.c
+++ b/src/casetab.c
@@ -244,8 +244,7 @@ init_casetab_once (void)
244{ 244{
245 register int i; 245 register int i;
246 Lisp_Object down, up; 246 Lisp_Object down, up;
247 Qcase_table = intern_c_string ("case-table"); 247 DEFSYM (Qcase_table, "case-table");
248 staticpro (&Qcase_table);
249 248
250 /* Intern this now in case it isn't already done. 249 /* Intern this now in case it isn't already done.
251 Setting this variable twice is harmless. 250 Setting this variable twice is harmless.
@@ -288,8 +287,7 @@ init_casetab_once (void)
288void 287void
289syms_of_casetab (void) 288syms_of_casetab (void)
290{ 289{
291 Qcase_table_p = intern_c_string ("case-table-p"); 290 DEFSYM (Qcase_table_p, "case-table-p");
292 staticpro (&Qcase_table_p);
293 291
294 staticpro (&Vascii_canon_table); 292 staticpro (&Vascii_canon_table);
295 staticpro (&Vascii_downcase_table); 293 staticpro (&Vascii_downcase_table);
diff --git a/src/category.c b/src/category.c
index 23fd874c824..08eadb04730 100644
--- a/src/category.c
+++ b/src/category.c
@@ -453,8 +453,7 @@ void
453init_category_once (void) 453init_category_once (void)
454{ 454{
455 /* This has to be done here, before we call Fmake_char_table. */ 455 /* This has to be done here, before we call Fmake_char_table. */
456 Qcategory_table = intern_c_string ("category-table"); 456 DEFSYM (Qcategory_table, "category-table");
457 staticpro (&Qcategory_table);
458 457
459 /* Intern this now in case it isn't already done. 458 /* Intern this now in case it isn't already done.
460 Setting this variable twice is harmless. 459 Setting this variable twice is harmless.
@@ -475,12 +474,9 @@ init_category_once (void)
475void 474void
476syms_of_category (void) 475syms_of_category (void)
477{ 476{
478 Qcategoryp = intern_c_string ("categoryp"); 477 DEFSYM (Qcategoryp, "categoryp");
479 staticpro (&Qcategoryp); 478 DEFSYM (Qcategorysetp, "categorysetp");
480 Qcategorysetp = intern_c_string ("categorysetp"); 479 DEFSYM (Qcategory_table_p, "category-table-p");
481 staticpro (&Qcategorysetp);
482 Qcategory_table_p = intern_c_string ("category-table-p");
483 staticpro (&Qcategory_table_p);
484 480
485 DEFVAR_LISP ("word-combining-categories", Vword_combining_categories, 481 DEFVAR_LISP ("word-combining-categories", Vword_combining_categories,
486 doc: /* List of pair (cons) of categories to determine word boundary. 482 doc: /* List of pair (cons) of categories to determine word boundary.
diff --git a/src/ccl.c b/src/ccl.c
index 30d151f00a0..9cfcbfe8703 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -2305,23 +2305,12 @@ syms_of_ccl (void)
2305 staticpro (&Vccl_program_table); 2305 staticpro (&Vccl_program_table);
2306 Vccl_program_table = Fmake_vector (make_number (32), Qnil); 2306 Vccl_program_table = Fmake_vector (make_number (32), Qnil);
2307 2307
2308 Qccl = intern_c_string ("ccl"); 2308 DEFSYM (Qccl, "ccl");
2309 staticpro (&Qccl); 2309 DEFSYM (Qcclp, "cclp");
2310 2310 DEFSYM (Qccl_program, "ccl-program");
2311 Qcclp = intern_c_string ("cclp"); 2311 DEFSYM (Qccl_program_idx, "ccl-program-idx");
2312 staticpro (&Qcclp); 2312 DEFSYM (Qcode_conversion_map, "code-conversion-map");
2313 2313 DEFSYM (Qcode_conversion_map_id, "code-conversion-map-id");
2314 Qccl_program = intern_c_string ("ccl-program");
2315 staticpro (&Qccl_program);
2316
2317 Qccl_program_idx = intern_c_string ("ccl-program-idx");
2318 staticpro (&Qccl_program_idx);
2319
2320 Qcode_conversion_map = intern_c_string ("code-conversion-map");
2321 staticpro (&Qcode_conversion_map);
2322
2323 Qcode_conversion_map_id = intern_c_string ("code-conversion-map-id");
2324 staticpro (&Qcode_conversion_map_id);
2325 2314
2326 DEFVAR_LISP ("code-conversion-map-vector", Vcode_conversion_map_vector, 2315 DEFVAR_LISP ("code-conversion-map-vector", Vcode_conversion_map_vector,
2327 doc: /* Vector of code conversion maps. */); 2316 doc: /* Vector of code conversion maps. */);
diff --git a/src/character.h b/src/character.h
index 9a45e7f0033..3bc21ac0f2b 100644
--- a/src/character.h
+++ b/src/character.h
@@ -628,7 +628,4 @@ extern Lisp_Object string_escape_byte8 (Lisp_Object);
628#define GET_TRANSLATION_TABLE(id) \ 628#define GET_TRANSLATION_TABLE(id) \
629 (XCDR(XVECTOR(Vtranslation_table_vector)->contents[(id)])) 629 (XCDR(XVECTOR(Vtranslation_table_vector)->contents[(id)]))
630 630
631#define DEFSYM(sym, name) \
632 do { (sym) = intern_c_string ((name)); staticpro (&(sym)); } while (0)
633
634#endif /* EMACS_CHARACTER_H */ 631#endif /* EMACS_CHARACTER_H */
diff --git a/src/cmds.c b/src/cmds.c
index 5dc4d2bfe30..f49cfc221be 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -511,20 +511,11 @@ internal_self_insert (int c, EMACS_INT n)
511void 511void
512syms_of_cmds (void) 512syms_of_cmds (void)
513{ 513{
514 Qkill_backward_chars = intern_c_string ("kill-backward-chars"); 514 DEFSYM (Qkill_backward_chars, "kill-backward-chars");
515 staticpro (&Qkill_backward_chars); 515 DEFSYM (Qkill_forward_chars, "kill-forward-chars");
516 516 DEFSYM (Qoverwrite_mode_binary, "overwrite-mode-binary");
517 Qkill_forward_chars = intern_c_string ("kill-forward-chars"); 517 DEFSYM (Qexpand_abbrev, "expand-abbrev");
518 staticpro (&Qkill_forward_chars); 518 DEFSYM (Qpost_self_insert_hook, "post-self-insert-hook");
519
520 Qoverwrite_mode_binary = intern_c_string ("overwrite-mode-binary");
521 staticpro (&Qoverwrite_mode_binary);
522
523 Qexpand_abbrev = intern_c_string ("expand-abbrev");
524 staticpro (&Qexpand_abbrev);
525
526 Qpost_self_insert_hook = intern_c_string ("post-self-insert-hook");
527 staticpro (&Qpost_self_insert_hook);
528 519
529 DEFVAR_LISP ("post-self-insert-hook", Vpost_self_insert_hook, 520 DEFVAR_LISP ("post-self-insert-hook", Vpost_self_insert_hook,
530 doc: /* Hook run at the end of `self-insert-command'. 521 doc: /* Hook run at the end of `self-insert-command'.
diff --git a/src/composite.c b/src/composite.c
index 796c5a58de6..de9775d18f5 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -1937,8 +1937,7 @@ syms_of_composite (void)
1937{ 1937{
1938 int i; 1938 int i;
1939 1939
1940 Qcomposition = intern_c_string ("composition"); 1940 DEFSYM (Qcomposition, "composition");
1941 staticpro (&Qcomposition);
1942 1941
1943 /* Make a hash table for static composition. */ 1942 /* Make a hash table for static composition. */
1944 { 1943 {
@@ -1997,11 +1996,8 @@ valid.
1997The default value is the function `compose-chars-after'. */); 1996The default value is the function `compose-chars-after'. */);
1998 Vcompose_chars_after_function = intern_c_string ("compose-chars-after"); 1997 Vcompose_chars_after_function = intern_c_string ("compose-chars-after");
1999 1998
2000 Qauto_composed = intern_c_string ("auto-composed"); 1999 DEFSYM (Qauto_composed, "auto-composed");
2001 staticpro (&Qauto_composed); 2000 DEFSYM (Qauto_composition_function, "auto-composition-function");
2002
2003 Qauto_composition_function = intern_c_string ("auto-composition-function");
2004 staticpro (&Qauto_composition_function);
2005 2001
2006 DEFVAR_LISP ("auto-composition-mode", Vauto_composition_mode, 2002 DEFVAR_LISP ("auto-composition-mode", Vauto_composition_mode,
2007 doc: /* Non-nil if Auto-Composition mode is enabled. 2003 doc: /* Non-nil if Auto-Composition mode is enabled.
diff --git a/src/dbusbind.c b/src/dbusbind.c
index 302b93146fd..4828f4e968d 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -2189,142 +2189,76 @@ void
2189syms_of_dbusbind (void) 2189syms_of_dbusbind (void)
2190{ 2190{
2191 2191
2192 Qdbus_init_bus = intern_c_string ("dbus-init-bus"); 2192 DEFSYM (Qdbus_init_bus, "dbus-init-bus");
2193 staticpro (&Qdbus_init_bus);
2194 defsubr (&Sdbus_init_bus); 2193 defsubr (&Sdbus_init_bus);
2195 2194
2196 Qdbus_close_bus = intern_c_string ("dbus-close-bus"); 2195 DEFSYM (Qdbus_close_bus, "dbus-close-bus");
2197 staticpro (&Qdbus_close_bus);
2198 defsubr (&Sdbus_close_bus); 2196 defsubr (&Sdbus_close_bus);
2199 2197
2200 Qdbus_get_unique_name = intern_c_string ("dbus-get-unique-name"); 2198 DEFSYM (Qdbus_get_unique_name, "dbus-get-unique-name");
2201 staticpro (&Qdbus_get_unique_name);
2202 defsubr (&Sdbus_get_unique_name); 2199 defsubr (&Sdbus_get_unique_name);
2203 2200
2204 Qdbus_call_method = intern_c_string ("dbus-call-method"); 2201 DEFSYM (Qdbus_call_method, "dbus-call-method");
2205 staticpro (&Qdbus_call_method);
2206 defsubr (&Sdbus_call_method); 2202 defsubr (&Sdbus_call_method);
2207 2203
2208 Qdbus_call_method_asynchronously 2204 DEFSYM (Qdbus_call_method_asynchronously, "dbus-call-method-asynchronously");
2209 = intern_c_string ("dbus-call-method-asynchronously");
2210 staticpro (&Qdbus_call_method_asynchronously);
2211 defsubr (&Sdbus_call_method_asynchronously); 2205 defsubr (&Sdbus_call_method_asynchronously);
2212 2206
2213 Qdbus_method_return_internal 2207 DEFSYM (Qdbus_method_return_internal, "dbus-method-return-internal");
2214 = intern_c_string ("dbus-method-return-internal");
2215 staticpro (&Qdbus_method_return_internal);
2216 defsubr (&Sdbus_method_return_internal); 2208 defsubr (&Sdbus_method_return_internal);
2217 2209
2218 Qdbus_method_error_internal = intern_c_string ("dbus-method-error-internal"); 2210 DEFSYM (Qdbus_method_error_internal, "dbus-method-error-internal");
2219 staticpro (&Qdbus_method_error_internal);
2220 defsubr (&Sdbus_method_error_internal); 2211 defsubr (&Sdbus_method_error_internal);
2221 2212
2222 Qdbus_send_signal = intern_c_string ("dbus-send-signal"); 2213 DEFSYM (Qdbus_send_signal, "dbus-send-signal");
2223 staticpro (&Qdbus_send_signal);
2224 defsubr (&Sdbus_send_signal); 2214 defsubr (&Sdbus_send_signal);
2225 2215
2226 Qdbus_register_service = intern_c_string ("dbus-register-service"); 2216 DEFSYM (Qdbus_register_service, "dbus-register-service");
2227 staticpro (&Qdbus_register_service);
2228 defsubr (&Sdbus_register_service); 2217 defsubr (&Sdbus_register_service);
2229 2218
2230 Qdbus_register_signal = intern_c_string ("dbus-register-signal"); 2219 DEFSYM (Qdbus_register_signal, "dbus-register-signal");
2231 staticpro (&Qdbus_register_signal);
2232 defsubr (&Sdbus_register_signal); 2220 defsubr (&Sdbus_register_signal);
2233 2221
2234 Qdbus_register_method = intern_c_string ("dbus-register-method"); 2222 DEFSYM (Qdbus_register_method, "dbus-register-method");
2235 staticpro (&Qdbus_register_method);
2236 defsubr (&Sdbus_register_method); 2223 defsubr (&Sdbus_register_method);
2237 2224
2238 Qdbus_error = intern_c_string ("dbus-error"); 2225 DEFSYM (Qdbus_error, "dbus-error");
2239 staticpro (&Qdbus_error);
2240 Fput (Qdbus_error, Qerror_conditions, 2226 Fput (Qdbus_error, Qerror_conditions,
2241 list2 (Qdbus_error, Qerror)); 2227 list2 (Qdbus_error, Qerror));
2242 Fput (Qdbus_error, Qerror_message, 2228 Fput (Qdbus_error, Qerror_message,
2243 make_pure_c_string ("D-Bus error")); 2229 make_pure_c_string ("D-Bus error"));
2244 2230
2245 QCdbus_system_bus = intern_c_string (":system"); 2231 DEFSYM (QCdbus_system_bus, ":system");
2246 staticpro (&QCdbus_system_bus); 2232 DEFSYM (QCdbus_session_bus, ":session");
2247 2233 DEFSYM (QCdbus_request_name_allow_replacement, ":allow-replacement");
2248 QCdbus_session_bus = intern_c_string (":session"); 2234 DEFSYM (QCdbus_request_name_replace_existing, ":replace-existing");
2249 staticpro (&QCdbus_session_bus); 2235 DEFSYM (QCdbus_request_name_do_not_queue, ":do-not-queue");
2250 2236 DEFSYM (QCdbus_request_name_reply_primary_owner, ":primary-owner");
2251 QCdbus_request_name_allow_replacement 2237 DEFSYM (QCdbus_request_name_reply_exists, ":exists");
2252 = intern_c_string (":allow-replacement"); 2238 DEFSYM (QCdbus_request_name_reply_in_queue, ":in-queue");
2253 staticpro (&QCdbus_request_name_allow_replacement); 2239 DEFSYM (QCdbus_request_name_reply_already_owner, ":already-owner");
2254 2240 DEFSYM (QCdbus_timeout, ":timeout");
2255 QCdbus_request_name_replace_existing = intern_c_string (":replace-existing"); 2241 DEFSYM (QCdbus_type_byte, ":byte");
2256 staticpro (&QCdbus_request_name_replace_existing); 2242 DEFSYM (QCdbus_type_boolean, ":boolean");
2257 2243 DEFSYM (QCdbus_type_int16, ":int16");
2258 QCdbus_request_name_do_not_queue = intern_c_string (":do-not-queue"); 2244 DEFSYM (QCdbus_type_uint16, ":uint16");
2259 staticpro (&QCdbus_request_name_do_not_queue); 2245 DEFSYM (QCdbus_type_int32, ":int32");
2260 2246 DEFSYM (QCdbus_type_uint32, ":uint32");
2261 QCdbus_request_name_reply_primary_owner = intern_c_string (":primary-owner"); 2247 DEFSYM (QCdbus_type_int64, ":int64");
2262 staticpro (&QCdbus_request_name_reply_primary_owner); 2248 DEFSYM (QCdbus_type_uint64, ":uint64");
2263 2249 DEFSYM (QCdbus_type_double, ":double");
2264 QCdbus_request_name_reply_exists = intern_c_string (":exists"); 2250 DEFSYM (QCdbus_type_string, ":string");
2265 staticpro (&QCdbus_request_name_reply_exists); 2251 DEFSYM (QCdbus_type_object_path, ":object-path");
2266 2252 DEFSYM (QCdbus_type_signature, ":signature");
2267 QCdbus_request_name_reply_in_queue = intern_c_string (":in-queue");
2268 staticpro (&QCdbus_request_name_reply_in_queue);
2269
2270 QCdbus_request_name_reply_already_owner = intern_c_string (":already-owner");
2271 staticpro (&QCdbus_request_name_reply_already_owner);
2272
2273 QCdbus_timeout = intern_c_string (":timeout");
2274 staticpro (&QCdbus_timeout);
2275
2276 QCdbus_type_byte = intern_c_string (":byte");
2277 staticpro (&QCdbus_type_byte);
2278
2279 QCdbus_type_boolean = intern_c_string (":boolean");
2280 staticpro (&QCdbus_type_boolean);
2281
2282 QCdbus_type_int16 = intern_c_string (":int16");
2283 staticpro (&QCdbus_type_int16);
2284
2285 QCdbus_type_uint16 = intern_c_string (":uint16");
2286 staticpro (&QCdbus_type_uint16);
2287
2288 QCdbus_type_int32 = intern_c_string (":int32");
2289 staticpro (&QCdbus_type_int32);
2290
2291 QCdbus_type_uint32 = intern_c_string (":uint32");
2292 staticpro (&QCdbus_type_uint32);
2293
2294 QCdbus_type_int64 = intern_c_string (":int64");
2295 staticpro (&QCdbus_type_int64);
2296
2297 QCdbus_type_uint64 = intern_c_string (":uint64");
2298 staticpro (&QCdbus_type_uint64);
2299
2300 QCdbus_type_double = intern_c_string (":double");
2301 staticpro (&QCdbus_type_double);
2302
2303 QCdbus_type_string = intern_c_string (":string");
2304 staticpro (&QCdbus_type_string);
2305
2306 QCdbus_type_object_path = intern_c_string (":object-path");
2307 staticpro (&QCdbus_type_object_path);
2308
2309 QCdbus_type_signature = intern_c_string (":signature");
2310 staticpro (&QCdbus_type_signature);
2311 2253
2312#ifdef DBUS_TYPE_UNIX_FD 2254#ifdef DBUS_TYPE_UNIX_FD
2313 QCdbus_type_unix_fd = intern_c_string (":unix-fd"); 2255 DEFSYM (QCdbus_type_unix_fd, ":unix-fd");
2314 staticpro (&QCdbus_type_unix_fd);
2315#endif 2256#endif
2316 2257
2317 QCdbus_type_array = intern_c_string (":array"); 2258 DEFSYM (QCdbus_type_array, ":array");
2318 staticpro (&QCdbus_type_array); 2259 DEFSYM (QCdbus_type_variant, ":variant");
2319 2260 DEFSYM (QCdbus_type_struct, ":struct");
2320 QCdbus_type_variant = intern_c_string (":variant"); 2261 DEFSYM (QCdbus_type_dict_entry, ":dict-entry");
2321 staticpro (&QCdbus_type_variant);
2322
2323 QCdbus_type_struct = intern_c_string (":struct");
2324 staticpro (&QCdbus_type_struct);
2325
2326 QCdbus_type_dict_entry = intern_c_string (":dict-entry");
2327 staticpro (&QCdbus_type_dict_entry);
2328 2262
2329 DEFVAR_LISP ("dbus-registered-buses", 2263 DEFVAR_LISP ("dbus-registered-buses",
2330 Vdbus_registered_buses, 2264 Vdbus_registered_buses,
diff --git a/src/dired.c b/src/dired.c
index 3ab1ba8a900..415f9ac5ae5 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -1017,21 +1017,13 @@ Comparison is in lexicographic order and case is significant. */)
1017void 1017void
1018syms_of_dired (void) 1018syms_of_dired (void)
1019{ 1019{
1020 Qdirectory_files = intern_c_string ("directory-files"); 1020 DEFSYM (Qdirectory_files, "directory-files");
1021 Qdirectory_files_and_attributes = intern_c_string ("directory-files-and-attributes"); 1021 DEFSYM (Qdirectory_files_and_attributes, "directory-files-and-attributes");
1022 Qfile_name_completion = intern_c_string ("file-name-completion"); 1022 DEFSYM (Qfile_name_completion, "file-name-completion");
1023 Qfile_name_all_completions = intern_c_string ("file-name-all-completions"); 1023 DEFSYM (Qfile_name_all_completions, "file-name-all-completions");
1024 Qfile_attributes = intern_c_string ("file-attributes"); 1024 DEFSYM (Qfile_attributes, "file-attributes");
1025 Qfile_attributes_lessp = intern_c_string ("file-attributes-lessp"); 1025 DEFSYM (Qfile_attributes_lessp, "file-attributes-lessp");
1026 Qdefault_directory = intern_c_string ("default-directory"); 1026 DEFSYM (Qdefault_directory, "default-directory");
1027
1028 staticpro (&Qdirectory_files);
1029 staticpro (&Qdirectory_files_and_attributes);
1030 staticpro (&Qfile_name_completion);
1031 staticpro (&Qfile_name_all_completions);
1032 staticpro (&Qfile_attributes);
1033 staticpro (&Qfile_attributes_lessp);
1034 staticpro (&Qdefault_directory);
1035 1027
1036 defsubr (&Sdirectory_files); 1028 defsubr (&Sdirectory_files);
1037 defsubr (&Sdirectory_files_and_attributes); 1029 defsubr (&Sdirectory_files_and_attributes);
diff --git a/src/dispnew.c b/src/dispnew.c
index 52fec0305fb..bde90d847ce 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -4551,6 +4551,7 @@ scrolling_window (struct window *w, int header_line_p)
4551 /* Copy on the display. */ 4551 /* Copy on the display. */
4552 if (r->current_y != r->desired_y) 4552 if (r->current_y != r->desired_y)
4553 { 4553 {
4554 rif->clear_window_mouse_face (w);
4554 rif->scroll_run_hook (w, r); 4555 rif->scroll_run_hook (w, r);
4555 4556
4556 /* Invalidate runs that copy from where we copied to. */ 4557 /* Invalidate runs that copy from where we copied to. */
@@ -6446,10 +6447,8 @@ syms_of_display (void)
6446 frame_and_buffer_state = Fmake_vector (make_number (20), Qlambda); 6447 frame_and_buffer_state = Fmake_vector (make_number (20), Qlambda);
6447 staticpro (&frame_and_buffer_state); 6448 staticpro (&frame_and_buffer_state);
6448 6449
6449 Qdisplay_table = intern_c_string ("display-table"); 6450 DEFSYM (Qdisplay_table, "display-table");
6450 staticpro (&Qdisplay_table); 6451 DEFSYM (Qredisplay_dont_pause, "redisplay-dont-pause");
6451 Qredisplay_dont_pause = intern_c_string ("redisplay-dont-pause");
6452 staticpro (&Qredisplay_dont_pause);
6453 6452
6454 DEFVAR_INT ("baud-rate", baud_rate, 6453 DEFVAR_INT ("baud-rate", baud_rate,
6455 doc: /* *The output baud rate of the terminal. 6454 doc: /* *The output baud rate of the terminal.
diff --git a/src/doc.c b/src/doc.c
index 48e0936510b..69646f5af51 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -945,8 +945,7 @@ a new string, without any text properties, is returned. */)
945void 945void
946syms_of_doc (void) 946syms_of_doc (void)
947{ 947{
948 Qfunction_documentation = intern_c_string ("function-documentation"); 948 DEFSYM (Qfunction_documentation, "function-documentation");
949 staticpro (&Qfunction_documentation);
950 949
951 DEFVAR_LISP ("internal-doc-file-name", Vdoc_file_name, 950 DEFVAR_LISP ("internal-doc-file-name", Vdoc_file_name,
952 doc: /* Name of file containing documentation strings of built-in symbols. */); 951 doc: /* Name of file containing documentation strings of built-in symbols. */);
diff --git a/src/editfns.c b/src/editfns.c
index c0c0e530265..5328b714b0f 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -4738,9 +4738,7 @@ syms_of_editfns (void)
4738 environbuf = 0; 4738 environbuf = 0;
4739 initial_tz = 0; 4739 initial_tz = 0;
4740 4740
4741 Qbuffer_access_fontify_functions 4741 DEFSYM (Qbuffer_access_fontify_functions, "buffer-access-fontify-functions");
4742 = intern_c_string ("buffer-access-fontify-functions");
4743 staticpro (&Qbuffer_access_fontify_functions);
4744 4742
4745 DEFVAR_LISP ("inhibit-field-text-motion", Vinhibit_field_text_motion, 4743 DEFVAR_LISP ("inhibit-field-text-motion", Vinhibit_field_text_motion,
4746 doc: /* Non-nil means text motion commands don't notice fields. */); 4744 doc: /* Non-nil means text motion commands don't notice fields. */);
@@ -4802,10 +4800,8 @@ functions if all the text being accessed has this property. */);
4802 defsubr (&Sregion_beginning); 4800 defsubr (&Sregion_beginning);
4803 defsubr (&Sregion_end); 4801 defsubr (&Sregion_end);
4804 4802
4805 staticpro (&Qfield); 4803 DEFSYM (Qfield, "field");
4806 Qfield = intern_c_string ("field"); 4804 DEFSYM (Qboundary, "boundary");
4807 staticpro (&Qboundary);
4808 Qboundary = intern_c_string ("boundary");
4809 defsubr (&Sfield_beginning); 4805 defsubr (&Sfield_beginning);
4810 defsubr (&Sfield_end); 4806 defsubr (&Sfield_end);
4811 defsubr (&Sfield_string); 4807 defsubr (&Sfield_string);
diff --git a/src/emacs.c b/src/emacs.c
index ba76adf7192..bfefa2bfa51 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -2378,10 +2378,8 @@ from the parent process and its tty file descriptors. */)
2378void 2378void
2379syms_of_emacs (void) 2379syms_of_emacs (void)
2380{ 2380{
2381 Qfile_name_handler_alist = intern_c_string ("file-name-handler-alist"); 2381 DEFSYM (Qfile_name_handler_alist, "file-name-handler-alist");
2382 staticpro (&Qfile_name_handler_alist); 2382 DEFSYM (Qrisky_local_variable, "risky-local-variable");
2383 Qrisky_local_variable = intern_c_string ("risky-local-variable");
2384 staticpro (&Qrisky_local_variable);
2385 2383
2386#ifndef CANNOT_DUMP 2384#ifndef CANNOT_DUMP
2387 defsubr (&Sdump_emacs); 2385 defsubr (&Sdump_emacs);
diff --git a/src/eval.c b/src/eval.c
index be582775fea..6ca8eacb100 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -3694,46 +3694,23 @@ To prevent this happening, set `quit-flag' to nil
3694before making `inhibit-quit' nil. */); 3694before making `inhibit-quit' nil. */);
3695 Vinhibit_quit = Qnil; 3695 Vinhibit_quit = Qnil;
3696 3696
3697 Qinhibit_quit = intern_c_string ("inhibit-quit"); 3697 DEFSYM (Qinhibit_quit, "inhibit-quit");
3698 staticpro (&Qinhibit_quit); 3698 DEFSYM (Qautoload, "autoload");
3699 3699 DEFSYM (Qdebug_on_error, "debug-on-error");
3700 Qautoload = intern_c_string ("autoload"); 3700 DEFSYM (Qmacro, "macro");
3701 staticpro (&Qautoload); 3701 DEFSYM (Qdeclare, "declare");
3702
3703 Qdebug_on_error = intern_c_string ("debug-on-error");
3704 staticpro (&Qdebug_on_error);
3705
3706 Qmacro = intern_c_string ("macro");
3707 staticpro (&Qmacro);
3708
3709 Qdeclare = intern_c_string ("declare");
3710 staticpro (&Qdeclare);
3711 3702
3712 /* Note that the process handling also uses Qexit, but we don't want 3703 /* Note that the process handling also uses Qexit, but we don't want
3713 to staticpro it twice, so we just do it here. */ 3704 to staticpro it twice, so we just do it here. */
3714 Qexit = intern_c_string ("exit"); 3705 DEFSYM (Qexit, "exit");
3715 staticpro (&Qexit);
3716
3717 Qinteractive = intern_c_string ("interactive");
3718 staticpro (&Qinteractive);
3719
3720 Qcommandp = intern_c_string ("commandp");
3721 staticpro (&Qcommandp);
3722
3723 Qdefun = intern_c_string ("defun");
3724 staticpro (&Qdefun);
3725
3726 Qand_rest = intern_c_string ("&rest");
3727 staticpro (&Qand_rest);
3728
3729 Qand_optional = intern_c_string ("&optional");
3730 staticpro (&Qand_optional);
3731
3732 Qclosure = intern_c_string ("closure");
3733 staticpro (&Qclosure);
3734 3706
3735 Qdebug = intern_c_string ("debug"); 3707 DEFSYM (Qinteractive, "interactive");
3736 staticpro (&Qdebug); 3708 DEFSYM (Qcommandp, "commandp");
3709 DEFSYM (Qdefun, "defun");
3710 DEFSYM (Qand_rest, "&rest");
3711 DEFSYM (Qand_optional, "&optional");
3712 DEFSYM (Qclosure, "closure");
3713 DEFSYM (Qdebug, "debug");
3737 3714
3738 DEFVAR_LISP ("debug-on-error", Vdebug_on_error, 3715 DEFVAR_LISP ("debug-on-error", Vdebug_on_error,
3739 doc: /* *Non-nil means enter debugger if an error is signaled. 3716 doc: /* *Non-nil means enter debugger if an error is signaled.
@@ -3807,9 +3784,7 @@ The value the function returns is not used. */);
3807 Every element of this list can be either a cons (VAR . VAL) 3784 Every element of this list can be either a cons (VAR . VAL)
3808 specifying a lexical binding, or a single symbol VAR indicating 3785 specifying a lexical binding, or a single symbol VAR indicating
3809 that this variable should use dynamic scoping. */ 3786 that this variable should use dynamic scoping. */
3810 Qinternal_interpreter_environment 3787 DEFSYM (Qinternal_interpreter_environment, "internal-interpreter-environment");
3811 = intern_c_string ("internal-interpreter-environment");
3812 staticpro (&Qinternal_interpreter_environment);
3813 DEFVAR_LISP ("internal-interpreter-environment", 3788 DEFVAR_LISP ("internal-interpreter-environment",
3814 Vinternal_interpreter_environment, 3789 Vinternal_interpreter_environment,
3815 doc: /* If non-nil, the current lexical environment of the lisp interpreter. 3790 doc: /* If non-nil, the current lexical environment of the lisp interpreter.
@@ -3821,8 +3796,7 @@ alist of active lexical bindings. */);
3821 (Just imagine if someone makes it buffer-local). */ 3796 (Just imagine if someone makes it buffer-local). */
3822 Funintern (Qinternal_interpreter_environment, Qnil); 3797 Funintern (Qinternal_interpreter_environment, Qnil);
3823 3798
3824 Vrun_hooks = intern_c_string ("run-hooks"); 3799 DEFSYM (Vrun_hooks, "run-hooks");
3825 staticpro (&Vrun_hooks);
3826 3800
3827 staticpro (&Vautoload_queue); 3801 staticpro (&Vautoload_queue);
3828 Vautoload_queue = Qnil; 3802 Vautoload_queue = Qnil;
diff --git a/src/fileio.c b/src/fileio.c
index 824df8172e7..27fef42960a 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -5425,92 +5425,50 @@ Fread_file_name (Lisp_Object prompt, Lisp_Object dir, Lisp_Object default_filena
5425void 5425void
5426syms_of_fileio (void) 5426syms_of_fileio (void)
5427{ 5427{
5428 Qoperations = intern_c_string ("operations"); 5428 DEFSYM (Qoperations, "operations");
5429 Qexpand_file_name = intern_c_string ("expand-file-name"); 5429 DEFSYM (Qexpand_file_name, "expand-file-name");
5430 Qsubstitute_in_file_name = intern_c_string ("substitute-in-file-name"); 5430 DEFSYM (Qsubstitute_in_file_name, "substitute-in-file-name");
5431 Qdirectory_file_name = intern_c_string ("directory-file-name"); 5431 DEFSYM (Qdirectory_file_name, "directory-file-name");
5432 Qfile_name_directory = intern_c_string ("file-name-directory"); 5432 DEFSYM (Qfile_name_directory, "file-name-directory");
5433 Qfile_name_nondirectory = intern_c_string ("file-name-nondirectory"); 5433 DEFSYM (Qfile_name_nondirectory, "file-name-nondirectory");
5434 Qunhandled_file_name_directory = intern_c_string ("unhandled-file-name-directory"); 5434 DEFSYM (Qunhandled_file_name_directory, "unhandled-file-name-directory");
5435 Qfile_name_as_directory = intern_c_string ("file-name-as-directory"); 5435 DEFSYM (Qfile_name_as_directory, "file-name-as-directory");
5436 Qcopy_file = intern_c_string ("copy-file"); 5436 DEFSYM (Qcopy_file, "copy-file");
5437 Qmake_directory_internal = intern_c_string ("make-directory-internal"); 5437 DEFSYM (Qmake_directory_internal, "make-directory-internal");
5438 Qmake_directory = intern_c_string ("make-directory"); 5438 DEFSYM (Qmake_directory, "make-directory");
5439 Qdelete_directory_internal = intern_c_string ("delete-directory-internal"); 5439 DEFSYM (Qdelete_directory_internal, "delete-directory-internal");
5440 Qdelete_file = intern_c_string ("delete-file"); 5440 DEFSYM (Qdelete_file, "delete-file");
5441 Qrename_file = intern_c_string ("rename-file"); 5441 DEFSYM (Qrename_file, "rename-file");
5442 Qadd_name_to_file = intern_c_string ("add-name-to-file"); 5442 DEFSYM (Qadd_name_to_file, "add-name-to-file");
5443 Qmake_symbolic_link = intern_c_string ("make-symbolic-link"); 5443 DEFSYM (Qmake_symbolic_link, "make-symbolic-link");
5444 Qfile_exists_p = intern_c_string ("file-exists-p"); 5444 DEFSYM (Qfile_exists_p, "file-exists-p");
5445 Qfile_executable_p = intern_c_string ("file-executable-p"); 5445 DEFSYM (Qfile_executable_p, "file-executable-p");
5446 Qfile_readable_p = intern_c_string ("file-readable-p"); 5446 DEFSYM (Qfile_readable_p, "file-readable-p");
5447 Qfile_writable_p = intern_c_string ("file-writable-p"); 5447 DEFSYM (Qfile_writable_p, "file-writable-p");
5448 Qfile_symlink_p = intern_c_string ("file-symlink-p"); 5448 DEFSYM (Qfile_symlink_p, "file-symlink-p");
5449 Qaccess_file = intern_c_string ("access-file"); 5449 DEFSYM (Qaccess_file, "access-file");
5450 Qfile_directory_p = intern_c_string ("file-directory-p"); 5450 DEFSYM (Qfile_directory_p, "file-directory-p");
5451 Qfile_regular_p = intern_c_string ("file-regular-p"); 5451 DEFSYM (Qfile_regular_p, "file-regular-p");
5452 Qfile_accessible_directory_p = intern_c_string ("file-accessible-directory-p"); 5452 DEFSYM (Qfile_accessible_directory_p, "file-accessible-directory-p");
5453 Qfile_modes = intern_c_string ("file-modes"); 5453 DEFSYM (Qfile_modes, "file-modes");
5454 Qset_file_modes = intern_c_string ("set-file-modes"); 5454 DEFSYM (Qset_file_modes, "set-file-modes");
5455 Qset_file_times = intern_c_string ("set-file-times"); 5455 DEFSYM (Qset_file_times, "set-file-times");
5456 Qfile_selinux_context = intern_c_string("file-selinux-context"); 5456 DEFSYM (Qfile_selinux_context, "file-selinux-context");
5457 Qset_file_selinux_context = intern_c_string("set-file-selinux-context"); 5457 DEFSYM (Qset_file_selinux_context, "set-file-selinux-context");
5458 Qfile_newer_than_file_p = intern_c_string ("file-newer-than-file-p"); 5458 DEFSYM (Qfile_newer_than_file_p, "file-newer-than-file-p");
5459 Qinsert_file_contents = intern_c_string ("insert-file-contents"); 5459 DEFSYM (Qinsert_file_contents, "insert-file-contents");
5460 Qwrite_region = intern_c_string ("write-region"); 5460 DEFSYM (Qwrite_region, "write-region");
5461 Qverify_visited_file_modtime = intern_c_string ("verify-visited-file-modtime"); 5461 DEFSYM (Qverify_visited_file_modtime, "verify-visited-file-modtime");
5462 Qset_visited_file_modtime = intern_c_string ("set-visited-file-modtime"); 5462 DEFSYM (Qset_visited_file_modtime, "set-visited-file-modtime");
5463 Qauto_save_coding = intern_c_string ("auto-save-coding"); 5463 DEFSYM (Qauto_save_coding, "auto-save-coding");
5464 5464
5465 staticpro (&Qoperations); 5465 DEFSYM (Qfile_name_history, "file-name-history");
5466 staticpro (&Qexpand_file_name);
5467 staticpro (&Qsubstitute_in_file_name);
5468 staticpro (&Qdirectory_file_name);
5469 staticpro (&Qfile_name_directory);
5470 staticpro (&Qfile_name_nondirectory);
5471 staticpro (&Qunhandled_file_name_directory);
5472 staticpro (&Qfile_name_as_directory);
5473 staticpro (&Qcopy_file);
5474 staticpro (&Qmake_directory_internal);
5475 staticpro (&Qmake_directory);
5476 staticpro (&Qdelete_directory_internal);
5477 staticpro (&Qdelete_file);
5478 staticpro (&Qrename_file);
5479 staticpro (&Qadd_name_to_file);
5480 staticpro (&Qmake_symbolic_link);
5481 staticpro (&Qfile_exists_p);
5482 staticpro (&Qfile_executable_p);
5483 staticpro (&Qfile_readable_p);
5484 staticpro (&Qfile_writable_p);
5485 staticpro (&Qaccess_file);
5486 staticpro (&Qfile_symlink_p);
5487 staticpro (&Qfile_directory_p);
5488 staticpro (&Qfile_regular_p);
5489 staticpro (&Qfile_accessible_directory_p);
5490 staticpro (&Qfile_modes);
5491 staticpro (&Qset_file_modes);
5492 staticpro (&Qset_file_times);
5493 staticpro (&Qfile_selinux_context);
5494 staticpro (&Qset_file_selinux_context);
5495 staticpro (&Qfile_newer_than_file_p);
5496 staticpro (&Qinsert_file_contents);
5497 staticpro (&Qwrite_region);
5498 staticpro (&Qverify_visited_file_modtime);
5499 staticpro (&Qset_visited_file_modtime);
5500 staticpro (&Qauto_save_coding);
5501
5502 Qfile_name_history = intern_c_string ("file-name-history");
5503 Fset (Qfile_name_history, Qnil); 5466 Fset (Qfile_name_history, Qnil);
5504 staticpro (&Qfile_name_history);
5505 5467
5506 Qfile_error = intern_c_string ("file-error"); 5468 DEFSYM (Qfile_error, "file-error");
5507 staticpro (&Qfile_error); 5469 DEFSYM (Qfile_already_exists, "file-already-exists");
5508 Qfile_already_exists = intern_c_string ("file-already-exists"); 5470 DEFSYM (Qfile_date_error, "file-date-error");
5509 staticpro (&Qfile_already_exists); 5471 DEFSYM (Qexcl, "excl");
5510 Qfile_date_error = intern_c_string ("file-date-error");
5511 staticpro (&Qfile_date_error);
5512 Qexcl = intern_c_string ("excl");
5513 staticpro (&Qexcl);
5514 5472
5515 DEFVAR_LISP ("file-name-coding-system", Vfile_name_coding_system, 5473 DEFVAR_LISP ("file-name-coding-system", Vfile_name_coding_system,
5516 doc: /* *Coding system for encoding file names. 5474 doc: /* *Coding system for encoding file names.
@@ -5528,15 +5486,10 @@ instead use `file-name-coding-system' to get a constant encoding
5528of file names regardless of the current language environment. */); 5486of file names regardless of the current language environment. */);
5529 Vdefault_file_name_coding_system = Qnil; 5487 Vdefault_file_name_coding_system = Qnil;
5530 5488
5531 Qformat_decode = intern_c_string ("format-decode"); 5489 DEFSYM (Qformat_decode, "format-decode");
5532 staticpro (&Qformat_decode); 5490 DEFSYM (Qformat_annotate_function, "format-annotate-function");
5533 Qformat_annotate_function = intern_c_string ("format-annotate-function"); 5491 DEFSYM (Qafter_insert_file_set_coding, "after-insert-file-set-coding");
5534 staticpro (&Qformat_annotate_function); 5492 DEFSYM (Qcar_less_than_car, "car-less-than-car");
5535 Qafter_insert_file_set_coding = intern_c_string ("after-insert-file-set-coding");
5536 staticpro (&Qafter_insert_file_set_coding);
5537
5538 Qcar_less_than_car = intern_c_string ("car-less-than-car");
5539 staticpro (&Qcar_less_than_car);
5540 5493
5541 Fput (Qfile_error, Qerror_conditions, 5494 Fput (Qfile_error, Qerror_conditions,
5542 Fpurecopy (list2 (Qfile_error, Qerror))); 5495 Fpurecopy (list2 (Qfile_error, Qerror)));
@@ -5615,9 +5568,7 @@ After `write-region' completes, Emacs calls the function stored in
5615current when building the annotations (i.e., at least once), with that 5568current when building the annotations (i.e., at least once), with that
5616buffer current. */); 5569buffer current. */);
5617 Vwrite_region_annotate_functions = Qnil; 5570 Vwrite_region_annotate_functions = Qnil;
5618 staticpro (&Qwrite_region_annotate_functions); 5571 DEFSYM (Qwrite_region_annotate_functions, "write-region-annotate-functions");
5619 Qwrite_region_annotate_functions
5620 = intern_c_string ("write-region-annotate-functions");
5621 5572
5622 DEFVAR_LISP ("write-region-post-annotation-function", 5573 DEFVAR_LISP ("write-region-post-annotation-function",
5623 Vwrite_region_post_annotation_function, 5574 Vwrite_region_post_annotation_function,
@@ -5681,12 +5632,10 @@ This includes interactive calls to `delete-file' and
5681`delete-directory' and the Dired deletion commands. */); 5632`delete-directory' and the Dired deletion commands. */);
5682 delete_by_moving_to_trash = 0; 5633 delete_by_moving_to_trash = 0;
5683 Qdelete_by_moving_to_trash = intern_c_string ("delete-by-moving-to-trash"); 5634 Qdelete_by_moving_to_trash = intern_c_string ("delete-by-moving-to-trash");
5684 Qmove_file_to_trash = intern_c_string ("move-file-to-trash"); 5635
5685 staticpro (&Qmove_file_to_trash); 5636 DEFSYM (Qmove_file_to_trash, "move-file-to-trash");
5686 Qcopy_directory = intern_c_string ("copy-directory"); 5637 DEFSYM (Qcopy_directory, "copy-directory");
5687 staticpro (&Qcopy_directory); 5638 DEFSYM (Qdelete_directory, "delete-directory");
5688 Qdelete_directory = intern_c_string ("delete-directory");
5689 staticpro (&Qdelete_directory);
5690 5639
5691 defsubr (&Sfind_file_name_handler); 5640 defsubr (&Sfind_file_name_handler);
5692 defsubr (&Sfile_name_directory); 5641 defsubr (&Sfile_name_directory);
diff --git a/src/fns.c b/src/fns.c
index 5bf274030a3..b6fe2a7f7b6 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -4854,34 +4854,20 @@ syms_of_fns (void)
4854 DEFSYM (Qsha512, "sha512"); 4854 DEFSYM (Qsha512, "sha512");
4855 4855
4856 /* Hash table stuff. */ 4856 /* Hash table stuff. */
4857 Qhash_table_p = intern_c_string ("hash-table-p"); 4857 DEFSYM (Qhash_table_p, "hash-table-p");
4858 staticpro (&Qhash_table_p); 4858 DEFSYM (Qeq, "eq");
4859 Qeq = intern_c_string ("eq"); 4859 DEFSYM (Qeql, "eql");
4860 staticpro (&Qeq); 4860 DEFSYM (Qequal, "equal");
4861 Qeql = intern_c_string ("eql"); 4861 DEFSYM (QCtest, ":test");
4862 staticpro (&Qeql); 4862 DEFSYM (QCsize, ":size");
4863 Qequal = intern_c_string ("equal"); 4863 DEFSYM (QCrehash_size, ":rehash-size");
4864 staticpro (&Qequal); 4864 DEFSYM (QCrehash_threshold, ":rehash-threshold");
4865 QCtest = intern_c_string (":test"); 4865 DEFSYM (QCweakness, ":weakness");
4866 staticpro (&QCtest); 4866 DEFSYM (Qkey, "key");
4867 QCsize = intern_c_string (":size"); 4867 DEFSYM (Qvalue, "value");
4868 staticpro (&QCsize); 4868 DEFSYM (Qhash_table_test, "hash-table-test");
4869 QCrehash_size = intern_c_string (":rehash-size"); 4869 DEFSYM (Qkey_or_value, "key-or-value");
4870 staticpro (&QCrehash_size); 4870 DEFSYM (Qkey_and_value, "key-and-value");
4871 QCrehash_threshold = intern_c_string (":rehash-threshold");
4872 staticpro (&QCrehash_threshold);
4873 QCweakness = intern_c_string (":weakness");
4874 staticpro (&QCweakness);
4875 Qkey = intern_c_string ("key");
4876 staticpro (&Qkey);
4877 Qvalue = intern_c_string ("value");
4878 staticpro (&Qvalue);
4879 Qhash_table_test = intern_c_string ("hash-table-test");
4880 staticpro (&Qhash_table_test);
4881 Qkey_or_value = intern_c_string ("key-or-value");
4882 staticpro (&Qkey_or_value);
4883 Qkey_and_value = intern_c_string ("key-and-value");
4884 staticpro (&Qkey_and_value);
4885 4871
4886 defsubr (&Ssxhash); 4872 defsubr (&Ssxhash);
4887 defsubr (&Smake_hash_table); 4873 defsubr (&Smake_hash_table);
@@ -4900,18 +4886,12 @@ syms_of_fns (void)
4900 defsubr (&Smaphash); 4886 defsubr (&Smaphash);
4901 defsubr (&Sdefine_hash_table_test); 4887 defsubr (&Sdefine_hash_table_test);
4902 4888
4903 Qstring_lessp = intern_c_string ("string-lessp"); 4889 DEFSYM (Qstring_lessp, "string-lessp");
4904 staticpro (&Qstring_lessp); 4890 DEFSYM (Qprovide, "provide");
4905 Qprovide = intern_c_string ("provide"); 4891 DEFSYM (Qrequire, "require");
4906 staticpro (&Qprovide); 4892 DEFSYM (Qyes_or_no_p_history, "yes-or-no-p-history");
4907 Qrequire = intern_c_string ("require"); 4893 DEFSYM (Qcursor_in_echo_area, "cursor-in-echo-area");
4908 staticpro (&Qrequire); 4894 DEFSYM (Qwidget_type, "widget-type");
4909 Qyes_or_no_p_history = intern_c_string ("yes-or-no-p-history");
4910 staticpro (&Qyes_or_no_p_history);
4911 Qcursor_in_echo_area = intern_c_string ("cursor-in-echo-area");
4912 staticpro (&Qcursor_in_echo_area);
4913 Qwidget_type = intern_c_string ("widget-type");
4914 staticpro (&Qwidget_type);
4915 4895
4916 staticpro (&string_char_byte_cache_string); 4896 staticpro (&string_char_byte_cache_string);
4917 string_char_byte_cache_string = Qnil; 4897 string_char_byte_cache_string = Qnil;
@@ -4925,18 +4905,13 @@ syms_of_fns (void)
4925 doc: /* A list of symbols which are the features of the executing Emacs. 4905 doc: /* A list of symbols which are the features of the executing Emacs.
4926Used by `featurep' and `require', and altered by `provide'. */); 4906Used by `featurep' and `require', and altered by `provide'. */);
4927 Vfeatures = Fcons (intern_c_string ("emacs"), Qnil); 4907 Vfeatures = Fcons (intern_c_string ("emacs"), Qnil);
4928 Qsubfeatures = intern_c_string ("subfeatures"); 4908 DEFSYM (Qsubfeatures, "subfeatures");
4929 staticpro (&Qsubfeatures);
4930 4909
4931#ifdef HAVE_LANGINFO_CODESET 4910#ifdef HAVE_LANGINFO_CODESET
4932 Qcodeset = intern_c_string ("codeset"); 4911 DEFSYM (Qcodeset, "codeset");
4933 staticpro (&Qcodeset); 4912 DEFSYM (Qdays, "days");
4934 Qdays = intern_c_string ("days"); 4913 DEFSYM (Qmonths, "months");
4935 staticpro (&Qdays); 4914 DEFSYM (Qpaper, "paper");
4936 Qmonths = intern_c_string ("months");
4937 staticpro (&Qmonths);
4938 Qpaper = intern_c_string ("paper");
4939 staticpro (&Qpaper);
4940#endif /* HAVE_LANGINFO_CODESET */ 4915#endif /* HAVE_LANGINFO_CODESET */
4941 4916
4942 DEFVAR_BOOL ("use-dialog-box", use_dialog_box, 4917 DEFVAR_BOOL ("use-dialog-box", use_dialog_box,
diff --git a/src/frame.c b/src/frame.c
index 27a31fac3e7..635996ca424 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -4240,104 +4240,58 @@ selected frame. This is useful when `make-pointer-invisible' is set. */)
4240void 4240void
4241syms_of_frame (void) 4241syms_of_frame (void)
4242{ 4242{
4243 Qframep = intern_c_string ("framep"); 4243 DEFSYM (Qframep, "framep");
4244 staticpro (&Qframep); 4244 DEFSYM (Qframe_live_p, "frame-live-p");
4245 Qframe_live_p = intern_c_string ("frame-live-p"); 4245 DEFSYM (Qexplicit_name, "explicit-name");
4246 staticpro (&Qframe_live_p); 4246 DEFSYM (Qheight, "height");
4247 Qexplicit_name = intern_c_string ("explicit-name"); 4247 DEFSYM (Qicon, "icon");
4248 staticpro (&Qexplicit_name); 4248 DEFSYM (Qminibuffer, "minibuffer");
4249 Qheight = intern_c_string ("height"); 4249 DEFSYM (Qmodeline, "modeline");
4250 staticpro (&Qheight); 4250 DEFSYM (Qonly, "only");
4251 Qicon = intern_c_string ("icon"); 4251 DEFSYM (Qwidth, "width");
4252 staticpro (&Qicon); 4252 DEFSYM (Qgeometry, "geometry");
4253 Qminibuffer = intern_c_string ("minibuffer"); 4253 DEFSYM (Qicon_left, "icon-left");
4254 staticpro (&Qminibuffer); 4254 DEFSYM (Qicon_top, "icon-top");
4255 Qmodeline = intern_c_string ("modeline"); 4255 DEFSYM (Qtooltip, "tooltip");
4256 staticpro (&Qmodeline); 4256 DEFSYM (Qleft, "left");
4257 Qonly = intern_c_string ("only"); 4257 DEFSYM (Qright, "right");
4258 staticpro (&Qonly); 4258 DEFSYM (Quser_position, "user-position");
4259 Qwidth = intern_c_string ("width"); 4259 DEFSYM (Quser_size, "user-size");
4260 staticpro (&Qwidth); 4260 DEFSYM (Qwindow_id, "window-id");
4261 Qgeometry = intern_c_string ("geometry");
4262 staticpro (&Qgeometry);
4263 Qicon_left = intern_c_string ("icon-left");
4264 staticpro (&Qicon_left);
4265 Qicon_top = intern_c_string ("icon-top");
4266 staticpro (&Qicon_top);
4267 Qtooltip = intern_c_string ("tooltip");
4268 staticpro (&Qtooltip);
4269 Qleft = intern_c_string ("left");
4270 staticpro (&Qleft);
4271 Qright = intern_c_string ("right");
4272 staticpro (&Qright);
4273 Quser_position = intern_c_string ("user-position");
4274 staticpro (&Quser_position);
4275 Quser_size = intern_c_string ("user-size");
4276 staticpro (&Quser_size);
4277 Qwindow_id = intern_c_string ("window-id");
4278 staticpro (&Qwindow_id);
4279#ifdef HAVE_X_WINDOWS 4261#ifdef HAVE_X_WINDOWS
4280 Qouter_window_id = intern_c_string ("outer-window-id"); 4262 DEFSYM (Qouter_window_id, "outer-window-id");
4281 staticpro (&Qouter_window_id);
4282#endif 4263#endif
4283 Qparent_id = intern_c_string ("parent-id"); 4264 DEFSYM (Qparent_id, "parent-id");
4284 staticpro (&Qparent_id); 4265 DEFSYM (Qx, "x");
4285 Qx = intern_c_string ("x"); 4266 DEFSYM (Qw32, "w32");
4286 staticpro (&Qx); 4267 DEFSYM (Qpc, "pc");
4287 Qw32 = intern_c_string ("w32"); 4268 DEFSYM (Qmac, "mac");
4288 staticpro (&Qw32); 4269 DEFSYM (Qns, "ns");
4289 Qpc = intern_c_string ("pc"); 4270 DEFSYM (Qvisible, "visible");
4290 staticpro (&Qpc); 4271 DEFSYM (Qbuffer_predicate, "buffer-predicate");
4291 Qmac = intern_c_string ("mac"); 4272 DEFSYM (Qbuffer_list, "buffer-list");
4292 staticpro (&Qmac); 4273 DEFSYM (Qburied_buffer_list, "buried-buffer-list");
4293 Qns = intern_c_string ("ns"); 4274 DEFSYM (Qdisplay_type, "display-type");
4294 staticpro (&Qns); 4275 DEFSYM (Qbackground_mode, "background-mode");
4295 Qvisible = intern_c_string ("visible"); 4276 DEFSYM (Qnoelisp, "noelisp");
4296 staticpro (&Qvisible); 4277 DEFSYM (Qtty_color_mode, "tty-color-mode");
4297 Qbuffer_predicate = intern_c_string ("buffer-predicate"); 4278 DEFSYM (Qtty, "tty");
4298 staticpro (&Qbuffer_predicate); 4279 DEFSYM (Qtty_type, "tty-type");
4299 Qbuffer_list = intern_c_string ("buffer-list"); 4280
4300 staticpro (&Qbuffer_list); 4281 DEFSYM (Qface_set_after_frame_default, "face-set-after-frame-default");
4301 Qburied_buffer_list = intern_c_string ("buried-buffer-list"); 4282
4302 staticpro (&Qburied_buffer_list); 4283 DEFSYM (Qfullwidth, "fullwidth");
4303 Qdisplay_type = intern_c_string ("display-type"); 4284 DEFSYM (Qfullheight, "fullheight");
4304 staticpro (&Qdisplay_type); 4285 DEFSYM (Qfullboth, "fullboth");
4305 Qbackground_mode = intern_c_string ("background-mode"); 4286 DEFSYM (Qmaximized, "maximized");
4306 staticpro (&Qbackground_mode); 4287 DEFSYM (Qx_resource_name, "x-resource-name");
4307 Qnoelisp = intern_c_string ("noelisp"); 4288 DEFSYM (Qx_frame_parameter, "x-frame-parameter");
4308 staticpro (&Qnoelisp); 4289
4309 Qtty_color_mode = intern_c_string ("tty-color-mode"); 4290 DEFSYM (Qterminal, "terminal");
4310 staticpro (&Qtty_color_mode); 4291 DEFSYM (Qterminal_live_p, "terminal-live-p");
4311 Qtty = intern_c_string ("tty");
4312 staticpro (&Qtty);
4313 Qtty_type = intern_c_string ("tty-type");
4314 staticpro (&Qtty_type);
4315
4316 Qface_set_after_frame_default = intern_c_string ("face-set-after-frame-default");
4317 staticpro (&Qface_set_after_frame_default);
4318
4319 Qfullwidth = intern_c_string ("fullwidth");
4320 staticpro (&Qfullwidth);
4321 Qfullheight = intern_c_string ("fullheight");
4322 staticpro (&Qfullheight);
4323 Qfullboth = intern_c_string ("fullboth");
4324 staticpro (&Qfullboth);
4325 Qmaximized = intern_c_string ("maximized");
4326 staticpro (&Qmaximized);
4327 Qx_resource_name = intern_c_string ("x-resource-name");
4328 staticpro (&Qx_resource_name);
4329
4330 Qx_frame_parameter = intern_c_string ("x-frame-parameter");
4331 staticpro (&Qx_frame_parameter);
4332
4333 Qterminal = intern_c_string ("terminal");
4334 staticpro (&Qterminal);
4335 Qterminal_live_p = intern_c_string ("terminal-live-p");
4336 staticpro (&Qterminal_live_p);
4337 4292
4338#ifdef HAVE_NS 4293#ifdef HAVE_NS
4339 Qns_parse_geometry = intern_c_string ("ns-parse-geometry"); 4294 DEFSYM (Qns_parse_geometry, "ns-parse-geometry");
4340 staticpro (&Qns_parse_geometry);
4341#endif 4295#endif
4342 4296
4343 { 4297 {
@@ -4451,8 +4405,7 @@ actually deleted, or some time later (or even both when an earlier function
4451in `delete-frame-functions' (indirectly) calls `delete-frame' 4405in `delete-frame-functions' (indirectly) calls `delete-frame'
4452recursively). */); 4406recursively). */);
4453 Vdelete_frame_functions = Qnil; 4407 Vdelete_frame_functions = Qnil;
4454 Qdelete_frame_functions = intern_c_string ("delete-frame-functions"); 4408 DEFSYM (Qdelete_frame_functions, "delete-frame-functions");
4455 staticpro (&Qdelete_frame_functions);
4456 4409
4457 DEFVAR_LISP ("menu-bar-mode", Vmenu_bar_mode, 4410 DEFVAR_LISP ("menu-bar-mode", Vmenu_bar_mode,
4458 doc: /* Non-nil if Menu-Bar mode is enabled. 4411 doc: /* Non-nil if Menu-Bar mode is enabled.
diff --git a/src/fringe.c b/src/fringe.c
index d886ac48852..a4dc9433aff 100644
--- a/src/fringe.c
+++ b/src/fringe.c
@@ -1738,18 +1738,12 @@ Return nil if POS is not visible in WINDOW. */)
1738void 1738void
1739syms_of_fringe (void) 1739syms_of_fringe (void)
1740{ 1740{
1741 Qtruncation = intern_c_string ("truncation"); 1741 DEFSYM (Qtruncation, "truncation");
1742 staticpro (&Qtruncation); 1742 DEFSYM (Qcontinuation, "continuation");
1743 Qcontinuation = intern_c_string ("continuation"); 1743 DEFSYM (Qoverlay_arrow, "overlay-arrow");
1744 staticpro (&Qcontinuation); 1744 DEFSYM (Qempty_line, "empty-line");
1745 Qoverlay_arrow = intern_c_string ("overlay-arrow"); 1745 DEFSYM (Qtop_bottom, "top-bottom");
1746 staticpro (&Qoverlay_arrow); 1746 DEFSYM (Qhollow_small, "hollow-small");
1747 Qempty_line = intern_c_string ("empty-line");
1748 staticpro (&Qempty_line);
1749 Qtop_bottom = intern_c_string ("top-bottom");
1750 staticpro (&Qtop_bottom);
1751 Qhollow_small = intern_c_string ("hollow-small");
1752 staticpro (&Qhollow_small);
1753 1747
1754 defsubr (&Sdestroy_fringe_bitmap); 1748 defsubr (&Sdestroy_fringe_bitmap);
1755 defsubr (&Sdefine_fringe_bitmap); 1749 defsubr (&Sdefine_fringe_bitmap);
diff --git a/src/gnutls.c b/src/gnutls.c
index 9342ce7912e..b59d0b265f2 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -1101,72 +1101,36 @@ syms_of_gnutls (void)
1101{ 1101{
1102 gnutls_global_initialized = 0; 1102 gnutls_global_initialized = 0;
1103 1103
1104 Qgnutls_dll = intern_c_string ("gnutls"); 1104 DEFSYM(Qgnutls_dll, "gnutls");
1105 staticpro (&Qgnutls_dll); 1105 DEFSYM(Qgnutls_log_level, "gnutls-log-level");
1106 1106 DEFSYM(Qgnutls_code, "gnutls-code");
1107 Qgnutls_log_level = intern_c_string ("gnutls-log-level"); 1107 DEFSYM(Qgnutls_anon, "gnutls-anon");
1108 staticpro (&Qgnutls_log_level); 1108 DEFSYM(Qgnutls_x509pki, "gnutls-x509pki");
1109 1109 DEFSYM(Qgnutls_bootprop_hostname, ":hostname");
1110 Qgnutls_code = intern_c_string ("gnutls-code"); 1110 DEFSYM(Qgnutls_bootprop_priority, ":priority");
1111 staticpro (&Qgnutls_code); 1111 DEFSYM(Qgnutls_bootprop_trustfiles, ":trustfiles");
1112 1112 DEFSYM(Qgnutls_bootprop_keylist, ":keylist");
1113 Qgnutls_anon = intern_c_string ("gnutls-anon"); 1113 DEFSYM(Qgnutls_bootprop_crlfiles, ":crlfiles");
1114 staticpro (&Qgnutls_anon); 1114 DEFSYM(Qgnutls_bootprop_callbacks, ":callbacks");
1115 1115 DEFSYM(Qgnutls_bootprop_callbacks_verify, "verify");
1116 Qgnutls_x509pki = intern_c_string ("gnutls-x509pki"); 1116 DEFSYM(Qgnutls_bootprop_loglevel, ":loglevel");
1117 staticpro (&Qgnutls_x509pki); 1117 DEFSYM(Qgnutls_bootprop_verify_flags, ":verify-flags");
1118 1118 DEFSYM(Qgnutls_bootprop_verify_hostname_error, ":verify-error");
1119 Qgnutls_bootprop_hostname = intern_c_string (":hostname"); 1119 DEFSYM(Qgnutls_bootprop_verify_hostname_error, ":verify-hostname-error");
1120 staticpro (&Qgnutls_bootprop_hostname); 1120
1121 1121 DEFSYM(Qgnutls_e_interrupted, "gnutls-e-interrupted");
1122 Qgnutls_bootprop_priority = intern_c_string (":priority");
1123 staticpro (&Qgnutls_bootprop_priority);
1124
1125 Qgnutls_bootprop_trustfiles = intern_c_string (":trustfiles");
1126 staticpro (&Qgnutls_bootprop_trustfiles);
1127
1128 Qgnutls_bootprop_keylist = intern_c_string (":keylist");
1129 staticpro (&Qgnutls_bootprop_keylist);
1130
1131 Qgnutls_bootprop_crlfiles = intern_c_string (":crlfiles");
1132 staticpro (&Qgnutls_bootprop_crlfiles);
1133
1134 Qgnutls_bootprop_callbacks = intern_c_string (":callbacks");
1135 staticpro (&Qgnutls_bootprop_callbacks);
1136
1137 Qgnutls_bootprop_callbacks_verify = intern_c_string ("verify");
1138 staticpro (&Qgnutls_bootprop_callbacks_verify);
1139
1140 Qgnutls_bootprop_loglevel = intern_c_string (":loglevel");
1141 staticpro (&Qgnutls_bootprop_loglevel);
1142
1143 Qgnutls_bootprop_verify_flags = intern_c_string (":verify-flags");
1144 staticpro (&Qgnutls_bootprop_verify_flags);
1145
1146 Qgnutls_bootprop_verify_hostname_error = intern_c_string (":verify-error");
1147 staticpro (&Qgnutls_bootprop_verify_error);
1148
1149 Qgnutls_bootprop_verify_hostname_error = intern_c_string (":verify-hostname-error");
1150 staticpro (&Qgnutls_bootprop_verify_hostname_error);
1151
1152 Qgnutls_e_interrupted = intern_c_string ("gnutls-e-interrupted");
1153 staticpro (&Qgnutls_e_interrupted);
1154 Fput (Qgnutls_e_interrupted, Qgnutls_code, 1122 Fput (Qgnutls_e_interrupted, Qgnutls_code,
1155 make_number (GNUTLS_E_INTERRUPTED)); 1123 make_number (GNUTLS_E_INTERRUPTED));
1156 1124
1157 Qgnutls_e_again = intern_c_string ("gnutls-e-again"); 1125 DEFSYM(Qgnutls_e_again, "gnutls-e-again");
1158 staticpro (&Qgnutls_e_again);
1159 Fput (Qgnutls_e_again, Qgnutls_code, 1126 Fput (Qgnutls_e_again, Qgnutls_code,
1160 make_number (GNUTLS_E_AGAIN)); 1127 make_number (GNUTLS_E_AGAIN));
1161 1128
1162 Qgnutls_e_invalid_session = intern_c_string ("gnutls-e-invalid-session"); 1129 DEFSYM(Qgnutls_e_invalid_session, "gnutls-e-invalid-session");
1163 staticpro (&Qgnutls_e_invalid_session);
1164 Fput (Qgnutls_e_invalid_session, Qgnutls_code, 1130 Fput (Qgnutls_e_invalid_session, Qgnutls_code,
1165 make_number (GNUTLS_E_INVALID_SESSION)); 1131 make_number (GNUTLS_E_INVALID_SESSION));
1166 1132
1167 Qgnutls_e_not_ready_for_handshake = 1133 DEFSYM(Qgnutls_e_not_ready_for_handshake, "gnutls-e-not-ready-for-handshake");
1168 intern_c_string ("gnutls-e-not-ready-for-handshake");
1169 staticpro (&Qgnutls_e_not_ready_for_handshake);
1170 Fput (Qgnutls_e_not_ready_for_handshake, Qgnutls_code, 1134 Fput (Qgnutls_e_not_ready_for_handshake, Qgnutls_code,
1171 make_number (GNUTLS_E_APPLICATION_ERROR_MIN)); 1135 make_number (GNUTLS_E_APPLICATION_ERROR_MIN));
1172 1136
diff --git a/src/image.c b/src/image.c
index a9785e5d00f..6e8440fb431 100644
--- a/src/image.c
+++ b/src/image.c
@@ -1836,6 +1836,8 @@ cache_image (struct frame *f, struct image *img)
1836 /* If no free slot found, maybe enlarge c->images. */ 1836 /* If no free slot found, maybe enlarge c->images. */
1837 if (i == c->used && c->used == c->size) 1837 if (i == c->used && c->used == c->size)
1838 { 1838 {
1839 if (min (PTRDIFF_MAX, SIZE_MAX) / sizeof *c->images / 2 < c->size)
1840 memory_full (SIZE_MAX);
1839 c->size *= 2; 1841 c->size *= 2;
1840 c->images = (struct image **) xrealloc (c->images, 1842 c->images = (struct image **) xrealloc (c->images,
1841 c->size * sizeof *c->images); 1843 c->size * sizeof *c->images);
diff --git a/src/insdel.c b/src/insdel.c
index 64fd4797dc0..b6639f3ad8b 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -2222,8 +2222,7 @@ syms_of_insdel (void)
2222This affects `before-change-functions' and `after-change-functions', 2222This affects `before-change-functions' and `after-change-functions',
2223as well as hooks attached to text properties and overlays. */); 2223as well as hooks attached to text properties and overlays. */);
2224 inhibit_modification_hooks = 0; 2224 inhibit_modification_hooks = 0;
2225 Qinhibit_modification_hooks = intern_c_string ("inhibit-modification-hooks"); 2225 DEFSYM (Qinhibit_modification_hooks, "inhibit-modification-hooks");
2226 staticpro (&Qinhibit_modification_hooks);
2227 2226
2228 defsubr (&Scombine_after_change_execute); 2227 defsubr (&Scombine_after_change_execute);
2229} 2228}
diff --git a/src/keyboard.h b/src/keyboard.h
index 20763c35f3a..91008a3ea24 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -123,7 +123,7 @@ struct kboard
123 Lisp_Object *kbd_macro_end; 123 Lisp_Object *kbd_macro_end;
124 124
125 /* Allocated size of kbd_macro_buffer. */ 125 /* Allocated size of kbd_macro_buffer. */
126 int kbd_macro_bufsize; 126 ptrdiff_t kbd_macro_bufsize;
127 127
128 /* Last anonymous kbd macro defined. */ 128 /* Last anonymous kbd macro defined. */
129 Lisp_Object KBOARD_INTERNAL_FIELD (Vlast_kbd_macro); 129 Lisp_Object KBOARD_INTERNAL_FIELD (Vlast_kbd_macro);
diff --git a/src/keymap.c b/src/keymap.c
index 6ef2a716b6d..ac7f651e283 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -3774,15 +3774,13 @@ Return list of symbols found. */)
3774void 3774void
3775syms_of_keymap (void) 3775syms_of_keymap (void)
3776{ 3776{
3777 Qkeymap = intern_c_string ("keymap"); 3777 DEFSYM (Qkeymap, "keymap");
3778 staticpro (&Qkeymap);
3779 staticpro (&apropos_predicate); 3778 staticpro (&apropos_predicate);
3780 staticpro (&apropos_accumulate); 3779 staticpro (&apropos_accumulate);
3781 apropos_predicate = Qnil; 3780 apropos_predicate = Qnil;
3782 apropos_accumulate = Qnil; 3781 apropos_accumulate = Qnil;
3783 3782
3784 Qkeymap_canonicalize = intern_c_string ("keymap-canonicalize"); 3783 DEFSYM (Qkeymap_canonicalize, "keymap-canonicalize");
3785 staticpro (&Qkeymap_canonicalize);
3786 3784
3787 /* Now we are ready to set up this property, so we can 3785 /* Now we are ready to set up this property, so we can
3788 create char tables. */ 3786 create char tables. */
@@ -3902,27 +3900,13 @@ preferred. */);
3902 pure_cons (intern_c_string ("mouse-5"), 3900 pure_cons (intern_c_string ("mouse-5"),
3903 Qnil))))))))); 3901 Qnil)))))))));
3904 3902
3905 3903 DEFSYM (Qsingle_key_description, "single-key-description");
3906 Qsingle_key_description = intern_c_string ("single-key-description"); 3904 DEFSYM (Qkey_description, "key-description");
3907 staticpro (&Qsingle_key_description); 3905 DEFSYM (Qkeymapp, "keymapp");
3908 3906 DEFSYM (Qnon_ascii, "non-ascii");
3909 Qkey_description = intern_c_string ("key-description"); 3907 DEFSYM (Qmenu_item, "menu-item");
3910 staticpro (&Qkey_description); 3908 DEFSYM (Qremap, "remap");
3911 3909 DEFSYM (QCadvertised_binding, ":advertised-binding");
3912 Qkeymapp = intern_c_string ("keymapp");
3913 staticpro (&Qkeymapp);
3914
3915 Qnon_ascii = intern_c_string ("non-ascii");
3916 staticpro (&Qnon_ascii);
3917
3918 Qmenu_item = intern_c_string ("menu-item");
3919 staticpro (&Qmenu_item);
3920
3921 Qremap = intern_c_string ("remap");
3922 staticpro (&Qremap);
3923
3924 QCadvertised_binding = intern_c_string (":advertised-binding");
3925 staticpro (&QCadvertised_binding);
3926 3910
3927 command_remapping_vector = Fmake_vector (make_number (2), Qremap); 3911 command_remapping_vector = Fmake_vector (make_number (2), Qremap);
3928 staticpro (&command_remapping_vector); 3912 staticpro (&command_remapping_vector);
diff --git a/src/lisp.h b/src/lisp.h
index 4c9543bdfe8..762d34abb9c 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -1162,6 +1162,9 @@ struct Lisp_Symbol
1162 1162
1163#define SYMBOL_CONSTANT_P(sym) XSYMBOL (sym)->constant 1163#define SYMBOL_CONSTANT_P(sym) XSYMBOL (sym)->constant
1164 1164
1165#define DEFSYM(sym, name) \
1166 do { (sym) = intern_c_string ((name)); staticpro (&(sym)); } while (0)
1167
1165 1168
1166/*********************************************************************** 1169/***********************************************************************
1167 Hash Tables 1170 Hash Tables
@@ -1980,10 +1983,7 @@ extern void defvar_kboard (struct Lisp_Kboard_Objfwd *, const char *, int);
1980#define DEFVAR_KBOARD(lname, vname, doc) \ 1983#define DEFVAR_KBOARD(lname, vname, doc) \
1981 do { \ 1984 do { \
1982 static struct Lisp_Kboard_Objfwd ko_fwd; \ 1985 static struct Lisp_Kboard_Objfwd ko_fwd; \
1983 defvar_kboard (&ko_fwd, \ 1986 defvar_kboard (&ko_fwd, lname, offsetof (KBOARD, vname ## _)); \
1984 lname, \
1985 (int)((char *)(&current_kboard->vname ## _) \
1986 - (char *)current_kboard)); \
1987 } while (0) 1987 } while (0)
1988 1988
1989 1989
diff --git a/src/lread.c b/src/lread.c
index e75d61ae985..f937fa39f0f 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -120,9 +120,9 @@ static EMACS_INT readchar_count;
120/* This contains the last string skipped with #@. */ 120/* This contains the last string skipped with #@. */
121static char *saved_doc_string; 121static char *saved_doc_string;
122/* Length of buffer allocated in saved_doc_string. */ 122/* Length of buffer allocated in saved_doc_string. */
123static int saved_doc_string_size; 123static ptrdiff_t saved_doc_string_size;
124/* Length of actual data in saved_doc_string. */ 124/* Length of actual data in saved_doc_string. */
125static int saved_doc_string_length; 125static ptrdiff_t saved_doc_string_length;
126/* This is the file position that string came from. */ 126/* This is the file position that string came from. */
127static file_offset saved_doc_string_position; 127static file_offset saved_doc_string_position;
128 128
@@ -131,9 +131,9 @@ static file_offset saved_doc_string_position;
131 is put in saved_doc_string. */ 131 is put in saved_doc_string. */
132static char *prev_saved_doc_string; 132static char *prev_saved_doc_string;
133/* Length of buffer allocated in prev_saved_doc_string. */ 133/* Length of buffer allocated in prev_saved_doc_string. */
134static int prev_saved_doc_string_size; 134static ptrdiff_t prev_saved_doc_string_size;
135/* Length of actual data in prev_saved_doc_string. */ 135/* Length of actual data in prev_saved_doc_string. */
136static int prev_saved_doc_string_length; 136static ptrdiff_t prev_saved_doc_string_length;
137/* This is the file position that string came from. */ 137/* This is the file position that string came from. */
138static file_offset prev_saved_doc_string_position; 138static file_offset prev_saved_doc_string_position;
139 139
@@ -1069,9 +1069,9 @@ Return t if the file exists and loads successfully. */)
1069 1069
1070 /* Avoid weird lossage with null string as arg, 1070 /* Avoid weird lossage with null string as arg,
1071 since it would try to load a directory as a Lisp file */ 1071 since it would try to load a directory as a Lisp file */
1072 if (SCHARS (file) > 0) 1072 if (SBYTES (file) > 0)
1073 { 1073 {
1074 int size = SBYTES (file); 1074 ptrdiff_t size = SBYTES (file);
1075 1075
1076 found = Qnil; 1076 found = Qnil;
1077 GCPRO2 (file, found); 1077 GCPRO2 (file, found);
@@ -1472,7 +1472,7 @@ openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes, Lisp_Object *sto
1472 for (tail = NILP (suffixes) ? Fcons (empty_unibyte_string, Qnil) : suffixes; 1472 for (tail = NILP (suffixes) ? Fcons (empty_unibyte_string, Qnil) : suffixes;
1473 CONSP (tail); tail = XCDR (tail)) 1473 CONSP (tail); tail = XCDR (tail))
1474 { 1474 {
1475 int lsuffix = SBYTES (XCAR (tail)); 1475 ptrdiff_t lsuffix = SBYTES (XCAR (tail));
1476 Lisp_Object handler; 1476 Lisp_Object handler;
1477 int exists; 1477 int exists;
1478 1478
@@ -2037,7 +2037,7 @@ read0 (Lisp_Object readcharfun)
2037 Fmake_string (make_number (1), make_number (c))); 2037 Fmake_string (make_number (1), make_number (c)));
2038} 2038}
2039 2039
2040static int read_buffer_size; 2040static ptrdiff_t read_buffer_size;
2041static char *read_buffer; 2041static char *read_buffer;
2042 2042
2043/* Read a \-escape sequence, assuming we already read the `\'. 2043/* Read a \-escape sequence, assuming we already read the `\'.
@@ -2208,7 +2208,9 @@ read_escape (Lisp_Object readcharfun, int stringp)
2208 UNREAD (c); 2208 UNREAD (c);
2209 break; 2209 break;
2210 } 2210 }
2211 count++; 2211 if (MAX_CHAR < i)
2212 error ("Hex character out of range: \\x%x...", i);
2213 count += count < 3;
2212 } 2214 }
2213 2215
2214 if (count < 3 && i >= 0x80) 2216 if (count < 3 && i >= 0x80)
@@ -2236,10 +2238,7 @@ read_escape (Lisp_Object readcharfun, int stringp)
2236 else if (c >= 'a' && c <= 'f') i = (i << 4) + (c - 'a') + 10; 2238 else if (c >= 'a' && c <= 'f') i = (i << 4) + (c - 'a') + 10;
2237 else if (c >= 'A' && c <= 'F') i = (i << 4) + (c - 'A') + 10; 2239 else if (c >= 'A' && c <= 'F') i = (i << 4) + (c - 'A') + 10;
2238 else 2240 else
2239 { 2241 error ("Non-hex digit used for Unicode escape");
2240 error ("Non-hex digit used for Unicode escape");
2241 break;
2242 }
2243 } 2242 }
2244 if (i > 0x10FFFF) 2243 if (i > 0x10FFFF)
2245 error ("Non-Unicode character: 0x%x", i); 2244 error ("Non-Unicode character: 0x%x", i);
@@ -2278,10 +2277,12 @@ digit_to_number (int character, int base)
2278 range. */ 2277 range. */
2279 2278
2280static Lisp_Object 2279static Lisp_Object
2281read_integer (Lisp_Object readcharfun, int radix) 2280read_integer (Lisp_Object readcharfun, EMACS_INT radix)
2282{ 2281{
2283 /* Room for sign, leading 0, other digits, trailing null byte. */ 2282 /* Room for sign, leading 0, other digits, trailing null byte.
2284 char buf[1 + 1 + sizeof (uintmax_t) * CHAR_BIT + 1]; 2283 Also, room for invalid syntax diagnostic. */
2284 char buf[max (1 + 1 + sizeof (uintmax_t) * CHAR_BIT + 1,
2285 sizeof "integer, radix " + INT_STRLEN_BOUND (EMACS_INT))];
2285 2286
2286 int valid = -1; /* 1 if valid, 0 if not, -1 if incomplete. */ 2287 int valid = -1; /* 1 if valid, 0 if not, -1 if incomplete. */
2287 2288
@@ -2333,7 +2334,7 @@ read_integer (Lisp_Object readcharfun, int radix)
2333 2334
2334 if (! valid) 2335 if (! valid)
2335 { 2336 {
2336 sprintf (buf, "integer, radix %d", radix); 2337 sprintf (buf, "integer, radix %"pI"d", radix);
2337 invalid_syntax (buf); 2338 invalid_syntax (buf);
2338 } 2339 }
2339 2340
@@ -2471,7 +2472,7 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
2471 if (c == '[') 2472 if (c == '[')
2472 { 2473 {
2473 Lisp_Object tmp; 2474 Lisp_Object tmp;
2474 int depth, size; 2475 EMACS_INT depth, size;
2475 2476
2476 tmp = read_vector (readcharfun, 0); 2477 tmp = read_vector (readcharfun, 0);
2477 if (!INTEGERP (AREF (tmp, 0))) 2478 if (!INTEGERP (AREF (tmp, 0)))
@@ -2497,7 +2498,7 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
2497 if (c == '"') 2498 if (c == '"')
2498 { 2499 {
2499 Lisp_Object tmp, val; 2500 Lisp_Object tmp, val;
2500 int size_in_chars 2501 EMACS_INT size_in_chars
2501 = ((XFASTINT (length) + BOOL_VECTOR_BITS_PER_CHAR - 1) 2502 = ((XFASTINT (length) + BOOL_VECTOR_BITS_PER_CHAR - 1)
2502 / BOOL_VECTOR_BITS_PER_CHAR); 2503 / BOOL_VECTOR_BITS_PER_CHAR);
2503 2504
@@ -2569,13 +2570,16 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
2569 and function definitions. */ 2570 and function definitions. */
2570 if (c == '@') 2571 if (c == '@')
2571 { 2572 {
2572 int i, nskip = 0; 2573 enum { extra = 100 };
2574 ptrdiff_t i, nskip = 0;
2573 2575
2574 load_each_byte = 1; 2576 load_each_byte = 1;
2575 /* Read a decimal integer. */ 2577 /* Read a decimal integer. */
2576 while ((c = READCHAR) >= 0 2578 while ((c = READCHAR) >= 0
2577 && c >= '0' && c <= '9') 2579 && c >= '0' && c <= '9')
2578 { 2580 {
2581 if ((STRING_BYTES_BOUND - extra) / 10 <= nskip)
2582 string_overflow ();
2579 nskip *= 10; 2583 nskip *= 10;
2580 nskip += c - '0'; 2584 nskip += c - '0';
2581 } 2585 }
@@ -2594,9 +2598,9 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
2594 with prev_saved_doc_string, so we save two strings. */ 2598 with prev_saved_doc_string, so we save two strings. */
2595 { 2599 {
2596 char *temp = saved_doc_string; 2600 char *temp = saved_doc_string;
2597 int temp_size = saved_doc_string_size; 2601 ptrdiff_t temp_size = saved_doc_string_size;
2598 file_offset temp_pos = saved_doc_string_position; 2602 file_offset temp_pos = saved_doc_string_position;
2599 int temp_len = saved_doc_string_length; 2603 ptrdiff_t temp_len = saved_doc_string_length;
2600 2604
2601 saved_doc_string = prev_saved_doc_string; 2605 saved_doc_string = prev_saved_doc_string;
2602 saved_doc_string_size = prev_saved_doc_string_size; 2606 saved_doc_string_size = prev_saved_doc_string_size;
@@ -2611,12 +2615,12 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
2611 2615
2612 if (saved_doc_string_size == 0) 2616 if (saved_doc_string_size == 0)
2613 { 2617 {
2614 saved_doc_string_size = nskip + 100; 2618 saved_doc_string_size = nskip + extra;
2615 saved_doc_string = (char *) xmalloc (saved_doc_string_size); 2619 saved_doc_string = (char *) xmalloc (saved_doc_string_size);
2616 } 2620 }
2617 if (nskip > saved_doc_string_size) 2621 if (nskip > saved_doc_string_size)
2618 { 2622 {
2619 saved_doc_string_size = nskip + 100; 2623 saved_doc_string_size = nskip + extra;
2620 saved_doc_string = (char *) xrealloc (saved_doc_string, 2624 saved_doc_string = (char *) xrealloc (saved_doc_string,
2621 saved_doc_string_size); 2625 saved_doc_string_size);
2622 } 2626 }
@@ -2661,49 +2665,60 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
2661 /* Reader forms that can reuse previously read objects. */ 2665 /* Reader forms that can reuse previously read objects. */
2662 if (c >= '0' && c <= '9') 2666 if (c >= '0' && c <= '9')
2663 { 2667 {
2664 int n = 0; 2668 EMACS_INT n = 0;
2665 Lisp_Object tem; 2669 Lisp_Object tem;
2666 2670
2667 /* Read a non-negative integer. */ 2671 /* Read a non-negative integer. */
2668 while (c >= '0' && c <= '9') 2672 while (c >= '0' && c <= '9')
2669 { 2673 {
2670 n *= 10; 2674 if (MOST_POSITIVE_FIXNUM / 10 < n
2671 n += c - '0'; 2675 || MOST_POSITIVE_FIXNUM < n * 10 + c - '0')
2676 n = MOST_POSITIVE_FIXNUM + 1;
2677 else
2678 n = n * 10 + c - '0';
2672 c = READCHAR; 2679 c = READCHAR;
2673 } 2680 }
2674 /* #n=object returns object, but associates it with n for #n#. */ 2681
2675 if (c == '=' && !NILP (Vread_circle)) 2682 if (n <= MOST_POSITIVE_FIXNUM)
2676 { 2683 {
2677 /* Make a placeholder for #n# to use temporarily */ 2684 if (c == 'r' || c == 'R')
2678 Lisp_Object placeholder; 2685 return read_integer (readcharfun, n);
2679 Lisp_Object cell;
2680 2686
2681 placeholder = Fcons (Qnil, Qnil); 2687 if (! NILP (Vread_circle))
2682 cell = Fcons (make_number (n), placeholder); 2688 {
2683 read_objects = Fcons (cell, read_objects); 2689 /* #n=object returns object, but associates it with
2690 n for #n#. */
2691 if (c == '=')
2692 {
2693 /* Make a placeholder for #n# to use temporarily */
2694 Lisp_Object placeholder;
2695 Lisp_Object cell;
2684 2696
2685 /* Read the object itself. */ 2697 placeholder = Fcons (Qnil, Qnil);
2686 tem = read0 (readcharfun); 2698 cell = Fcons (make_number (n), placeholder);
2699 read_objects = Fcons (cell, read_objects);
2687 2700
2688 /* Now put it everywhere the placeholder was... */ 2701 /* Read the object itself. */
2689 substitute_object_in_subtree (tem, placeholder); 2702 tem = read0 (readcharfun);
2690 2703
2691 /* ...and #n# will use the real value from now on. */ 2704 /* Now put it everywhere the placeholder was... */
2692 Fsetcdr (cell, tem); 2705 substitute_object_in_subtree (tem, placeholder);
2693 2706
2694 return tem; 2707 /* ...and #n# will use the real value from now on. */
2695 } 2708 Fsetcdr (cell, tem);
2696 /* #n# returns a previously read object. */ 2709
2697 if (c == '#' && !NILP (Vread_circle)) 2710 return tem;
2698 { 2711 }
2699 tem = Fassq (make_number (n), read_objects);
2700 if (CONSP (tem))
2701 return XCDR (tem);
2702 /* Fall through to error message. */
2703 }
2704 else if (c == 'r' || c == 'R')
2705 return read_integer (readcharfun, n);
2706 2712
2713 /* #n# returns a previously read object. */
2714 if (c == '#')
2715 {
2716 tem = Fassq (make_number (n), read_objects);
2717 if (CONSP (tem))
2718 return XCDR (tem);
2719 }
2720 }
2721 }
2707 /* Fall through to error message. */ 2722 /* Fall through to error message. */
2708 } 2723 }
2709 else if (c == 'x' || c == 'X') 2724 else if (c == 'x' || c == 'X')
@@ -2846,14 +2861,16 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
2846 a single-byte character. */ 2861 a single-byte character. */
2847 int force_singlebyte = 0; 2862 int force_singlebyte = 0;
2848 int cancel = 0; 2863 int cancel = 0;
2849 int nchars = 0; 2864 ptrdiff_t nchars = 0;
2850 2865
2851 while ((ch = READCHAR) >= 0 2866 while ((ch = READCHAR) >= 0
2852 && ch != '\"') 2867 && ch != '\"')
2853 { 2868 {
2854 if (end - p < MAX_MULTIBYTE_LENGTH) 2869 if (end - p < MAX_MULTIBYTE_LENGTH)
2855 { 2870 {
2856 int offset = p - read_buffer; 2871 ptrdiff_t offset = p - read_buffer;
2872 if (min (PTRDIFF_MAX, SIZE_MAX) / 2 < read_buffer_size)
2873 memory_full (SIZE_MAX);
2857 read_buffer = (char *) xrealloc (read_buffer, 2874 read_buffer = (char *) xrealloc (read_buffer,
2858 read_buffer_size *= 2); 2875 read_buffer_size *= 2);
2859 p = read_buffer + offset; 2876 p = read_buffer + offset;
@@ -2996,7 +3013,9 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
2996 { 3013 {
2997 if (end - p < MAX_MULTIBYTE_LENGTH) 3014 if (end - p < MAX_MULTIBYTE_LENGTH)
2998 { 3015 {
2999 int offset = p - read_buffer; 3016 ptrdiff_t offset = p - read_buffer;
3017 if (min (PTRDIFF_MAX, SIZE_MAX) / 2 < read_buffer_size)
3018 memory_full (SIZE_MAX);
3000 read_buffer = (char *) xrealloc (read_buffer, 3019 read_buffer = (char *) xrealloc (read_buffer,
3001 read_buffer_size *= 2); 3020 read_buffer_size *= 2);
3002 p = read_buffer + offset; 3021 p = read_buffer + offset;
@@ -3023,7 +3042,9 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
3023 3042
3024 if (p == end) 3043 if (p == end)
3025 { 3044 {
3026 int offset = p - read_buffer; 3045 ptrdiff_t offset = p - read_buffer;
3046 if (min (PTRDIFF_MAX, SIZE_MAX) / 2 < read_buffer_size)
3047 memory_full (SIZE_MAX);
3027 read_buffer = (char *) xrealloc (read_buffer, 3048 read_buffer = (char *) xrealloc (read_buffer,
3028 read_buffer_size *= 2); 3049 read_buffer_size *= 2);
3029 p = read_buffer + offset; 3050 p = read_buffer + offset;
@@ -3135,7 +3156,7 @@ substitute_object_recurse (Lisp_Object object, Lisp_Object placeholder, Lisp_Obj
3135 { 3156 {
3136 case Lisp_Vectorlike: 3157 case Lisp_Vectorlike:
3137 { 3158 {
3138 int i, length = 0; 3159 ptrdiff_t i, length = 0;
3139 if (BOOL_VECTOR_P (subtree)) 3160 if (BOOL_VECTOR_P (subtree))
3140 return subtree; /* No sub-objects anyway. */ 3161 return subtree; /* No sub-objects anyway. */
3141 else if (CHAR_TABLE_P (subtree) || SUB_CHAR_TABLE_P (subtree) 3162 else if (CHAR_TABLE_P (subtree) || SUB_CHAR_TABLE_P (subtree)
@@ -3358,8 +3379,7 @@ string_to_number (char const *string, int base, int ignore_trailing)
3358static Lisp_Object 3379static Lisp_Object
3359read_vector (Lisp_Object readcharfun, int bytecodeflag) 3380read_vector (Lisp_Object readcharfun, int bytecodeflag)
3360{ 3381{
3361 register int i; 3382 ptrdiff_t i, size;
3362 register int size;
3363 register Lisp_Object *ptr; 3383 register Lisp_Object *ptr;
3364 register Lisp_Object tem, item, vector; 3384 register Lisp_Object tem, item, vector;
3365 register struct Lisp_Cons *otem; 3385 register struct Lisp_Cons *otem;
@@ -3528,15 +3548,15 @@ read_list (int flag, register Lisp_Object readcharfun)
3528 doc string, caller must make it 3548 doc string, caller must make it
3529 multibyte. */ 3549 multibyte. */
3530 3550
3531 int pos = XINT (XCDR (val)); 3551 EMACS_INT pos = XINT (XCDR (val));
3532 /* Position is negative for user variables. */ 3552 /* Position is negative for user variables. */
3533 if (pos < 0) pos = -pos; 3553 if (pos < 0) pos = -pos;
3534 if (pos >= saved_doc_string_position 3554 if (pos >= saved_doc_string_position
3535 && pos < (saved_doc_string_position 3555 && pos < (saved_doc_string_position
3536 + saved_doc_string_length)) 3556 + saved_doc_string_length))
3537 { 3557 {
3538 int start = pos - saved_doc_string_position; 3558 ptrdiff_t start = pos - saved_doc_string_position;
3539 int from, to; 3559 ptrdiff_t from, to;
3540 3560
3541 /* Process quoting with ^A, 3561 /* Process quoting with ^A,
3542 and find the end of the string, 3562 and find the end of the string,
@@ -3567,8 +3587,9 @@ read_list (int flag, register Lisp_Object readcharfun)
3567 && pos < (prev_saved_doc_string_position 3587 && pos < (prev_saved_doc_string_position
3568 + prev_saved_doc_string_length)) 3588 + prev_saved_doc_string_length))
3569 { 3589 {
3570 int start = pos - prev_saved_doc_string_position; 3590 ptrdiff_t start =
3571 int from, to; 3591 pos - prev_saved_doc_string_position;
3592 ptrdiff_t from, to;
3572 3593
3573 /* Process quoting with ^A, 3594 /* Process quoting with ^A,
3574 and find the end of the string, 3595 and find the end of the string,
@@ -3891,7 +3912,7 @@ hash_string (const char *ptr, size_t len)
3891void 3912void
3892map_obarray (Lisp_Object obarray, void (*fn) (Lisp_Object, Lisp_Object), Lisp_Object arg) 3913map_obarray (Lisp_Object obarray, void (*fn) (Lisp_Object, Lisp_Object), Lisp_Object arg)
3893{ 3914{
3894 register int i; 3915 ptrdiff_t i;
3895 register Lisp_Object tail; 3916 register Lisp_Object tail;
3896 CHECK_VECTOR (obarray); 3917 CHECK_VECTOR (obarray);
3897 for (i = ASIZE (obarray) - 1; i >= 0; i--) 3918 for (i = ASIZE (obarray) - 1; i >= 0; i--)
@@ -3962,8 +3983,7 @@ init_obarray (void)
3962 /* Qt is correct even if CANNOT_DUMP. loadup.el will set to nil at end. */ 3983 /* Qt is correct even if CANNOT_DUMP. loadup.el will set to nil at end. */
3963 Vpurify_flag = Qt; 3984 Vpurify_flag = Qt;
3964 3985
3965 Qvariable_documentation = intern_c_string ("variable-documentation"); 3986 DEFSYM (Qvariable_documentation, "variable-documentation");
3966 staticpro (&Qvariable_documentation);
3967 3987
3968 read_buffer_size = 100 + MAX_MULTIBYTE_LENGTH; 3988 read_buffer_size = 100 + MAX_MULTIBYTE_LENGTH;
3969 read_buffer = (char *) xmalloc (read_buffer_size); 3989 read_buffer = (char *) xmalloc (read_buffer_size);
@@ -3991,7 +4011,7 @@ defalias (sname, string)
3991#endif /* NOTDEF */ 4011#endif /* NOTDEF */
3992 4012
3993/* Define an "integer variable"; a symbol whose value is forwarded to a 4013/* Define an "integer variable"; a symbol whose value is forwarded to a
3994 C variable of type int. Sample call (munged w "xx" to fool make-docfile): 4014 C variable of type EMACS_INT. Sample call (with "xx" to fool make-docfile):
3995 DEFxxVAR_INT ("emacs-priority", &emacs_priority, "Documentation"); */ 4015 DEFxxVAR_INT ("emacs-priority", &emacs_priority, "Documentation"); */
3996void 4016void
3997defvar_int (struct Lisp_Intfwd *i_fwd, 4017defvar_int (struct Lisp_Intfwd *i_fwd,
@@ -4371,8 +4391,7 @@ customize `jka-compr-load-suffixes' rather than the present variable. */);
4371 4391
4372 DEFVAR_BOOL ("load-in-progress", load_in_progress, 4392 DEFVAR_BOOL ("load-in-progress", load_in_progress,
4373 doc: /* Non-nil if inside of `load'. */); 4393 doc: /* Non-nil if inside of `load'. */);
4374 Qload_in_progress = intern_c_string ("load-in-progress"); 4394 DEFSYM (Qload_in_progress, "load-in-progress");
4375 staticpro (&Qload_in_progress);
4376 4395
4377 DEFVAR_LISP ("after-load-alist", Vafter_load_alist, 4396 DEFVAR_LISP ("after-load-alist", Vafter_load_alist,
4378 doc: /* An alist of expressions to be evalled when particular files are loaded. 4397 doc: /* An alist of expressions to be evalled when particular files are loaded.
@@ -4503,67 +4522,34 @@ This variable is automatically set from the file variables of an interpreted
4503 DEFVAR_LISP ("old-style-backquotes", Vold_style_backquotes, 4522 DEFVAR_LISP ("old-style-backquotes", Vold_style_backquotes,
4504 doc: /* Set to non-nil when `read' encounters an old-style backquote. */); 4523 doc: /* Set to non-nil when `read' encounters an old-style backquote. */);
4505 Vold_style_backquotes = Qnil; 4524 Vold_style_backquotes = Qnil;
4506 Qold_style_backquotes = intern_c_string ("old-style-backquotes"); 4525 DEFSYM (Qold_style_backquotes, "old-style-backquotes");
4507 staticpro (&Qold_style_backquotes);
4508 4526
4509 /* Vsource_directory was initialized in init_lread. */ 4527 /* Vsource_directory was initialized in init_lread. */
4510 4528
4511 load_descriptor_list = Qnil; 4529 load_descriptor_list = Qnil;
4512 staticpro (&load_descriptor_list); 4530 staticpro (&load_descriptor_list);
4513 4531
4514 Qcurrent_load_list = intern_c_string ("current-load-list"); 4532 DEFSYM (Qcurrent_load_list, "current-load-list");
4515 staticpro (&Qcurrent_load_list); 4533 DEFSYM (Qstandard_input, "standard-input");
4516 4534 DEFSYM (Qread_char, "read-char");
4517 Qstandard_input = intern_c_string ("standard-input"); 4535 DEFSYM (Qget_file_char, "get-file-char");
4518 staticpro (&Qstandard_input); 4536 DEFSYM (Qget_emacs_mule_file_char, "get-emacs-mule-file-char");
4519 4537 DEFSYM (Qload_force_doc_strings, "load-force-doc-strings");
4520 Qread_char = intern_c_string ("read-char"); 4538
4521 staticpro (&Qread_char); 4539 DEFSYM (Qbackquote, "`");
4522 4540 DEFSYM (Qcomma, ",");
4523 Qget_file_char = intern_c_string ("get-file-char"); 4541 DEFSYM (Qcomma_at, ",@");
4524 staticpro (&Qget_file_char); 4542 DEFSYM (Qcomma_dot, ",.");
4525 4543
4526 Qget_emacs_mule_file_char = intern_c_string ("get-emacs-mule-file-char"); 4544 DEFSYM (Qinhibit_file_name_operation, "inhibit-file-name-operation");
4527 staticpro (&Qget_emacs_mule_file_char); 4545 DEFSYM (Qascii_character, "ascii-character");
4528 4546 DEFSYM (Qfunction, "function");
4529 Qload_force_doc_strings = intern_c_string ("load-force-doc-strings"); 4547 DEFSYM (Qload, "load");
4530 staticpro (&Qload_force_doc_strings); 4548 DEFSYM (Qload_file_name, "load-file-name");
4531 4549 DEFSYM (Qeval_buffer_list, "eval-buffer-list");
4532 Qbackquote = intern_c_string ("`"); 4550 DEFSYM (Qfile_truename, "file-truename");
4533 staticpro (&Qbackquote); 4551 DEFSYM (Qdir_ok, "dir-ok");
4534 Qcomma = intern_c_string (","); 4552 DEFSYM (Qdo_after_load_evaluation, "do-after-load-evaluation");
4535 staticpro (&Qcomma);
4536 Qcomma_at = intern_c_string (",@");
4537 staticpro (&Qcomma_at);
4538 Qcomma_dot = intern_c_string (",.");
4539 staticpro (&Qcomma_dot);
4540
4541 Qinhibit_file_name_operation = intern_c_string ("inhibit-file-name-operation");
4542 staticpro (&Qinhibit_file_name_operation);
4543
4544 Qascii_character = intern_c_string ("ascii-character");
4545 staticpro (&Qascii_character);
4546
4547 Qfunction = intern_c_string ("function");
4548 staticpro (&Qfunction);
4549
4550 Qload = intern_c_string ("load");
4551 staticpro (&Qload);
4552
4553 Qload_file_name = intern_c_string ("load-file-name");
4554 staticpro (&Qload_file_name);
4555
4556 Qeval_buffer_list = intern_c_string ("eval-buffer-list");
4557 staticpro (&Qeval_buffer_list);
4558
4559 Qfile_truename = intern_c_string ("file-truename");
4560 staticpro (&Qfile_truename) ;
4561
4562 Qdir_ok = intern_c_string ("dir-ok");
4563 staticpro (&Qdir_ok);
4564
4565 Qdo_after_load_evaluation = intern_c_string ("do-after-load-evaluation");
4566 staticpro (&Qdo_after_load_evaluation) ;
4567 4553
4568 staticpro (&dump_path); 4554 staticpro (&dump_path);
4569 4555
@@ -4575,18 +4561,11 @@ This variable is automatically set from the file variables of an interpreted
4575 Vloads_in_progress = Qnil; 4561 Vloads_in_progress = Qnil;
4576 staticpro (&Vloads_in_progress); 4562 staticpro (&Vloads_in_progress);
4577 4563
4578 Qhash_table = intern_c_string ("hash-table"); 4564 DEFSYM (Qhash_table, "hash-table");
4579 staticpro (&Qhash_table); 4565 DEFSYM (Qdata, "data");
4580 Qdata = intern_c_string ("data"); 4566 DEFSYM (Qtest, "test");
4581 staticpro (&Qdata); 4567 DEFSYM (Qsize, "size");
4582 Qtest = intern_c_string ("test"); 4568 DEFSYM (Qweakness, "weakness");
4583 staticpro (&Qtest); 4569 DEFSYM (Qrehash_size, "rehash-size");
4584 Qsize = intern_c_string ("size"); 4570 DEFSYM (Qrehash_threshold, "rehash-threshold");
4585 staticpro (&Qsize);
4586 Qweakness = intern_c_string ("weakness");
4587 staticpro (&Qweakness);
4588 Qrehash_size = intern_c_string ("rehash-size");
4589 staticpro (&Qrehash_size);
4590 Qrehash_threshold = intern_c_string ("rehash-threshold");
4591 staticpro (&Qrehash_threshold);
4592} 4571}
diff --git a/src/macros.c b/src/macros.c
index 3523e513d6a..60f30c3fbbe 100644
--- a/src/macros.c
+++ b/src/macros.c
@@ -71,10 +71,10 @@ macro before appending to it. */)
71 { 71 {
72 if (current_kboard->kbd_macro_bufsize > 200) 72 if (current_kboard->kbd_macro_bufsize > 200)
73 { 73 {
74 current_kboard->kbd_macro_bufsize = 30;
75 current_kboard->kbd_macro_buffer 74 current_kboard->kbd_macro_buffer
76 = (Lisp_Object *)xrealloc (current_kboard->kbd_macro_buffer, 75 = (Lisp_Object *)xrealloc (current_kboard->kbd_macro_buffer,
77 30 * sizeof (Lisp_Object)); 76 30 * sizeof (Lisp_Object));
77 current_kboard->kbd_macro_bufsize = 30;
78 } 78 }
79 current_kboard->kbd_macro_ptr = current_kboard->kbd_macro_buffer; 79 current_kboard->kbd_macro_ptr = current_kboard->kbd_macro_buffer;
80 current_kboard->kbd_macro_end = current_kboard->kbd_macro_buffer; 80 current_kboard->kbd_macro_end = current_kboard->kbd_macro_buffer;
@@ -82,7 +82,8 @@ macro before appending to it. */)
82 } 82 }
83 else 83 else
84 { 84 {
85 int i, len; 85 ptrdiff_t i;
86 EMACS_INT len;
86 int cvt; 87 int cvt;
87 88
88 /* Check the type of last-kbd-macro in case Lisp code changed it. */ 89 /* Check the type of last-kbd-macro in case Lisp code changed it. */
@@ -94,10 +95,13 @@ macro before appending to it. */)
94 has put another macro there. */ 95 has put another macro there. */
95 if (current_kboard->kbd_macro_bufsize < len + 30) 96 if (current_kboard->kbd_macro_bufsize < len + 30)
96 { 97 {
97 current_kboard->kbd_macro_bufsize = len + 30; 98 if (min (PTRDIFF_MAX, SIZE_MAX) / sizeof (Lisp_Object) - 30
99 < current_kboard->kbd_macro_bufsize)
100 memory_full (SIZE_MAX);
98 current_kboard->kbd_macro_buffer 101 current_kboard->kbd_macro_buffer
99 = (Lisp_Object *)xrealloc (current_kboard->kbd_macro_buffer, 102 = (Lisp_Object *)xrealloc (current_kboard->kbd_macro_buffer,
100 (len + 30) * sizeof (Lisp_Object)); 103 (len + 30) * sizeof (Lisp_Object));
104 current_kboard->kbd_macro_bufsize = len + 30;
101 } 105 }
102 106
103 /* Must convert meta modifier when copying string to vector. */ 107 /* Must convert meta modifier when copying string to vector. */
@@ -191,14 +195,17 @@ store_kbd_macro_char (Lisp_Object c)
191 { 195 {
192 if (kb->kbd_macro_ptr - kb->kbd_macro_buffer == kb->kbd_macro_bufsize) 196 if (kb->kbd_macro_ptr - kb->kbd_macro_buffer == kb->kbd_macro_bufsize)
193 { 197 {
194 int ptr_offset, end_offset, nbytes; 198 ptrdiff_t ptr_offset, end_offset, nbytes;
195 199
196 ptr_offset = kb->kbd_macro_ptr - kb->kbd_macro_buffer; 200 ptr_offset = kb->kbd_macro_ptr - kb->kbd_macro_buffer;
197 end_offset = kb->kbd_macro_end - kb->kbd_macro_buffer; 201 end_offset = kb->kbd_macro_end - kb->kbd_macro_buffer;
198 kb->kbd_macro_bufsize *= 2; 202 if (min (PTRDIFF_MAX, SIZE_MAX) / sizeof *kb->kbd_macro_buffer / 2
199 nbytes = kb->kbd_macro_bufsize * sizeof *kb->kbd_macro_buffer; 203 < kb->kbd_macro_bufsize)
204 memory_full (SIZE_MAX);
205 nbytes = kb->kbd_macro_bufsize * 2 * sizeof *kb->kbd_macro_buffer;
200 kb->kbd_macro_buffer 206 kb->kbd_macro_buffer
201 = (Lisp_Object *) xrealloc (kb->kbd_macro_buffer, nbytes); 207 = (Lisp_Object *) xrealloc (kb->kbd_macro_buffer, nbytes);
208 kb->kbd_macro_bufsize *= 2;
202 kb->kbd_macro_ptr = kb->kbd_macro_buffer + ptr_offset; 209 kb->kbd_macro_ptr = kb->kbd_macro_buffer + ptr_offset;
203 kb->kbd_macro_end = kb->kbd_macro_buffer + end_offset; 210 kb->kbd_macro_end = kb->kbd_macro_buffer + end_offset;
204 } 211 }
@@ -360,15 +367,13 @@ init_macros (void)
360void 367void
361syms_of_macros (void) 368syms_of_macros (void)
362{ 369{
363 Qexecute_kbd_macro = intern_c_string ("execute-kbd-macro"); 370 DEFSYM (Qexecute_kbd_macro, "execute-kbd-macro");
364 staticpro (&Qexecute_kbd_macro);
365 371
366 DEFVAR_LISP ("kbd-macro-termination-hook", Vkbd_macro_termination_hook, 372 DEFVAR_LISP ("kbd-macro-termination-hook", Vkbd_macro_termination_hook,
367 doc: /* Normal hook run whenever a keyboard macro terminates. 373 doc: /* Normal hook run whenever a keyboard macro terminates.
368This is run whether the macro ends normally or prematurely due to an error. */); 374This is run whether the macro ends normally or prematurely due to an error. */);
369 Vkbd_macro_termination_hook = Qnil; 375 Vkbd_macro_termination_hook = Qnil;
370 Qkbd_macro_termination_hook = intern_c_string ("kbd-macro-termination-hook"); 376 DEFSYM (Qkbd_macro_termination_hook, "kbd-macro-termination-hook");
371 staticpro (&Qkbd_macro_termination_hook);
372 377
373 defsubr (&Sstart_kbd_macro); 378 defsubr (&Sstart_kbd_macro);
374 defsubr (&Send_kbd_macro); 379 defsubr (&Send_kbd_macro);
diff --git a/src/minibuf.c b/src/minibuf.c
index ca2f22df9ed..cf37c337be4 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -25,7 +25,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
25#include "lisp.h" 25#include "lisp.h"
26#include "commands.h" 26#include "commands.h"
27#include "buffer.h" 27#include "buffer.h"
28#include "character.h"
29#include "dispextern.h" 28#include "dispextern.h"
30#include "keyboard.h" 29#include "keyboard.h"
31#include "frame.h" 30#include "frame.h"
@@ -72,7 +71,6 @@ Lisp_Object Qcompletion_ignore_case;
72static Lisp_Object Qminibuffer_completion_table; 71static Lisp_Object Qminibuffer_completion_table;
73static Lisp_Object Qminibuffer_completion_predicate; 72static Lisp_Object Qminibuffer_completion_predicate;
74static Lisp_Object Qminibuffer_completion_confirm; 73static Lisp_Object Qminibuffer_completion_confirm;
75static Lisp_Object Qcompleting_read_default;
76static Lisp_Object Quser_variable_p; 74static Lisp_Object Quser_variable_p;
77 75
78static Lisp_Object Qminibuffer_default; 76static Lisp_Object Qminibuffer_default;
@@ -237,7 +235,7 @@ read_minibuf_noninteractive (Lisp_Object map, Lisp_Object initial,
237 Lisp_Object defalt, 235 Lisp_Object defalt,
238 int allow_props, int inherit_input_method) 236 int allow_props, int inherit_input_method)
239{ 237{
240 size_t size, len; 238 ptrdiff_t size, len;
241 char *line, *s; 239 char *line, *s;
242 Lisp_Object val; 240 Lisp_Object val;
243 241
@@ -247,12 +245,12 @@ read_minibuf_noninteractive (Lisp_Object map, Lisp_Object initial,
247 val = Qnil; 245 val = Qnil;
248 size = 100; 246 size = 100;
249 len = 0; 247 len = 0;
250 line = (char *) xmalloc (size * sizeof *line); 248 line = (char *) xmalloc (size);
251 while ((s = fgets (line + len, size - len, stdin)) != NULL 249 while ((s = fgets (line + len, size - len, stdin)) != NULL
252 && (len = strlen (line), 250 && (len = strlen (line),
253 len == size - 1 && line[len - 1] != '\n')) 251 len == size - 1 && line[len - 1] != '\n'))
254 { 252 {
255 if ((size_t) -1 / 2 < size) 253 if (STRING_BYTES_BOUND / 2 < size)
256 memory_full (SIZE_MAX); 254 memory_full (SIZE_MAX);
257 size *= 2; 255 size *= 2;
258 line = (char *) xrealloc (line, size); 256 line = (char *) xrealloc (line, size);
@@ -260,11 +258,9 @@ read_minibuf_noninteractive (Lisp_Object map, Lisp_Object initial,
260 258
261 if (s) 259 if (s)
262 { 260 {
263 len = strlen (line); 261 char *nl = strchr (line, '\n');
264 262 if (nl)
265 if (len > 0 && line[len - 1] == '\n') 263 *nl = '\0';
266 line[--len] = '\0';
267
268 val = build_string (line); 264 val = build_string (line);
269 xfree (line); 265 xfree (line);
270 } 266 }
@@ -1694,7 +1690,7 @@ See also `completing-read-function'. */)
1694 (Lisp_Object prompt, Lisp_Object collection, Lisp_Object predicate, Lisp_Object require_match, Lisp_Object initial_input, Lisp_Object hist, Lisp_Object def, Lisp_Object inherit_input_method) 1690 (Lisp_Object prompt, Lisp_Object collection, Lisp_Object predicate, Lisp_Object require_match, Lisp_Object initial_input, Lisp_Object hist, Lisp_Object def, Lisp_Object inherit_input_method)
1695{ 1691{
1696 Lisp_Object args[9]; 1692 Lisp_Object args[9];
1697 args[0] = Vcompleting_read_function; 1693 args[0] = Fsymbol_value (intern ("completing-read-function"));
1698 args[1] = prompt; 1694 args[1] = prompt;
1699 args[2] = collection; 1695 args[2] = collection;
1700 args[3] = predicate; 1696 args[3] = predicate;
@@ -1705,76 +1701,6 @@ See also `completing-read-function'. */)
1705 args[8] = inherit_input_method; 1701 args[8] = inherit_input_method;
1706 return Ffuncall (9, args); 1702 return Ffuncall (9, args);
1707} 1703}
1708
1709DEFUN ("completing-read-default", Fcompleting_read_default, Scompleting_read_default, 2, 8, 0,
1710 doc: /* Default method for reading from the minibuffer with completion.
1711See `completing-read' for the meaning of the arguments. */)
1712 (Lisp_Object prompt, Lisp_Object collection, Lisp_Object predicate, Lisp_Object require_match, Lisp_Object initial_input, Lisp_Object hist, Lisp_Object def, Lisp_Object inherit_input_method)
1713{
1714 Lisp_Object val, histvar, histpos, position;
1715 Lisp_Object init;
1716 int pos = 0;
1717 int count = SPECPDL_INDEX ();
1718 struct gcpro gcpro1;
1719
1720 init = initial_input;
1721 GCPRO1 (def);
1722
1723 specbind (Qminibuffer_completion_table, collection);
1724 specbind (Qminibuffer_completion_predicate, predicate);
1725 specbind (Qminibuffer_completion_confirm,
1726 EQ (require_match, Qt) ? Qnil : require_match);
1727
1728 position = Qnil;
1729 if (!NILP (init))
1730 {
1731 if (CONSP (init))
1732 {
1733 position = Fcdr (init);
1734 init = Fcar (init);
1735 }
1736 CHECK_STRING (init);
1737 if (!NILP (position))
1738 {
1739 CHECK_NUMBER (position);
1740 /* Convert to distance from end of input. */
1741 pos = XINT (position) - SCHARS (init);
1742 }
1743 }
1744
1745 if (SYMBOLP (hist))
1746 {
1747 histvar = hist;
1748 histpos = Qnil;
1749 }
1750 else
1751 {
1752 histvar = Fcar_safe (hist);
1753 histpos = Fcdr_safe (hist);
1754 }
1755 if (NILP (histvar))
1756 histvar = Qminibuffer_history;
1757 if (NILP (histpos))
1758 XSETFASTINT (histpos, 0);
1759
1760 val = read_minibuf (NILP (require_match)
1761 ? (NILP (Vminibuffer_completing_file_name)
1762 || EQ (Vminibuffer_completing_file_name, Qlambda)
1763 ? Vminibuffer_local_completion_map
1764 : Vminibuffer_local_filename_completion_map)
1765 : (NILP (Vminibuffer_completing_file_name)
1766 || EQ (Vminibuffer_completing_file_name, Qlambda)
1767 ? Vminibuffer_local_must_match_map
1768 : Vminibuffer_local_filename_must_match_map),
1769 init, prompt, make_number (pos), 0,
1770 histvar, histpos, def, 0,
1771 !NILP (inherit_input_method));
1772
1773 if (STRINGP (val) && SCHARS (val) == 0 && ! NILP (def))
1774 val = CONSP (def) ? XCAR (def) : def;
1775
1776 RETURN_UNGCPRO (unbind_to (count, val));
1777}
1778 1704
1779Lisp_Object Fassoc_string (register Lisp_Object key, Lisp_Object list, Lisp_Object case_fold); 1705Lisp_Object Fassoc_string (register Lisp_Object key, Lisp_Object list, Lisp_Object case_fold);
1780 1706
@@ -2013,7 +1939,6 @@ syms_of_minibuf (void)
2013 minibuf_save_list = Qnil; 1939 minibuf_save_list = Qnil;
2014 staticpro (&minibuf_save_list); 1940 staticpro (&minibuf_save_list);
2015 1941
2016 DEFSYM (Qcompleting_read_default, "completing-read-default");
2017 DEFSYM (Qcompletion_ignore_case, "completion-ignore-case"); 1942 DEFSYM (Qcompletion_ignore_case, "completion-ignore-case");
2018 DEFSYM (Qread_file_name_internal, "read-file-name-internal"); 1943 DEFSYM (Qread_file_name_internal, "read-file-name-internal");
2019 DEFSYM (Qminibuffer_default, "minibuffer-default"); 1944 DEFSYM (Qminibuffer_default, "minibuffer-default");
@@ -2132,12 +2057,6 @@ If the value is `confirm-after-completion', the user may exit with an
2132 doc: /* Non-nil means completing file names. */); 2057 doc: /* Non-nil means completing file names. */);
2133 Vminibuffer_completing_file_name = Qnil; 2058 Vminibuffer_completing_file_name = Qnil;
2134 2059
2135 DEFVAR_LISP ("completing-read-function",
2136 Vcompleting_read_function,
2137 doc: /* The function called by `completing-read' to do the work.
2138It should accept the same arguments as `completing-read'. */);
2139 Vcompleting_read_function = Qcompleting_read_default;
2140
2141 DEFVAR_LISP ("minibuffer-help-form", Vminibuffer_help_form, 2060 DEFVAR_LISP ("minibuffer-help-form", Vminibuffer_help_form,
2142 doc: /* Value that `help-form' takes on inside the minibuffer. */); 2061 doc: /* Value that `help-form' takes on inside the minibuffer. */);
2143 Vminibuffer_help_form = Qnil; 2062 Vminibuffer_help_form = Qnil;
@@ -2214,5 +2133,4 @@ properties. */);
2214 defsubr (&Stest_completion); 2133 defsubr (&Stest_completion);
2215 defsubr (&Sassoc_string); 2134 defsubr (&Sassoc_string);
2216 defsubr (&Scompleting_read); 2135 defsubr (&Scompleting_read);
2217 defsubr (&Scompleting_read_default);
2218} 2136}
diff --git a/src/msdos.c b/src/msdos.c
index 73804df55cc..3f12bc85cbe 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -4267,8 +4267,7 @@ syms_of_msdos (void)
4267#ifndef HAVE_X_WINDOWS 4267#ifndef HAVE_X_WINDOWS
4268 4268
4269 /* The following two are from xfns.c: */ 4269 /* The following two are from xfns.c: */
4270 Qreverse = intern_c_string ("reverse"); 4270 DEFSYM (Qreverse, "reverse");
4271 staticpro (&Qreverse);
4272 4271
4273 DEFVAR_LISP ("dos-unsupported-char-glyph", Vdos_unsupported_char_glyph, 4272 DEFVAR_LISP ("dos-unsupported-char-glyph", Vdos_unsupported_char_glyph,
4274 doc: /* *Glyph to display instead of chars not supported by current codepage. 4273 doc: /* *Glyph to display instead of chars not supported by current codepage.
diff --git a/src/print.c b/src/print.c
index d07f89702cc..14b4326bb6f 100644
--- a/src/print.c
+++ b/src/print.c
@@ -159,8 +159,9 @@ int print_output_debug_flag EXTERNALLY_VISIBLE = 1;
159 } \ 159 } \
160 else \ 160 else \
161 { \ 161 { \
162 print_buffer_size = 1000; \ 162 ptrdiff_t new_size = 1000; \
163 print_buffer = (char *) xmalloc (print_buffer_size); \ 163 print_buffer = (char *) xmalloc (new_size); \
164 print_buffer_size = new_size; \
164 free_print_buffer = 1; \ 165 free_print_buffer = 1; \
165 } \ 166 } \
166 print_buffer_pos = 0; \ 167 print_buffer_pos = 0; \
@@ -235,9 +236,15 @@ printchar (unsigned int ch, Lisp_Object fun)
235 236
236 if (NILP (fun)) 237 if (NILP (fun))
237 { 238 {
238 if (print_buffer_pos_byte + len >= print_buffer_size) 239 if (print_buffer_size - len <= print_buffer_pos_byte)
239 print_buffer = (char *) xrealloc (print_buffer, 240 {
240 print_buffer_size *= 2); 241 ptrdiff_t new_size;
242 if (STRING_BYTES_BOUND / 2 < print_buffer_size)
243 string_overflow ();
244 new_size = print_buffer_size * 2;
245 print_buffer = (char *) xrealloc (print_buffer, new_size);
246 print_buffer_size = new_size;
247 }
241 memcpy (print_buffer + print_buffer_pos_byte, str, len); 248 memcpy (print_buffer + print_buffer_pos_byte, str, len);
242 print_buffer_pos += 1; 249 print_buffer_pos += 1;
243 print_buffer_pos_byte += len; 250 print_buffer_pos_byte += len;
@@ -280,11 +287,14 @@ strout (const char *ptr, EMACS_INT size, EMACS_INT size_byte,
280 287
281 if (NILP (printcharfun)) 288 if (NILP (printcharfun))
282 { 289 {
283 if (print_buffer_pos_byte + size_byte > print_buffer_size) 290 if (print_buffer_size - size_byte < print_buffer_pos_byte)
284 { 291 {
285 print_buffer_size = print_buffer_size * 2 + size_byte; 292 ptrdiff_t new_size;
286 print_buffer = (char *) xrealloc (print_buffer, 293 if (STRING_BYTES_BOUND / 2 - size_byte < print_buffer_size)
287 print_buffer_size); 294 string_overflow ();
295 new_size = print_buffer_size * 2 + size_byte;
296 print_buffer = (char *) xrealloc (print_buffer, new_size);
297 print_buffer_size = new_size;
288 } 298 }
289 memcpy (print_buffer + print_buffer_pos_byte, ptr, size_byte); 299 memcpy (print_buffer + print_buffer_pos_byte, ptr, size_byte);
290 print_buffer_pos += size; 300 print_buffer_pos += size;
@@ -2059,8 +2069,7 @@ print_interval (INTERVAL interval, Lisp_Object printcharfun)
2059void 2069void
2060syms_of_print (void) 2070syms_of_print (void)
2061{ 2071{
2062 Qtemp_buffer_setup_hook = intern_c_string ("temp-buffer-setup-hook"); 2072 DEFSYM (Qtemp_buffer_setup_hook, "temp-buffer-setup-hook");
2063 staticpro (&Qtemp_buffer_setup_hook);
2064 2073
2065 DEFVAR_LISP ("standard-output", Vstandard_output, 2074 DEFVAR_LISP ("standard-output", Vstandard_output,
2066 doc: /* Output stream `print' uses by default for outputting a character. 2075 doc: /* Output stream `print' uses by default for outputting a character.
@@ -2069,8 +2078,7 @@ It may also be a buffer (output is inserted before point)
2069or a marker (output is inserted and the marker is advanced) 2078or a marker (output is inserted and the marker is advanced)
2070or the symbol t (output appears in the echo area). */); 2079or the symbol t (output appears in the echo area). */);
2071 Vstandard_output = Qt; 2080 Vstandard_output = Qt;
2072 Qstandard_output = intern_c_string ("standard-output"); 2081 DEFSYM (Qstandard_output, "standard-output");
2073 staticpro (&Qstandard_output);
2074 2082
2075 DEFVAR_LISP ("float-output-format", Vfloat_output_format, 2083 DEFVAR_LISP ("float-output-format", Vfloat_output_format,
2076 doc: /* The format descriptor string used to print floats. 2084 doc: /* The format descriptor string used to print floats.
@@ -2089,8 +2097,7 @@ decimal point. 0 is not allowed with `e' or `g'.
2089A value of nil means to use the shortest notation 2097A value of nil means to use the shortest notation
2090that represents the number without losing information. */); 2098that represents the number without losing information. */);
2091 Vfloat_output_format = Qnil; 2099 Vfloat_output_format = Qnil;
2092 Qfloat_output_format = intern_c_string ("float-output-format"); 2100 DEFSYM (Qfloat_output_format, "float-output-format");
2093 staticpro (&Qfloat_output_format);
2094 2101
2095 DEFVAR_LISP ("print-length", Vprint_length, 2102 DEFVAR_LISP ("print-length", Vprint_length,
2096 doc: /* Maximum length of list to print before abbreviating. 2103 doc: /* Maximum length of list to print before abbreviating.
@@ -2195,17 +2202,10 @@ priorities. */);
2195 defsubr (&Sredirect_debugging_output); 2202 defsubr (&Sredirect_debugging_output);
2196#endif 2203#endif
2197 2204
2198 Qexternal_debugging_output = intern_c_string ("external-debugging-output"); 2205 DEFSYM (Qexternal_debugging_output, "external-debugging-output");
2199 staticpro (&Qexternal_debugging_output); 2206 DEFSYM (Qprint_escape_newlines, "print-escape-newlines");
2200 2207 DEFSYM (Qprint_escape_multibyte, "print-escape-multibyte");
2201 Qprint_escape_newlines = intern_c_string ("print-escape-newlines"); 2208 DEFSYM (Qprint_escape_nonascii, "print-escape-nonascii");
2202 staticpro (&Qprint_escape_newlines);
2203
2204 Qprint_escape_multibyte = intern_c_string ("print-escape-multibyte");
2205 staticpro (&Qprint_escape_multibyte);
2206
2207 Qprint_escape_nonascii = intern_c_string ("print-escape-nonascii");
2208 staticpro (&Qprint_escape_nonascii);
2209 2209
2210 print_prune_charset_plist = Qnil; 2210 print_prune_charset_plist = Qnil;
2211 staticpro (&print_prune_charset_plist); 2211 staticpro (&print_prune_charset_plist);
diff --git a/src/process.c b/src/process.c
index 0040d14a0f6..c46437fe8cb 100644
--- a/src/process.c
+++ b/src/process.c
@@ -7236,14 +7236,10 @@ syms_of_process (void)
7236{ 7236{
7237#ifdef subprocesses 7237#ifdef subprocesses
7238 7238
7239 Qprocessp = intern_c_string ("processp"); 7239 DEFSYM (Qprocessp, "processp");
7240 staticpro (&Qprocessp); 7240 DEFSYM (Qrun, "run");
7241 Qrun = intern_c_string ("run"); 7241 DEFSYM (Qstop, "stop");
7242 staticpro (&Qrun); 7242 DEFSYM (Qsignal, "signal");
7243 Qstop = intern_c_string ("stop");
7244 staticpro (&Qstop);
7245 Qsignal = intern_c_string ("signal");
7246 staticpro (&Qsignal);
7247 7243
7248 /* Qexit is already staticpro'd by syms_of_eval; don't staticpro it 7244 /* Qexit is already staticpro'd by syms_of_eval; don't staticpro it
7249 here again. 7245 here again.
@@ -7251,92 +7247,52 @@ syms_of_process (void)
7251 Qexit = intern_c_string ("exit"); 7247 Qexit = intern_c_string ("exit");
7252 staticpro (&Qexit); */ 7248 staticpro (&Qexit); */
7253 7249
7254 Qopen = intern_c_string ("open"); 7250 DEFSYM (Qopen, "open");
7255 staticpro (&Qopen); 7251 DEFSYM (Qclosed, "closed");
7256 Qclosed = intern_c_string ("closed"); 7252 DEFSYM (Qconnect, "connect");
7257 staticpro (&Qclosed); 7253 DEFSYM (Qfailed, "failed");
7258 Qconnect = intern_c_string ("connect"); 7254 DEFSYM (Qlisten, "listen");
7259 staticpro (&Qconnect); 7255 DEFSYM (Qlocal, "local");
7260 Qfailed = intern_c_string ("failed"); 7256 DEFSYM (Qipv4, "ipv4");
7261 staticpro (&Qfailed);
7262 Qlisten = intern_c_string ("listen");
7263 staticpro (&Qlisten);
7264 Qlocal = intern_c_string ("local");
7265 staticpro (&Qlocal);
7266 Qipv4 = intern_c_string ("ipv4");
7267 staticpro (&Qipv4);
7268#ifdef AF_INET6 7257#ifdef AF_INET6
7269 Qipv6 = intern_c_string ("ipv6"); 7258 DEFSYM (Qipv6, "ipv6");
7270 staticpro (&Qipv6); 7259#endif
7271#endif 7260 DEFSYM (Qdatagram, "datagram");
7272 Qdatagram = intern_c_string ("datagram"); 7261 DEFSYM (Qseqpacket, "seqpacket");
7273 staticpro (&Qdatagram); 7262
7274 Qseqpacket = intern_c_string ("seqpacket"); 7263 DEFSYM (QCport, ":port");
7275 staticpro (&Qseqpacket); 7264 DEFSYM (QCspeed, ":speed");
7276 7265 DEFSYM (QCprocess, ":process");
7277 QCport = intern_c_string (":port"); 7266
7278 staticpro (&QCport); 7267 DEFSYM (QCbytesize, ":bytesize");
7279 QCspeed = intern_c_string (":speed"); 7268 DEFSYM (QCstopbits, ":stopbits");
7280 staticpro (&QCspeed); 7269 DEFSYM (QCparity, ":parity");
7281 QCprocess = intern_c_string (":process"); 7270 DEFSYM (Qodd, "odd");
7282 staticpro (&QCprocess); 7271 DEFSYM (Qeven, "even");
7283 7272 DEFSYM (QCflowcontrol, ":flowcontrol");
7284 QCbytesize = intern_c_string (":bytesize"); 7273 DEFSYM (Qhw, "hw");
7285 staticpro (&QCbytesize); 7274 DEFSYM (Qsw, "sw");
7286 QCstopbits = intern_c_string (":stopbits"); 7275 DEFSYM (QCsummary, ":summary");
7287 staticpro (&QCstopbits); 7276
7288 QCparity = intern_c_string (":parity"); 7277 DEFSYM (Qreal, "real");
7289 staticpro (&QCparity); 7278 DEFSYM (Qnetwork, "network");
7290 Qodd = intern_c_string ("odd"); 7279 DEFSYM (Qserial, "serial");
7291 staticpro (&Qodd); 7280 DEFSYM (QCbuffer, ":buffer");
7292 Qeven = intern_c_string ("even"); 7281 DEFSYM (QChost, ":host");
7293 staticpro (&Qeven); 7282 DEFSYM (QCservice, ":service");
7294 QCflowcontrol = intern_c_string (":flowcontrol"); 7283 DEFSYM (QClocal, ":local");
7295 staticpro (&QCflowcontrol); 7284 DEFSYM (QCremote, ":remote");
7296 Qhw = intern_c_string ("hw"); 7285 DEFSYM (QCcoding, ":coding");
7297 staticpro (&Qhw); 7286 DEFSYM (QCserver, ":server");
7298 Qsw = intern_c_string ("sw"); 7287 DEFSYM (QCnowait, ":nowait");
7299 staticpro (&Qsw); 7288 DEFSYM (QCsentinel, ":sentinel");
7300 QCsummary = intern_c_string (":summary"); 7289 DEFSYM (QClog, ":log");
7301 staticpro (&QCsummary); 7290 DEFSYM (QCnoquery, ":noquery");
7302 7291 DEFSYM (QCstop, ":stop");
7303 Qreal = intern_c_string ("real"); 7292 DEFSYM (QCoptions, ":options");
7304 staticpro (&Qreal); 7293 DEFSYM (QCplist, ":plist");
7305 Qnetwork = intern_c_string ("network"); 7294
7306 staticpro (&Qnetwork); 7295 DEFSYM (Qlast_nonmenu_event, "last-nonmenu-event");
7307 Qserial = intern_c_string ("serial");
7308 staticpro (&Qserial);
7309 QCbuffer = intern_c_string (":buffer");
7310 staticpro (&QCbuffer);
7311 QChost = intern_c_string (":host");
7312 staticpro (&QChost);
7313 QCservice = intern_c_string (":service");
7314 staticpro (&QCservice);
7315 QClocal = intern_c_string (":local");
7316 staticpro (&QClocal);
7317 QCremote = intern_c_string (":remote");
7318 staticpro (&QCremote);
7319 QCcoding = intern_c_string (":coding");
7320 staticpro (&QCcoding);
7321 QCserver = intern_c_string (":server");
7322 staticpro (&QCserver);
7323 QCnowait = intern_c_string (":nowait");
7324 staticpro (&QCnowait);
7325 QCsentinel = intern_c_string (":sentinel");
7326 staticpro (&QCsentinel);
7327 QClog = intern_c_string (":log");
7328 staticpro (&QClog);
7329 QCnoquery = intern_c_string (":noquery");
7330 staticpro (&QCnoquery);
7331 QCstop = intern_c_string (":stop");
7332 staticpro (&QCstop);
7333 QCoptions = intern_c_string (":options");
7334 staticpro (&QCoptions);
7335 QCplist = intern_c_string (":plist");
7336 staticpro (&QCplist);
7337
7338 Qlast_nonmenu_event = intern_c_string ("last-nonmenu-event");
7339 staticpro (&Qlast_nonmenu_event);
7340 7296
7341 staticpro (&Vprocess_alist); 7297 staticpro (&Vprocess_alist);
7342#ifdef SIGCHLD 7298#ifdef SIGCHLD
@@ -7345,73 +7301,40 @@ syms_of_process (void)
7345 7301
7346#endif /* subprocesses */ 7302#endif /* subprocesses */
7347 7303
7348 QCname = intern_c_string (":name"); 7304 DEFSYM (QCname, ":name");
7349 staticpro (&QCname); 7305 DEFSYM (QCtype, ":type");
7350 QCtype = intern_c_string (":type"); 7306
7351 staticpro (&QCtype); 7307 DEFSYM (Qeuid, "euid");
7352 7308 DEFSYM (Qegid, "egid");
7353 Qeuid = intern_c_string ("euid"); 7309 DEFSYM (Quser, "user");
7354 staticpro (&Qeuid); 7310 DEFSYM (Qgroup, "group");
7355 Qegid = intern_c_string ("egid"); 7311 DEFSYM (Qcomm, "comm");
7356 staticpro (&Qegid); 7312 DEFSYM (Qstate, "state");
7357 Quser = intern_c_string ("user"); 7313 DEFSYM (Qppid, "ppid");
7358 staticpro (&Quser); 7314 DEFSYM (Qpgrp, "pgrp");
7359 Qgroup = intern_c_string ("group"); 7315 DEFSYM (Qsess, "sess");
7360 staticpro (&Qgroup); 7316 DEFSYM (Qttname, "ttname");
7361 Qcomm = intern_c_string ("comm"); 7317 DEFSYM (Qtpgid, "tpgid");
7362 staticpro (&Qcomm); 7318 DEFSYM (Qminflt, "minflt");
7363 Qstate = intern_c_string ("state"); 7319 DEFSYM (Qmajflt, "majflt");
7364 staticpro (&Qstate); 7320 DEFSYM (Qcminflt, "cminflt");
7365 Qppid = intern_c_string ("ppid"); 7321 DEFSYM (Qcmajflt, "cmajflt");
7366 staticpro (&Qppid); 7322 DEFSYM (Qutime, "utime");
7367 Qpgrp = intern_c_string ("pgrp"); 7323 DEFSYM (Qstime, "stime");
7368 staticpro (&Qpgrp); 7324 DEFSYM (Qtime, "time");
7369 Qsess = intern_c_string ("sess"); 7325 DEFSYM (Qcutime, "cutime");
7370 staticpro (&Qsess); 7326 DEFSYM (Qcstime, "cstime");
7371 Qttname = intern_c_string ("ttname"); 7327 DEFSYM (Qctime, "ctime");
7372 staticpro (&Qttname); 7328 DEFSYM (Qpri, "pri");
7373 Qtpgid = intern_c_string ("tpgid"); 7329 DEFSYM (Qnice, "nice");
7374 staticpro (&Qtpgid); 7330 DEFSYM (Qthcount, "thcount");
7375 Qminflt = intern_c_string ("minflt"); 7331 DEFSYM (Qstart, "start");
7376 staticpro (&Qminflt); 7332 DEFSYM (Qvsize, "vsize");
7377 Qmajflt = intern_c_string ("majflt"); 7333 DEFSYM (Qrss, "rss");
7378 staticpro (&Qmajflt); 7334 DEFSYM (Qetime, "etime");
7379 Qcminflt = intern_c_string ("cminflt"); 7335 DEFSYM (Qpcpu, "pcpu");
7380 staticpro (&Qcminflt); 7336 DEFSYM (Qpmem, "pmem");
7381 Qcmajflt = intern_c_string ("cmajflt"); 7337 DEFSYM (Qargs, "args");
7382 staticpro (&Qcmajflt);
7383 Qutime = intern_c_string ("utime");
7384 staticpro (&Qutime);
7385 Qstime = intern_c_string ("stime");
7386 staticpro (&Qstime);
7387 Qtime = intern_c_string ("time");
7388 staticpro (&Qtime);
7389 Qcutime = intern_c_string ("cutime");
7390 staticpro (&Qcutime);
7391 Qcstime = intern_c_string ("cstime");
7392 staticpro (&Qcstime);
7393 Qctime = intern_c_string ("ctime");
7394 staticpro (&Qctime);
7395 Qpri = intern_c_string ("pri");
7396 staticpro (&Qpri);
7397 Qnice = intern_c_string ("nice");
7398 staticpro (&Qnice);
7399 Qthcount = intern_c_string ("thcount");
7400 staticpro (&Qthcount);
7401 Qstart = intern_c_string ("start");
7402 staticpro (&Qstart);
7403 Qvsize = intern_c_string ("vsize");
7404 staticpro (&Qvsize);
7405 Qrss = intern_c_string ("rss");
7406 staticpro (&Qrss);
7407 Qetime = intern_c_string ("etime");
7408 staticpro (&Qetime);
7409 Qpcpu = intern_c_string ("pcpu");
7410 staticpro (&Qpcpu);
7411 Qpmem = intern_c_string ("pmem");
7412 staticpro (&Qpmem);
7413 Qargs = intern_c_string ("args");
7414 staticpro (&Qargs);
7415 7338
7416 DEFVAR_BOOL ("delete-exited-processes", delete_exited_processes, 7339 DEFVAR_BOOL ("delete-exited-processes", delete_exited_processes,
7417 doc: /* *Non-nil means delete processes immediately when they exit. 7340 doc: /* *Non-nil means delete processes immediately when they exit.
diff --git a/src/search.c b/src/search.c
index 6c835f2cc64..d29a51c695b 100644
--- a/src/search.c
+++ b/src/search.c
@@ -3181,10 +3181,8 @@ syms_of_search (void)
3181 } 3181 }
3182 searchbuf_head = &searchbufs[0]; 3182 searchbuf_head = &searchbufs[0];
3183 3183
3184 Qsearch_failed = intern_c_string ("search-failed"); 3184 DEFSYM (Qsearch_failed, "search-failed");
3185 staticpro (&Qsearch_failed); 3185 DEFSYM (Qinvalid_regexp, "invalid-regexp");
3186 Qinvalid_regexp = intern_c_string ("invalid-regexp");
3187 staticpro (&Qinvalid_regexp);
3188 3186
3189 Fput (Qsearch_failed, Qerror_conditions, 3187 Fput (Qsearch_failed, Qerror_conditions,
3190 pure_cons (Qsearch_failed, pure_cons (Qerror, Qnil))); 3188 pure_cons (Qsearch_failed, pure_cons (Qerror, Qnil)));
diff --git a/src/sound.c b/src/sound.c
index 0e71e66352e..07c7dab0ada 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -1477,14 +1477,10 @@ Internal use only, use `play-sound' instead. */)
1477void 1477void
1478syms_of_sound (void) 1478syms_of_sound (void)
1479{ 1479{
1480 QCdevice = intern_c_string(":device"); 1480 DEFSYM (QCdevice, ":device");
1481 staticpro (&QCdevice); 1481 DEFSYM (QCvolume, ":volume");
1482 QCvolume = intern_c_string (":volume"); 1482 DEFSYM (Qsound, "sound");
1483 staticpro (&QCvolume); 1483 DEFSYM (Qplay_sound_functions, "play-sound-functions");
1484 Qsound = intern_c_string ("sound");
1485 staticpro (&Qsound);
1486 Qplay_sound_functions = intern_c_string ("play-sound-functions");
1487 staticpro (&Qplay_sound_functions);
1488 1484
1489 defsubr (&Splay_sound_internal); 1485 defsubr (&Splay_sound_internal);
1490} 1486}
diff --git a/src/syntax.c b/src/syntax.c
index 82103cfa3d4..8c2d5ded21f 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -3362,8 +3362,7 @@ init_syntax_once (void)
3362 Lisp_Object temp; 3362 Lisp_Object temp;
3363 3363
3364 /* This has to be done here, before we call Fmake_char_table. */ 3364 /* This has to be done here, before we call Fmake_char_table. */
3365 Qsyntax_table = intern_c_string ("syntax-table"); 3365 DEFSYM (Qsyntax_table, "syntax-table");
3366 staticpro (&Qsyntax_table);
3367 3366
3368 /* Intern_C_String this now in case it isn't already done. 3367 /* Intern_C_String this now in case it isn't already done.
3369 Setting this variable twice is harmless. 3368 Setting this variable twice is harmless.
@@ -3448,8 +3447,7 @@ init_syntax_once (void)
3448void 3447void
3449syms_of_syntax (void) 3448syms_of_syntax (void)
3450{ 3449{
3451 Qsyntax_table_p = intern_c_string ("syntax-table-p"); 3450 DEFSYM (Qsyntax_table_p, "syntax-table-p");
3452 staticpro (&Qsyntax_table_p);
3453 3451
3454 staticpro (&Vsyntax_code_object); 3452 staticpro (&Vsyntax_code_object);
3455 3453
@@ -3461,8 +3459,7 @@ syms_of_syntax (void)
3461 /* Defined in regex.c */ 3459 /* Defined in regex.c */
3462 staticpro (&re_match_object); 3460 staticpro (&re_match_object);
3463 3461
3464 Qscan_error = intern_c_string ("scan-error"); 3462 DEFSYM (Qscan_error, "scan-error");
3465 staticpro (&Qscan_error);
3466 Fput (Qscan_error, Qerror_conditions, 3463 Fput (Qscan_error, Qerror_conditions,
3467 pure_cons (Qscan_error, pure_cons (Qerror, Qnil))); 3464 pure_cons (Qscan_error, pure_cons (Qerror, Qnil)));
3468 Fput (Qscan_error, Qerror_message, 3465 Fput (Qscan_error, Qerror_message,
diff --git a/src/sysdep.c b/src/sysdep.c
index 5ad3389dd8f..3a73b1a467b 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -2012,37 +2012,6 @@ perror (void)
2012} 2012}
2013#endif /* HPUX and not HAVE_PERROR */ 2013#endif /* HPUX and not HAVE_PERROR */
2014 2014
2015#ifndef HAVE_DUP2
2016
2017/*
2018 * Emulate BSD dup2. First close newd if it already exists.
2019 * Then, attempt to dup oldd. If not successful, call dup2 recursively
2020 * until we are, then close the unsuccessful ones.
2021 */
2022
2023int
2024dup2 (int oldd, int newd)
2025{
2026 register int fd, ret;
2027
2028 emacs_close (newd);
2029
2030#ifdef F_DUPFD
2031 return fcntl (oldd, F_DUPFD, newd);
2032#else
2033 fd = dup (old);
2034 if (fd == -1)
2035 return -1;
2036 if (fd == new)
2037 return new;
2038 ret = dup2 (old,new);
2039 emacs_close (fd);
2040 return ret;
2041#endif
2042}
2043
2044#endif /* not HAVE_DUP2 */
2045
2046/* 2015/*
2047 * Gettimeofday. Simulate as much as possible. Only accurate 2016 * Gettimeofday. Simulate as much as possible. Only accurate
2048 * to nearest second. Emacs doesn't use tzp so ignore it for now. 2017 * to nearest second. Emacs doesn't use tzp so ignore it for now.
diff --git a/src/terminal.c b/src/terminal.c
index c135c0f93ef..67577adf3b4 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -555,10 +555,8 @@ Each function is called with argument, the terminal.
555This may be called just before actually deleting the terminal, 555This may be called just before actually deleting the terminal,
556or some time later. */); 556or some time later. */);
557 Vdelete_terminal_functions = Qnil; 557 Vdelete_terminal_functions = Qnil;
558 Qdelete_terminal_functions = intern_c_string ("delete-terminal-functions"); 558 DEFSYM (Qdelete_terminal_functions, "delete-terminal-functions");
559 staticpro (&Qdelete_terminal_functions); 559 DEFSYM (Qrun_hook_with_args, "run-hook-with-args");
560 Qrun_hook_with_args = intern_c_string ("run-hook-with-args");
561 staticpro (&Qrun_hook_with_args);
562 560
563 defsubr (&Sdelete_terminal); 561 defsubr (&Sdelete_terminal);
564 defsubr (&Sframe_terminal); 562 defsubr (&Sframe_terminal);
diff --git a/src/textprop.c b/src/textprop.c
index dd8695f7af8..87f1675047b 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -2242,45 +2242,27 @@ inherits it if NONSTICKINESS is nil. The `front-sticky' and
2242 2242
2243 /* Common attributes one might give text */ 2243 /* Common attributes one might give text */
2244 2244
2245 staticpro (&Qforeground); 2245 DEFSYM (Qforeground, "foreground");
2246 Qforeground = intern_c_string ("foreground"); 2246 DEFSYM (Qbackground, "background");
2247 staticpro (&Qbackground); 2247 DEFSYM (Qfont, "font");
2248 Qbackground = intern_c_string ("background"); 2248 DEFSYM (Qstipple, "stipple");
2249 staticpro (&Qfont); 2249 DEFSYM (Qunderline, "underline");
2250 Qfont = intern_c_string ("font"); 2250 DEFSYM (Qread_only, "read-only");
2251 staticpro (&Qstipple); 2251 DEFSYM (Qinvisible, "invisible");
2252 Qstipple = intern_c_string ("stipple"); 2252 DEFSYM (Qintangible, "intangible");
2253 staticpro (&Qunderline); 2253 DEFSYM (Qcategory, "category");
2254 Qunderline = intern_c_string ("underline"); 2254 DEFSYM (Qlocal_map, "local-map");
2255 staticpro (&Qread_only); 2255 DEFSYM (Qfront_sticky, "front-sticky");
2256 Qread_only = intern_c_string ("read-only"); 2256 DEFSYM (Qrear_nonsticky, "rear-nonsticky");
2257 staticpro (&Qinvisible); 2257 DEFSYM (Qmouse_face, "mouse-face");
2258 Qinvisible = intern_c_string ("invisible"); 2258 DEFSYM (Qminibuffer_prompt, "minibuffer-prompt");
2259 staticpro (&Qintangible);
2260 Qintangible = intern_c_string ("intangible");
2261 staticpro (&Qcategory);
2262 Qcategory = intern_c_string ("category");
2263 staticpro (&Qlocal_map);
2264 Qlocal_map = intern_c_string ("local-map");
2265 staticpro (&Qfront_sticky);
2266 Qfront_sticky = intern_c_string ("front-sticky");
2267 staticpro (&Qrear_nonsticky);
2268 Qrear_nonsticky = intern_c_string ("rear-nonsticky");
2269 staticpro (&Qmouse_face);
2270 Qmouse_face = intern_c_string ("mouse-face");
2271 staticpro (&Qminibuffer_prompt);
2272 Qminibuffer_prompt = intern_c_string ("minibuffer-prompt");
2273 2259
2274 /* Properties that text might use to specify certain actions */ 2260 /* Properties that text might use to specify certain actions */
2275 2261
2276 staticpro (&Qmouse_left); 2262 DEFSYM (Qmouse_left, "mouse-left");
2277 Qmouse_left = intern_c_string ("mouse-left"); 2263 DEFSYM (Qmouse_entered, "mouse-entered");
2278 staticpro (&Qmouse_entered); 2264 DEFSYM (Qpoint_left, "point-left");
2279 Qmouse_entered = intern_c_string ("mouse-entered"); 2265 DEFSYM (Qpoint_entered, "point-entered");
2280 staticpro (&Qpoint_left);
2281 Qpoint_left = intern_c_string ("point-left");
2282 staticpro (&Qpoint_entered);
2283 Qpoint_entered = intern_c_string ("point-entered");
2284 2266
2285 defsubr (&Stext_properties_at); 2267 defsubr (&Stext_properties_at);
2286 defsubr (&Sget_text_property); 2268 defsubr (&Sget_text_property);
diff --git a/src/undo.c b/src/undo.c
index e7e9ae5632e..7e121e8b27d 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -637,11 +637,8 @@ Return what remains of the list. */)
637void 637void
638syms_of_undo (void) 638syms_of_undo (void)
639{ 639{
640 Qinhibit_read_only = intern_c_string ("inhibit-read-only"); 640 DEFSYM (Qinhibit_read_only, "inhibit-read-only");
641 staticpro (&Qinhibit_read_only); 641 DEFSYM (Qapply, "apply");
642
643 Qapply = intern_c_string ("apply");
644 staticpro (&Qapply);
645 642
646 pending_boundary = Qnil; 643 pending_boundary = Qnil;
647 staticpro (&pending_boundary); 644 staticpro (&pending_boundary);
diff --git a/src/w32.c b/src/w32.c
index d81fdf3305d..53bf2e811e2 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -5960,8 +5960,7 @@ globals_of_w32 (void)
5960 get_process_times_fn = (GetProcessTimes_Proc) 5960 get_process_times_fn = (GetProcessTimes_Proc)
5961 GetProcAddress (kernel32, "GetProcessTimes"); 5961 GetProcAddress (kernel32, "GetProcessTimes");
5962 5962
5963 QCloaded_from = intern_c_string (":loaded-from"); 5963 DEFSYM (QCloaded_from, ":loaded-from");
5964 staticpro (&QCloaded_from);
5965 5964
5966 Vlibrary_cache = Qnil; 5965 Vlibrary_cache = Qnil;
5967 staticpro (&Vlibrary_cache); 5966 staticpro (&Vlibrary_cache);
diff --git a/src/w32menu.c b/src/w32menu.c
index e2f6de7f0c8..c31a8c1fd96 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -33,7 +33,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
33#include "blockinput.h" 33#include "blockinput.h"
34#include "buffer.h" 34#include "buffer.h"
35#include "charset.h" 35#include "charset.h"
36#include "character.h"
37#include "coding.h" 36#include "coding.h"
38#include "menu.h" 37#include "menu.h"
39 38
diff --git a/src/w32proc.c b/src/w32proc.c
index e94d9aa3254..47cbf57d9ea 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -51,7 +51,6 @@ extern BOOL WINAPI IsValidLocale (LCID, DWORD);
51#endif 51#endif
52 52
53#include "lisp.h" 53#include "lisp.h"
54#include "character.h"
55#include "w32.h" 54#include "w32.h"
56#include "w32heap.h" 55#include "w32heap.h"
57#include "systime.h" 56#include "systime.h"
diff --git a/src/w32select.c b/src/w32select.c
index ef0cb3adc24..e3225c3f996 100644
--- a/src/w32select.c
+++ b/src/w32select.c
@@ -80,7 +80,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
80#include "blockinput.h" 80#include "blockinput.h"
81#include "charset.h" 81#include "charset.h"
82#include "coding.h" 82#include "coding.h"
83#include "character.h"
84#include "composite.h" 83#include "composite.h"
85 84
86 85
diff --git a/src/window.c b/src/window.c
index a5f95ea7883..ebfe318defd 100644
--- a/src/window.c
+++ b/src/window.c
@@ -6443,69 +6443,30 @@ init_window (void)
6443void 6443void
6444syms_of_window (void) 6444syms_of_window (void)
6445{ 6445{
6446 Qscroll_up = intern_c_string ("scroll-up"); 6446 DEFSYM (Qscroll_up, "scroll-up");
6447 staticpro (&Qscroll_up); 6447 DEFSYM (Qscroll_down, "scroll-down");
6448 6448 DEFSYM (Qscroll_command, "scroll-command");
6449 Qscroll_down = intern_c_string ("scroll-down");
6450 staticpro (&Qscroll_down);
6451
6452 Qscroll_command = intern_c_string ("scroll-command");
6453 staticpro (&Qscroll_command);
6454 6449
6455 Fput (Qscroll_up, Qscroll_command, Qt); 6450 Fput (Qscroll_up, Qscroll_command, Qt);
6456 Fput (Qscroll_down, Qscroll_command, Qt); 6451 Fput (Qscroll_down, Qscroll_command, Qt);
6457 6452
6458 staticpro (&Qwindow_configuration_change_hook); 6453 DEFSYM (Qwindow_configuration_change_hook, "window-configuration-change-hook");
6459 Qwindow_configuration_change_hook 6454 DEFSYM (Qwindowp, "windowp");
6460 = intern_c_string ("window-configuration-change-hook"); 6455 DEFSYM (Qwindow_configuration_p, "window-configuration-p");
6461 6456 DEFSYM (Qwindow_live_p, "window-live-p");
6462 Qwindowp = intern_c_string ("windowp"); 6457 DEFSYM (Qwindow_deletable_p, "window-deletable-p");
6463 staticpro (&Qwindowp); 6458 DEFSYM (Qdelete_window, "delete-window");
6464 6459 DEFSYM (Qresize_root_window, "resize-root-window");
6465 Qwindow_configuration_p = intern_c_string ("window-configuration-p"); 6460 DEFSYM (Qresize_root_window_vertically, "resize-root-window-vertically");
6466 staticpro (&Qwindow_configuration_p); 6461 DEFSYM (Qsafe, "safe");
6467 6462 DEFSYM (Qdisplay_buffer, "display-buffer");
6468 Qwindow_live_p = intern_c_string ("window-live-p"); 6463 DEFSYM (Qreplace_buffer_in_windows, "replace-buffer-in-windows");
6469 staticpro (&Qwindow_live_p); 6464 DEFSYM (Qrecord_window_buffer, "record-window-buffer");
6470 6465 DEFSYM (Qget_mru_window, "get-mru-window");
6471 Qwindow_deletable_p = intern_c_string ("window-deletable-p"); 6466 DEFSYM (Qtemp_buffer_show_hook, "temp-buffer-show-hook");
6472 staticpro (&Qwindow_deletable_p); 6467 DEFSYM (Qabove, "above");
6473 6468 DEFSYM (Qbelow, "below");
6474 Qdelete_window = intern_c_string ("delete-window"); 6469 DEFSYM (Qauto_buffer_name, "auto-buffer-name");
6475 staticpro (&Qdelete_window);
6476
6477 Qresize_root_window = intern_c_string ("resize-root-window");
6478 staticpro (&Qresize_root_window);
6479
6480 Qresize_root_window_vertically = intern_c_string ("resize-root-window-vertically");
6481 staticpro (&Qresize_root_window_vertically);
6482
6483 Qsafe = intern_c_string ("safe");
6484 staticpro (&Qsafe);
6485
6486 Qdisplay_buffer = intern_c_string ("display-buffer");
6487 staticpro (&Qdisplay_buffer);
6488
6489 Qreplace_buffer_in_windows = intern_c_string ("replace-buffer-in-windows");
6490 staticpro (&Qreplace_buffer_in_windows);
6491
6492 Qrecord_window_buffer = intern_c_string ("record-window-buffer");
6493 staticpro (&Qrecord_window_buffer);
6494
6495 Qget_mru_window = intern_c_string ("get-mru-window");
6496 staticpro (&Qget_mru_window);
6497
6498 Qtemp_buffer_show_hook = intern_c_string ("temp-buffer-show-hook");
6499 staticpro (&Qtemp_buffer_show_hook);
6500
6501 Qabove = intern_c_string ("above");
6502 staticpro (&Qabove);
6503
6504 Qbelow = intern_c_string ("below");
6505 staticpro (&Qbelow);
6506
6507 Qauto_buffer_name = intern_c_string ("auto-buffer-name");
6508 staticpro (&Qauto_buffer_name);
6509 6470
6510 staticpro (&Vwindow_list); 6471 staticpro (&Vwindow_list);
6511 6472
diff --git a/src/xdisp.c b/src/xdisp.c
index c48610b37f2..44521ede97e 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -26661,8 +26661,7 @@ syms_of_xdisp (void)
26661 Vmessage_stack = Qnil; 26661 Vmessage_stack = Qnil;
26662 staticpro (&Vmessage_stack); 26662 staticpro (&Vmessage_stack);
26663 26663
26664 Qinhibit_redisplay = intern_c_string ("inhibit-redisplay"); 26664 DEFSYM (Qinhibit_redisplay, "inhibit-redisplay");
26665 staticpro (&Qinhibit_redisplay);
26666 26665
26667 message_dolog_marker1 = Fmake_marker (); 26666 message_dolog_marker1 = Fmake_marker ();
26668 staticpro (&message_dolog_marker1); 26667 staticpro (&message_dolog_marker1);
@@ -26687,141 +26686,72 @@ syms_of_xdisp (void)
26687 defsubr (&Sinvisible_p); 26686 defsubr (&Sinvisible_p);
26688 defsubr (&Scurrent_bidi_paragraph_direction); 26687 defsubr (&Scurrent_bidi_paragraph_direction);
26689 26688
26690 staticpro (&Qmenu_bar_update_hook); 26689 DEFSYM (Qmenu_bar_update_hook, "menu-bar-update-hook");
26691 Qmenu_bar_update_hook = intern_c_string ("menu-bar-update-hook"); 26690 DEFSYM (Qoverriding_terminal_local_map, "overriding-terminal-local-map");
26692 26691 DEFSYM (Qoverriding_local_map, "overriding-local-map");
26693 staticpro (&Qoverriding_terminal_local_map); 26692 DEFSYM (Qwindow_scroll_functions, "window-scroll-functions");
26694 Qoverriding_terminal_local_map = intern_c_string ("overriding-terminal-local-map"); 26693 DEFSYM (Qwindow_text_change_functions, "window-text-change-functions");
26695 26694 DEFSYM (Qredisplay_end_trigger_functions, "redisplay-end-trigger-functions");
26696 staticpro (&Qoverriding_local_map); 26695 DEFSYM (Qinhibit_point_motion_hooks, "inhibit-point-motion-hooks");
26697 Qoverriding_local_map = intern_c_string ("overriding-local-map"); 26696 DEFSYM (Qeval, "eval");
26698 26697 DEFSYM (QCdata, ":data");
26699 staticpro (&Qwindow_scroll_functions); 26698 DEFSYM (Qdisplay, "display");
26700 Qwindow_scroll_functions = intern_c_string ("window-scroll-functions"); 26699 DEFSYM (Qspace_width, "space-width");
26701 26700 DEFSYM (Qraise, "raise");
26702 staticpro (&Qwindow_text_change_functions); 26701 DEFSYM (Qslice, "slice");
26703 Qwindow_text_change_functions = intern_c_string ("window-text-change-functions"); 26702 DEFSYM (Qspace, "space");
26704 26703 DEFSYM (Qmargin, "margin");
26705 staticpro (&Qredisplay_end_trigger_functions); 26704 DEFSYM (Qpointer, "pointer");
26706 Qredisplay_end_trigger_functions = intern_c_string ("redisplay-end-trigger-functions"); 26705 DEFSYM (Qleft_margin, "left-margin");
26707 26706 DEFSYM (Qright_margin, "right-margin");
26708 staticpro (&Qinhibit_point_motion_hooks); 26707 DEFSYM (Qcenter, "center");
26709 Qinhibit_point_motion_hooks = intern_c_string ("inhibit-point-motion-hooks"); 26708 DEFSYM (Qline_height, "line-height");
26710 26709 DEFSYM (QCalign_to, ":align-to");
26711 Qeval = intern_c_string ("eval"); 26710 DEFSYM (QCrelative_width, ":relative-width");
26712 staticpro (&Qeval); 26711 DEFSYM (QCrelative_height, ":relative-height");
26713 26712 DEFSYM (QCeval, ":eval");
26714 QCdata = intern_c_string (":data"); 26713 DEFSYM (QCpropertize, ":propertize");
26715 staticpro (&QCdata); 26714 DEFSYM (QCfile, ":file");
26716 Qdisplay = intern_c_string ("display"); 26715 DEFSYM (Qfontified, "fontified");
26717 staticpro (&Qdisplay); 26716 DEFSYM (Qfontification_functions, "fontification-functions");
26718 Qspace_width = intern_c_string ("space-width"); 26717 DEFSYM (Qtrailing_whitespace, "trailing-whitespace");
26719 staticpro (&Qspace_width); 26718 DEFSYM (Qescape_glyph, "escape-glyph");
26720 Qraise = intern_c_string ("raise"); 26719 DEFSYM (Qnobreak_space, "nobreak-space");
26721 staticpro (&Qraise); 26720 DEFSYM (Qimage, "image");
26722 Qslice = intern_c_string ("slice"); 26721 DEFSYM (Qtext, "text");
26723 staticpro (&Qslice); 26722 DEFSYM (Qboth, "both");
26724 Qspace = intern_c_string ("space"); 26723 DEFSYM (Qboth_horiz, "both-horiz");
26725 staticpro (&Qspace); 26724 DEFSYM (Qtext_image_horiz, "text-image-horiz");
26726 Qmargin = intern_c_string ("margin"); 26725 DEFSYM (QCmap, ":map");
26727 staticpro (&Qmargin); 26726 DEFSYM (QCpointer, ":pointer");
26728 Qpointer = intern_c_string ("pointer"); 26727 DEFSYM (Qrect, "rect");
26729 staticpro (&Qpointer); 26728 DEFSYM (Qcircle, "circle");
26730 Qleft_margin = intern_c_string ("left-margin"); 26729 DEFSYM (Qpoly, "poly");
26731 staticpro (&Qleft_margin); 26730 DEFSYM (Qmessage_truncate_lines, "message-truncate-lines");
26732 Qright_margin = intern_c_string ("right-margin"); 26731 DEFSYM (Qgrow_only, "grow-only");
26733 staticpro (&Qright_margin); 26732 DEFSYM (Qinhibit_menubar_update, "inhibit-menubar-update");
26734 Qcenter = intern_c_string ("center"); 26733 DEFSYM (Qinhibit_eval_during_redisplay, "inhibit-eval-during-redisplay");
26735 staticpro (&Qcenter); 26734 DEFSYM (Qposition, "position");
26736 Qline_height = intern_c_string ("line-height"); 26735 DEFSYM (Qbuffer_position, "buffer-position");
26737 staticpro (&Qline_height); 26736 DEFSYM (Qobject, "object");
26738 QCalign_to = intern_c_string (":align-to"); 26737 DEFSYM (Qbar, "bar");
26739 staticpro (&QCalign_to); 26738 DEFSYM (Qhbar, "hbar");
26740 QCrelative_width = intern_c_string (":relative-width"); 26739 DEFSYM (Qbox, "box");
26741 staticpro (&QCrelative_width); 26740 DEFSYM (Qhollow, "hollow");
26742 QCrelative_height = intern_c_string (":relative-height"); 26741 DEFSYM (Qhand, "hand");
26743 staticpro (&QCrelative_height); 26742 DEFSYM (Qarrow, "arrow");
26744 QCeval = intern_c_string (":eval"); 26743 DEFSYM (Qtext, "text");
26745 staticpro (&QCeval); 26744 DEFSYM (Qinhibit_free_realized_faces, "inhibit-free-realized-faces");
26746 QCpropertize = intern_c_string (":propertize");
26747 staticpro (&QCpropertize);
26748 QCfile = intern_c_string (":file");
26749 staticpro (&QCfile);
26750 Qfontified = intern_c_string ("fontified");
26751 staticpro (&Qfontified);
26752 Qfontification_functions = intern_c_string ("fontification-functions");
26753 staticpro (&Qfontification_functions);
26754 Qtrailing_whitespace = intern_c_string ("trailing-whitespace");
26755 staticpro (&Qtrailing_whitespace);
26756 Qescape_glyph = intern_c_string ("escape-glyph");
26757 staticpro (&Qescape_glyph);
26758 Qnobreak_space = intern_c_string ("nobreak-space");
26759 staticpro (&Qnobreak_space);
26760 Qimage = intern_c_string ("image");
26761 staticpro (&Qimage);
26762 Qtext = intern_c_string ("text");
26763 staticpro (&Qtext);
26764 Qboth = intern_c_string ("both");
26765 staticpro (&Qboth);
26766 Qboth_horiz = intern_c_string ("both-horiz");
26767 staticpro (&Qboth_horiz);
26768 Qtext_image_horiz = intern_c_string ("text-image-horiz");
26769 staticpro (&Qtext_image_horiz);
26770 QCmap = intern_c_string (":map");
26771 staticpro (&QCmap);
26772 QCpointer = intern_c_string (":pointer");
26773 staticpro (&QCpointer);
26774 Qrect = intern_c_string ("rect");
26775 staticpro (&Qrect);
26776 Qcircle = intern_c_string ("circle");
26777 staticpro (&Qcircle);
26778 Qpoly = intern_c_string ("poly");
26779 staticpro (&Qpoly);
26780 Qmessage_truncate_lines = intern_c_string ("message-truncate-lines");
26781 staticpro (&Qmessage_truncate_lines);
26782 Qgrow_only = intern_c_string ("grow-only");
26783 staticpro (&Qgrow_only);
26784 Qinhibit_menubar_update = intern_c_string ("inhibit-menubar-update");
26785 staticpro (&Qinhibit_menubar_update);
26786 Qinhibit_eval_during_redisplay = intern_c_string ("inhibit-eval-during-redisplay");
26787 staticpro (&Qinhibit_eval_during_redisplay);
26788 Qposition = intern_c_string ("position");
26789 staticpro (&Qposition);
26790 Qbuffer_position = intern_c_string ("buffer-position");
26791 staticpro (&Qbuffer_position);
26792 Qobject = intern_c_string ("object");
26793 staticpro (&Qobject);
26794 Qbar = intern_c_string ("bar");
26795 staticpro (&Qbar);
26796 Qhbar = intern_c_string ("hbar");
26797 staticpro (&Qhbar);
26798 Qbox = intern_c_string ("box");
26799 staticpro (&Qbox);
26800 Qhollow = intern_c_string ("hollow");
26801 staticpro (&Qhollow);
26802 Qhand = intern_c_string ("hand");
26803 staticpro (&Qhand);
26804 Qarrow = intern_c_string ("arrow");
26805 staticpro (&Qarrow);
26806 Qtext = intern_c_string ("text");
26807 staticpro (&Qtext);
26808 Qinhibit_free_realized_faces = intern_c_string ("inhibit-free-realized-faces");
26809 staticpro (&Qinhibit_free_realized_faces);
26810 26745
26811 list_of_error = Fcons (Fcons (intern_c_string ("error"), 26746 list_of_error = Fcons (Fcons (intern_c_string ("error"),
26812 Fcons (intern_c_string ("void-variable"), Qnil)), 26747 Fcons (intern_c_string ("void-variable"), Qnil)),
26813 Qnil); 26748 Qnil);
26814 staticpro (&list_of_error); 26749 staticpro (&list_of_error);
26815 26750
26816 Qlast_arrow_position = intern_c_string ("last-arrow-position"); 26751 DEFSYM (Qlast_arrow_position, "last-arrow-position");
26817 staticpro (&Qlast_arrow_position); 26752 DEFSYM (Qlast_arrow_string, "last-arrow-string");
26818 Qlast_arrow_string = intern_c_string ("last-arrow-string"); 26753 DEFSYM (Qoverlay_arrow_string, "overlay-arrow-string");
26819 staticpro (&Qlast_arrow_string); 26754 DEFSYM (Qoverlay_arrow_bitmap, "overlay-arrow-bitmap");
26820
26821 Qoverlay_arrow_string = intern_c_string ("overlay-arrow-string");
26822 staticpro (&Qoverlay_arrow_string);
26823 Qoverlay_arrow_bitmap = intern_c_string ("overlay-arrow-bitmap");
26824 staticpro (&Qoverlay_arrow_bitmap);
26825 26755
26826 echo_buffer[0] = echo_buffer[1] = Qnil; 26756 echo_buffer[0] = echo_buffer[1] = Qnil;
26827 staticpro (&echo_buffer[0]); 26757 staticpro (&echo_buffer[0]);
@@ -26855,10 +26785,8 @@ syms_of_xdisp (void)
26855 staticpro (&previous_help_echo_string); 26785 staticpro (&previous_help_echo_string);
26856 help_echo_pos = -1; 26786 help_echo_pos = -1;
26857 26787
26858 Qright_to_left = intern_c_string ("right-to-left"); 26788 DEFSYM (Qright_to_left, "right-to-left");
26859 staticpro (&Qright_to_left); 26789 DEFSYM (Qleft_to_right, "left-to-right");
26860 Qleft_to_right = intern_c_string ("left-to-right");
26861 staticpro (&Qleft_to_right);
26862 26790
26863#ifdef HAVE_WINDOW_SYSTEM 26791#ifdef HAVE_WINDOW_SYSTEM
26864 DEFVAR_BOOL ("x-stretch-cursor", x_stretch_cursor_p, 26792 DEFVAR_BOOL ("x-stretch-cursor", x_stretch_cursor_p,
@@ -27178,8 +27106,7 @@ the frame's other specifications determine how to blink the cursor off. */);
27178If non-nil, windows are automatically scrolled horizontally to make 27106If non-nil, windows are automatically scrolled horizontally to make
27179point visible. */); 27107point visible. */);
27180 automatic_hscrolling_p = 1; 27108 automatic_hscrolling_p = 1;
27181 Qauto_hscroll_mode = intern_c_string ("auto-hscroll-mode"); 27109 DEFSYM (Qauto_hscroll_mode, "auto-hscroll-mode");
27182 staticpro (&Qauto_hscroll_mode);
27183 27110
27184 DEFVAR_INT ("hscroll-margin", hscroll_margin, 27111 DEFVAR_INT ("hscroll-margin", hscroll_margin,
27185 doc: /* *How many columns away from the window edge point is allowed to get 27112 doc: /* *How many columns away from the window edge point is allowed to get
@@ -27235,8 +27162,7 @@ property.
27235 27162
27236To add a prefix to non-continuation lines, use `line-prefix'. */); 27163To add a prefix to non-continuation lines, use `line-prefix'. */);
27237 Vwrap_prefix = Qnil; 27164 Vwrap_prefix = Qnil;
27238 staticpro (&Qwrap_prefix); 27165 DEFSYM (Qwrap_prefix, "wrap-prefix");
27239 Qwrap_prefix = intern_c_string ("wrap-prefix");
27240 Fmake_variable_buffer_local (Qwrap_prefix); 27166 Fmake_variable_buffer_local (Qwrap_prefix);
27241 27167
27242 DEFVAR_LISP ("line-prefix", Vline_prefix, 27168 DEFVAR_LISP ("line-prefix", Vline_prefix,
@@ -27249,8 +27175,7 @@ property.
27249 27175
27250To add a prefix to continuation lines, use `wrap-prefix'. */); 27176To add a prefix to continuation lines, use `wrap-prefix'. */);
27251 Vline_prefix = Qnil; 27177 Vline_prefix = Qnil;
27252 staticpro (&Qline_prefix); 27178 DEFSYM (Qline_prefix, "line-prefix");
27253 Qline_prefix = intern_c_string ("line-prefix");
27254 Fmake_variable_buffer_local (Qline_prefix); 27179 Fmake_variable_buffer_local (Qline_prefix);
27255 27180
27256 DEFVAR_BOOL ("inhibit-eval-during-redisplay", inhibit_eval_during_redisplay, 27181 DEFVAR_BOOL ("inhibit-eval-during-redisplay", inhibit_eval_during_redisplay,
diff --git a/src/xfaces.c b/src/xfaces.c
index 5833633c2e7..4f06bd3ba55 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -6393,153 +6393,82 @@ DEFUN ("show-face-resources", Fshow_face_resources, Sshow_face_resources,
6393void 6393void
6394syms_of_xfaces (void) 6394syms_of_xfaces (void)
6395{ 6395{
6396 Qface = intern_c_string ("face"); 6396 DEFSYM (Qface, "face");
6397 staticpro (&Qface); 6397 DEFSYM (Qface_no_inherit, "face-no-inherit");
6398 Qface_no_inherit = intern_c_string ("face-no-inherit"); 6398 DEFSYM (Qbitmap_spec_p, "bitmap-spec-p");
6399 staticpro (&Qface_no_inherit); 6399 DEFSYM (Qframe_set_background_mode, "frame-set-background-mode");
6400 Qbitmap_spec_p = intern_c_string ("bitmap-spec-p");
6401 staticpro (&Qbitmap_spec_p);
6402 Qframe_set_background_mode = intern_c_string ("frame-set-background-mode");
6403 staticpro (&Qframe_set_background_mode);
6404 6400
6405 /* Lisp face attribute keywords. */ 6401 /* Lisp face attribute keywords. */
6406 QCfamily = intern_c_string (":family"); 6402 DEFSYM (QCfamily, ":family");
6407 staticpro (&QCfamily); 6403 DEFSYM (QCheight, ":height");
6408 QCheight = intern_c_string (":height"); 6404 DEFSYM (QCweight, ":weight");
6409 staticpro (&QCheight); 6405 DEFSYM (QCslant, ":slant");
6410 QCweight = intern_c_string (":weight"); 6406 DEFSYM (QCunderline, ":underline");
6411 staticpro (&QCweight); 6407 DEFSYM (QCinverse_video, ":inverse-video");
6412 QCslant = intern_c_string (":slant"); 6408 DEFSYM (QCreverse_video, ":reverse-video");
6413 staticpro (&QCslant); 6409 DEFSYM (QCforeground, ":foreground");
6414 QCunderline = intern_c_string (":underline"); 6410 DEFSYM (QCbackground, ":background");
6415 staticpro (&QCunderline); 6411 DEFSYM (QCstipple, ":stipple");
6416 QCinverse_video = intern_c_string (":inverse-video"); 6412 DEFSYM (QCwidth, ":width");
6417 staticpro (&QCinverse_video); 6413 DEFSYM (QCfont, ":font");
6418 QCreverse_video = intern_c_string (":reverse-video"); 6414 DEFSYM (QCfontset, ":fontset");
6419 staticpro (&QCreverse_video); 6415 DEFSYM (QCbold, ":bold");
6420 QCforeground = intern_c_string (":foreground"); 6416 DEFSYM (QCitalic, ":italic");
6421 staticpro (&QCforeground); 6417 DEFSYM (QCoverline, ":overline");
6422 QCbackground = intern_c_string (":background"); 6418 DEFSYM (QCstrike_through, ":strike-through");
6423 staticpro (&QCbackground); 6419 DEFSYM (QCbox, ":box");
6424 QCstipple = intern_c_string (":stipple"); 6420 DEFSYM (QCinherit, ":inherit");
6425 staticpro (&QCstipple);
6426 QCwidth = intern_c_string (":width");
6427 staticpro (&QCwidth);
6428 QCfont = intern_c_string (":font");
6429 staticpro (&QCfont);
6430 QCfontset = intern_c_string (":fontset");
6431 staticpro (&QCfontset);
6432 QCbold = intern_c_string (":bold");
6433 staticpro (&QCbold);
6434 QCitalic = intern_c_string (":italic");
6435 staticpro (&QCitalic);
6436 QCoverline = intern_c_string (":overline");
6437 staticpro (&QCoverline);
6438 QCstrike_through = intern_c_string (":strike-through");
6439 staticpro (&QCstrike_through);
6440 QCbox = intern_c_string (":box");
6441 staticpro (&QCbox);
6442 QCinherit = intern_c_string (":inherit");
6443 staticpro (&QCinherit);
6444 6421
6445 /* Symbols used for Lisp face attribute values. */ 6422 /* Symbols used for Lisp face attribute values. */
6446 QCcolor = intern_c_string (":color"); 6423 DEFSYM (QCcolor, ":color");
6447 staticpro (&QCcolor); 6424 DEFSYM (QCline_width, ":line-width");
6448 QCline_width = intern_c_string (":line-width"); 6425 DEFSYM (QCstyle, ":style");
6449 staticpro (&QCline_width); 6426 DEFSYM (Qreleased_button, "released-button");
6450 QCstyle = intern_c_string (":style"); 6427 DEFSYM (Qpressed_button, "pressed-button");
6451 staticpro (&QCstyle); 6428 DEFSYM (Qnormal, "normal");
6452 Qreleased_button = intern_c_string ("released-button"); 6429 DEFSYM (Qultra_light, "ultra-light");
6453 staticpro (&Qreleased_button); 6430 DEFSYM (Qextra_light, "extra-light");
6454 Qpressed_button = intern_c_string ("pressed-button"); 6431 DEFSYM (Qlight, "light");
6455 staticpro (&Qpressed_button); 6432 DEFSYM (Qsemi_light, "semi-light");
6456 Qnormal = intern_c_string ("normal"); 6433 DEFSYM (Qsemi_bold, "semi-bold");
6457 staticpro (&Qnormal); 6434 DEFSYM (Qbold, "bold");
6458 Qultra_light = intern_c_string ("ultra-light"); 6435 DEFSYM (Qextra_bold, "extra-bold");
6459 staticpro (&Qultra_light); 6436 DEFSYM (Qultra_bold, "ultra-bold");
6460 Qextra_light = intern_c_string ("extra-light"); 6437 DEFSYM (Qoblique, "oblique");
6461 staticpro (&Qextra_light); 6438 DEFSYM (Qitalic, "italic");
6462 Qlight = intern_c_string ("light"); 6439 DEFSYM (Qreverse_oblique, "reverse-oblique");
6463 staticpro (&Qlight); 6440 DEFSYM (Qreverse_italic, "reverse-italic");
6464 Qsemi_light = intern_c_string ("semi-light"); 6441 DEFSYM (Qultra_condensed, "ultra-condensed");
6465 staticpro (&Qsemi_light); 6442 DEFSYM (Qextra_condensed, "extra-condensed");
6466 Qsemi_bold = intern_c_string ("semi-bold"); 6443 DEFSYM (Qcondensed, "condensed");
6467 staticpro (&Qsemi_bold); 6444 DEFSYM (Qsemi_condensed, "semi-condensed");
6468 Qbold = intern_c_string ("bold"); 6445 DEFSYM (Qsemi_expanded, "semi-expanded");
6469 staticpro (&Qbold); 6446 DEFSYM (Qexpanded, "expanded");
6470 Qextra_bold = intern_c_string ("extra-bold"); 6447 DEFSYM (Qextra_expanded, "extra-expanded");
6471 staticpro (&Qextra_bold); 6448 DEFSYM (Qultra_expanded, "ultra-expanded");
6472 Qultra_bold = intern_c_string ("ultra-bold"); 6449 DEFSYM (Qbackground_color, "background-color");
6473 staticpro (&Qultra_bold); 6450 DEFSYM (Qforeground_color, "foreground-color");
6474 Qoblique = intern_c_string ("oblique"); 6451 DEFSYM (Qunspecified, "unspecified");
6475 staticpro (&Qoblique); 6452 DEFSYM (Qignore_defface, ":ignore-defface");
6476 Qitalic = intern_c_string ("italic"); 6453
6477 staticpro (&Qitalic); 6454 DEFSYM (Qface_alias, "face-alias");
6478 Qreverse_oblique = intern_c_string ("reverse-oblique"); 6455 DEFSYM (Qdefault, "default");
6479 staticpro (&Qreverse_oblique); 6456 DEFSYM (Qtool_bar, "tool-bar");
6480 Qreverse_italic = intern_c_string ("reverse-italic"); 6457 DEFSYM (Qregion, "region");
6481 staticpro (&Qreverse_italic); 6458 DEFSYM (Qfringe, "fringe");
6482 Qultra_condensed = intern_c_string ("ultra-condensed"); 6459 DEFSYM (Qheader_line, "header-line");
6483 staticpro (&Qultra_condensed); 6460 DEFSYM (Qscroll_bar, "scroll-bar");
6484 Qextra_condensed = intern_c_string ("extra-condensed"); 6461 DEFSYM (Qmenu, "menu");
6485 staticpro (&Qextra_condensed); 6462 DEFSYM (Qcursor, "cursor");
6486 Qcondensed = intern_c_string ("condensed"); 6463 DEFSYM (Qborder, "border");
6487 staticpro (&Qcondensed); 6464 DEFSYM (Qmouse, "mouse");
6488 Qsemi_condensed = intern_c_string ("semi-condensed"); 6465 DEFSYM (Qmode_line_inactive, "mode-line-inactive");
6489 staticpro (&Qsemi_condensed); 6466 DEFSYM (Qvertical_border, "vertical-border");
6490 Qsemi_expanded = intern_c_string ("semi-expanded"); 6467 DEFSYM (Qtty_color_desc, "tty-color-desc");
6491 staticpro (&Qsemi_expanded); 6468 DEFSYM (Qtty_color_standard_values, "tty-color-standard-values");
6492 Qexpanded = intern_c_string ("expanded"); 6469 DEFSYM (Qtty_color_by_index, "tty-color-by-index");
6493 staticpro (&Qexpanded); 6470 DEFSYM (Qtty_color_alist, "tty-color-alist");
6494 Qextra_expanded = intern_c_string ("extra-expanded"); 6471 DEFSYM (Qscalable_fonts_allowed, "scalable-fonts-allowed");
6495 staticpro (&Qextra_expanded);
6496 Qultra_expanded = intern_c_string ("ultra-expanded");
6497 staticpro (&Qultra_expanded);
6498 Qbackground_color = intern_c_string ("background-color");
6499 staticpro (&Qbackground_color);
6500 Qforeground_color = intern_c_string ("foreground-color");
6501 staticpro (&Qforeground_color);
6502 Qunspecified = intern_c_string ("unspecified");
6503 staticpro (&Qunspecified);
6504 Qignore_defface = intern_c_string (":ignore-defface");
6505 staticpro (&Qignore_defface);
6506
6507 Qface_alias = intern_c_string ("face-alias");
6508 staticpro (&Qface_alias);
6509 Qdefault = intern_c_string ("default");
6510 staticpro (&Qdefault);
6511 Qtool_bar = intern_c_string ("tool-bar");
6512 staticpro (&Qtool_bar);
6513 Qregion = intern_c_string ("region");
6514 staticpro (&Qregion);
6515 Qfringe = intern_c_string ("fringe");
6516 staticpro (&Qfringe);
6517 Qheader_line = intern_c_string ("header-line");
6518 staticpro (&Qheader_line);
6519 Qscroll_bar = intern_c_string ("scroll-bar");
6520 staticpro (&Qscroll_bar);
6521 Qmenu = intern_c_string ("menu");
6522 staticpro (&Qmenu);
6523 Qcursor = intern_c_string ("cursor");
6524 staticpro (&Qcursor);
6525 Qborder = intern_c_string ("border");
6526 staticpro (&Qborder);
6527 Qmouse = intern_c_string ("mouse");
6528 staticpro (&Qmouse);
6529 Qmode_line_inactive = intern_c_string ("mode-line-inactive");
6530 staticpro (&Qmode_line_inactive);
6531 Qvertical_border = intern_c_string ("vertical-border");
6532 staticpro (&Qvertical_border);
6533 Qtty_color_desc = intern_c_string ("tty-color-desc");
6534 staticpro (&Qtty_color_desc);
6535 Qtty_color_standard_values = intern_c_string ("tty-color-standard-values");
6536 staticpro (&Qtty_color_standard_values);
6537 Qtty_color_by_index = intern_c_string ("tty-color-by-index");
6538 staticpro (&Qtty_color_by_index);
6539 Qtty_color_alist = intern_c_string ("tty-color-alist");
6540 staticpro (&Qtty_color_alist);
6541 Qscalable_fonts_allowed = intern_c_string ("scalable-fonts-allowed");
6542 staticpro (&Qscalable_fonts_allowed);
6543 6472
6544 Vparam_value_alist = Fcons (Fcons (Qnil, Qnil), Qnil); 6473 Vparam_value_alist = Fcons (Fcons (Qnil, Qnil), Qnil);
6545 staticpro (&Vparam_value_alist); 6474 staticpro (&Vparam_value_alist);
diff --git a/src/xfns.c b/src/xfns.c
index dc717f643aa..b4153973e0d 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -5797,25 +5797,18 @@ syms_of_xfns (void)
5797 /* The section below is built by the lisp expression at the top of the file, 5797 /* The section below is built by the lisp expression at the top of the file,
5798 just above where these variables are declared. */ 5798 just above where these variables are declared. */
5799 /*&&& init symbols here &&&*/ 5799 /*&&& init symbols here &&&*/
5800 Qnone = intern_c_string ("none"); 5800 DEFSYM (Qnone, "none");
5801 staticpro (&Qnone); 5801 DEFSYM (Qsuppress_icon, "suppress-icon");
5802 Qsuppress_icon = intern_c_string ("suppress-icon"); 5802 DEFSYM (Qundefined_color, "undefined-color");
5803 staticpro (&Qsuppress_icon); 5803 DEFSYM (Qcompound_text, "compound-text");
5804 Qundefined_color = intern_c_string ("undefined-color"); 5804 DEFSYM (Qcancel_timer, "cancel-timer");
5805 staticpro (&Qundefined_color); 5805 DEFSYM (Qfont_param, "font-parameter");
5806 Qcompound_text = intern_c_string ("compound-text");
5807 staticpro (&Qcompound_text);
5808 Qcancel_timer = intern_c_string ("cancel-timer");
5809 staticpro (&Qcancel_timer);
5810 Qfont_param = intern_c_string ("font-parameter");
5811 staticpro (&Qfont_param);
5812 /* This is the end of symbol initialization. */ 5806 /* This is the end of symbol initialization. */
5813 5807
5814 /* Text property `display' should be nonsticky by default. */ 5808 /* Text property `display' should be nonsticky by default. */
5815 Vtext_property_default_nonsticky 5809 Vtext_property_default_nonsticky
5816 = Fcons (Fcons (Qdisplay, Qt), Vtext_property_default_nonsticky); 5810 = Fcons (Fcons (Qdisplay, Qt), Vtext_property_default_nonsticky);
5817 5811
5818
5819 Fput (Qundefined_color, Qerror_conditions, 5812 Fput (Qundefined_color, Qerror_conditions,
5820 pure_cons (Qundefined_color, pure_cons (Qerror, Qnil))); 5813 pure_cons (Qundefined_color, pure_cons (Qerror, Qnil)));
5821 Fput (Qundefined_color, Qerror_message, 5814 Fput (Qundefined_color, Qerror_message,
diff --git a/src/xmenu.c b/src/xmenu.c
index 1cb71187c0c..fc629b35104 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -2559,8 +2559,7 @@ DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_
2559void 2559void
2560syms_of_xmenu (void) 2560syms_of_xmenu (void)
2561{ 2561{
2562 Qdebug_on_next_call = intern_c_string ("debug-on-next-call"); 2562 DEFSYM (Qdebug_on_next_call, "debug-on-next-call");
2563 staticpro (&Qdebug_on_next_call);
2564 2563
2565#ifdef USE_X_TOOLKIT 2564#ifdef USE_X_TOOLKIT
2566 widget_id_tick = (1<<16); 2565 widget_id_tick = (1<<16);
diff --git a/src/xsettings.c b/src/xsettings.c
index e2575650df9..5412cf426f8 100644
--- a/src/xsettings.c
+++ b/src/xsettings.c
@@ -750,12 +750,9 @@ syms_of_xsettings (void)
750 gconf_client = NULL; 750 gconf_client = NULL;
751#endif 751#endif
752 752
753 Qmonospace_font_name = intern_c_string ("monospace-font-name"); 753 DEFSYM (Qmonospace_font_name, "monospace-font-name");
754 staticpro (&Qmonospace_font_name); 754 DEFSYM (Qfont_name, "font-name");
755 Qfont_name = intern_c_string ("font-name"); 755 DEFSYM (Qfont_render, "font-render");
756 staticpro (&Qfont_name);
757 Qfont_render = intern_c_string ("font-render");
758 staticpro (&Qfont_render);
759 defsubr (&Sfont_get_system_font); 756 defsubr (&Sfont_get_system_font);
760 defsubr (&Sfont_get_system_normal_font); 757 defsubr (&Sfont_get_system_normal_font);
761 758
@@ -778,8 +775,7 @@ If this variable is nil, Emacs ignores system font changes. */);
778#endif 775#endif
779 776
780 current_tool_bar_style = Qnil; 777 current_tool_bar_style = Qnil;
781 Qtool_bar_style = intern_c_string ("tool-bar-style"); 778 DEFSYM (Qtool_bar_style, "tool-bar-style");
782 staticpro (&Qtool_bar_style);
783 defsubr (&Stool_bar_get_system_style); 779 defsubr (&Stool_bar_get_system_style);
784 780
785 Fprovide (intern_c_string ("dynamic-setting"), Qnil); 781 Fprovide (intern_c_string ("dynamic-setting"), Qnil);
diff --git a/src/xterm.c b/src/xterm.c
index ea0bc6bd427..ea03c04ce50 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -10730,11 +10730,8 @@ syms_of_xterm (void)
10730 staticpro (&last_mouse_scroll_bar); 10730 staticpro (&last_mouse_scroll_bar);
10731 last_mouse_scroll_bar = Qnil; 10731 last_mouse_scroll_bar = Qnil;
10732 10732
10733 staticpro (&Qvendor_specific_keysyms); 10733 DEFSYM (Qvendor_specific_keysyms, "vendor-specific-keysyms");
10734 Qvendor_specific_keysyms = intern_c_string ("vendor-specific-keysyms"); 10734 DEFSYM (Qlatin_1, "latin-1");
10735
10736 staticpro (&Qlatin_1);
10737 Qlatin_1 = intern_c_string ("latin-1");
10738 10735
10739 staticpro (&last_mouse_press_frame); 10736 staticpro (&last_mouse_press_frame);
10740 last_mouse_press_frame = Qnil; 10737 last_mouse_press_frame = Qnil;
@@ -10743,8 +10740,7 @@ syms_of_xterm (void)
10743 xg_default_icon_file = make_pure_c_string ("icons/hicolor/scalable/apps/emacs.svg"); 10740 xg_default_icon_file = make_pure_c_string ("icons/hicolor/scalable/apps/emacs.svg");
10744 staticpro (&xg_default_icon_file); 10741 staticpro (&xg_default_icon_file);
10745 10742
10746 Qx_gtk_map_stock = intern_c_string ("x-gtk-map-stock"); 10743 DEFSYM (Qx_gtk_map_stock, "x-gtk-map-stock");
10747 staticpro (&Qx_gtk_map_stock);
10748#endif 10744#endif
10749 10745
10750 DEFVAR_BOOL ("x-use-underline-position-properties", 10746 DEFVAR_BOOL ("x-use-underline-position-properties",
diff --git a/src/xwidget.c b/src/xwidget.c
index 8e8bd4ca4b4..4029adb141d 100644
--- a/src/xwidget.c
+++ b/src/xwidget.c
@@ -101,6 +101,7 @@ extern Lisp_Object QCtype;
101extern Lisp_Object QCwidth, QCheight; 101extern Lisp_Object QCwidth, QCheight;
102 102
103#define XG_XWIDGET "emacs_xwidget" 103#define XG_XWIDGET "emacs_xwidget"
104#define XG_XWIDGET_VIEW "emacs_xwidget_view"
104struct xwidget_view* xwidget_view_lookup(struct xwidget* xw, struct window *w); 105struct xwidget_view* xwidget_view_lookup(struct xwidget* xw, struct window *w);
105 106
106int 107int
@@ -201,6 +202,35 @@ gboolean xwidget_plug_removed(GtkSocket *socket,
201} 202}
202 203
203 204
205void xwidget_slider_changed (GtkRange *range,
206 gpointer user_data)
207{
208 //slider value changed. change value of siblings correspondingly. but remember that changing value will again trigger signal
209 //gtk_range_set_value ()
210 //http://developer.gnome.org/gobject/unstable/gobject-Signals.html#g-signal-handler-block
211 double v;
212 printf("slider changed val:%f\n", v=gtk_range_get_value(range));
213 //code meant to be refactored
214 struct xwidget_view* xvp = g_object_get_data (G_OBJECT (range), XG_XWIDGET_VIEW);
215 struct xwidget_view* xv;
216 for (int i = 0; i < MAX_XWIDGETS; i++)
217 {
218 xv = &xwidget_views[i];
219 if(xvp->model == xv->model){
220 g_signal_handler_block( xv->widget,xv->handler_id);
221 }
222 }
223 for (int i = 0; i < MAX_XWIDGETS; i++)
224 {
225 xv = &xwidget_views[i];
226 if(xvp->model == xv->model){
227 gtk_range_set_value(xv->widget, v);
228 g_signal_handler_unblock( xv->widget,xv->handler_id);
229 }
230 }
231
232}
233
204int xwidget_view_index=0; 234int xwidget_view_index=0;
205 235
206/* initializes and does initial placement of an xwidget view on screen */ 236/* initializes and does initial placement of an xwidget view on screen */
@@ -233,11 +263,12 @@ xwidget_init_view (
233 //gtk_widget_modify_bg(xv->widget, GTK_STATE_NORMAL, &color); 263 //gtk_widget_modify_bg(xv->widget, GTK_STATE_NORMAL, &color);
234 g_signal_connect_after(xv->widget, "plug-added", G_CALLBACK(xwidget_plug_added), "plug added"); 264 g_signal_connect_after(xv->widget, "plug-added", G_CALLBACK(xwidget_plug_added), "plug added");
235 g_signal_connect_after(xv->widget, "plug-removed", G_CALLBACK(xwidget_plug_removed), "plug removed"); 265 g_signal_connect_after(xv->widget, "plug-removed", G_CALLBACK(xwidget_plug_removed), "plug removed");
236 } else if (EQ(xww->type, Qsocket)) { 266 } else if (EQ(xww->type, Qslider)) {
237 xv->widget = 267 xv->widget =
238 gtk_hscale_new (GTK_ADJUSTMENT 268 //gtk_hscale_new (GTK_ADJUSTMENT(gtk_adjustment_new (0.0, 0.0, 100.0, 1.0, 10.0, 10.0)));
239 (gtk_adjustment_new (0, 0, 100, 1, 1, 0))); 269 gtk_hscale_new_with_range ( 0.0, 100.0, 10.0);
240 gtk_scale_set_draw_value (GTK_SCALE (xv->widget), FALSE); //i think its emacs role to show text and stuff, so disable the widgets own text 270 gtk_scale_set_draw_value (GTK_SCALE (xv->widget), FALSE); //i think its emacs role to show text and stuff, so disable the widgets own text
271 xv->handler_id = g_signal_connect_after(xv->widget, "value-changed", G_CALLBACK(xwidget_slider_changed), "slider changed");
241 } else if (EQ(xww->type, Qcairo)) { 272 } else if (EQ(xww->type, Qcairo)) {
242 //Cairo view 273 //Cairo view
243 //uhm cairo is differentish in gtk 3. 274 //uhm cairo is differentish in gtk 3.
@@ -253,7 +284,7 @@ xwidget_init_view (
253 //xw->widgetwindow = GTK_CONTAINER (gtk_offscreen_window_new ()); 284 //xw->widgetwindow = GTK_CONTAINER (gtk_offscreen_window_new ());
254 285
255 xv->widgetwindow = GTK_CONTAINER (gtk_fixed_new ()); 286 xv->widgetwindow = GTK_CONTAINER (gtk_fixed_new ());
256 gtk_widget_set_has_window( xv->widgetwindow, TRUE); //if gtk_fixed doesnt have a window it will surprisingly not honor setsize so that children gets clipped later. the documentation is not consistent regarding if its legal to call this method 287 gtk_widget_set_has_window(GTK_WIDGET ( xv->widgetwindow), TRUE); //if gtk_fixed doesnt have a window it will surprisingly not honor setsize so that children gets clipped later. the documentation is not consistent regarding if its legal to call this method
257 //xv->widgetwindow = GTK_CONTAINER (gtk_event_box_new ()); 288 //xv->widgetwindow = GTK_CONTAINER (gtk_event_box_new ());
258 289
259 //gtk_widget_set_size_request (GTK_WIDGET (xw->widget), xw->width, xw->height); 290 //gtk_widget_set_size_request (GTK_WIDGET (xw->widget), xw->width, xw->height);
@@ -267,6 +298,7 @@ xwidget_init_view (
267 //store some xwidget data in the gtk widgets 298 //store some xwidget data in the gtk widgets
268 g_object_set_data (G_OBJECT (xv->widget), XG_FRAME_DATA, (gpointer) (s->f)); //the emacs frame 299 g_object_set_data (G_OBJECT (xv->widget), XG_FRAME_DATA, (gpointer) (s->f)); //the emacs frame
269 g_object_set_data (G_OBJECT (xv->widget), XG_XWIDGET, (gpointer) (xww)); //the xwidget 300 g_object_set_data (G_OBJECT (xv->widget), XG_XWIDGET, (gpointer) (xww)); //the xwidget
301 g_object_set_data (G_OBJECT (xv->widget), XG_XWIDGET_VIEW, (gpointer) (xv)); //the xwidget
270 g_object_set_data (G_OBJECT (xv->widgetwindow), XG_XWIDGET, (gpointer) (xww)); //the xwidget 302 g_object_set_data (G_OBJECT (xv->widgetwindow), XG_XWIDGET, (gpointer) (xww)); //the xwidget
271 303
272 //this seems to enable xcomposition. later we need to paint ourselves somehow, 304 //this seems to enable xcomposition. later we need to paint ourselves somehow,
diff --git a/src/xwidget.h b/src/xwidget.h
index 9e3d4669056..3a7d92f70a7 100644
--- a/src/xwidget.h
+++ b/src/xwidget.h
@@ -41,6 +41,8 @@ struct xwidget_view{
41 int x; int y; 41 int x; int y;
42 int clipx; int clipy; 42 int clipx; int clipy;
43 struct window *w; 43 struct window *w;
44
45 long handler_id;
44}; 46};
45 47
46 48