comparison src/nsterm.m @ 106791:4d61ac1aa561

* nsterm.m (syms_of_nsterm): Initialize Qcontrol etc. before initializing the Lisp variables that depend on them.
author Chong Yidong <cyd@stupidchicken.com>
date Mon, 11 Jan 2010 09:54:52 -0500
parents 7a2c06c2f19c
children f1f76bd00c9f
comparison
equal deleted inserted replaced
106790:f039ef236594 106791:4d61ac1aa561
6142 { 6142 {
6143 NSTRACE (syms_of_nsterm); 6143 NSTRACE (syms_of_nsterm);
6144 6144
6145 ns_antialias_threshold = 10.0; 6145 ns_antialias_threshold = 10.0;
6146 6146
6147 DEFVAR_LISP ("ns-input-file", &ns_input_file,
6148 "The file specified in the last NS event.");
6149 ns_input_file =Qnil;
6150
6151 DEFVAR_LISP ("ns-input-text", &ns_input_text,
6152 "The data received in the last NS text drag event.");
6153 ns_input_text =Qnil;
6154
6155 DEFVAR_LISP ("ns-working-text", &ns_working_text,
6156 "String for visualizing working composition sequence.");
6157 ns_working_text =Qnil;
6158
6159 DEFVAR_LISP ("ns-input-font", &ns_input_font,
6160 "The font specified in the last NS event.");
6161 ns_input_font =Qnil;
6162
6163 DEFVAR_LISP ("ns-input-fontsize", &ns_input_fontsize,
6164 "The fontsize specified in the last NS event.");
6165 ns_input_fontsize =Qnil;
6166
6167 DEFVAR_LISP ("ns-input-line", &ns_input_line,
6168 "The line specified in the last NS event.");
6169 ns_input_line =Qnil;
6170
6171 DEFVAR_LISP ("ns-input-color", &ns_input_color,
6172 "The color specified in the last NS event.");
6173 ns_input_color =Qnil;
6174
6175 DEFVAR_LISP ("ns-input-spi-name", &ns_input_spi_name,
6176 "The service name specified in the last NS event.");
6177 ns_input_spi_name =Qnil;
6178
6179 DEFVAR_LISP ("ns-input-spi-arg", &ns_input_spi_arg,
6180 "The service argument specified in the last NS event.");
6181 ns_input_spi_arg =Qnil;
6182
6183 DEFVAR_LISP ("ns-alternate-modifier", &ns_alternate_modifier,
6184 "This variable describes the behavior of the alternate or option key.\n\
6185 Set to control, meta, alt, super, or hyper means it is taken to be that key.\n\
6186 Set to none means that the alternate / option key is not interpreted by Emacs\n\
6187 at all, allowing it to be used at a lower level for accented character entry.");
6188 ns_alternate_modifier = Qmeta;
6189
6190 DEFVAR_LISP ("ns-command-modifier", &ns_command_modifier,
6191 "This variable describes the behavior of the command key.\n\
6192 Set to control, meta, alt, super, or hyper means it is taken to be that key.");
6193 ns_command_modifier = Qsuper;
6194
6195 DEFVAR_LISP ("ns-control-modifier", &ns_control_modifier,
6196 "This variable describes the behavior of the control key.\n\
6197 Set to control, meta, alt, super, or hyper means it is taken to be that key.");
6198 ns_control_modifier = Qcontrol;
6199
6200 DEFVAR_LISP ("ns-function-modifier", &ns_function_modifier,
6201 "This variable describes the behavior of the function key (on laptops).\n\
6202 Set to control, meta, alt, super, or hyper means it is taken to be that key.\n\
6203 Set to none means that the function key is not interpreted by Emacs at all,\n\
6204 allowing it to be used at a lower level for accented character entry.");
6205 ns_function_modifier = Qnone;
6206
6207 DEFVAR_LISP ("ns-antialias-text", &ns_antialias_text,
6208 "Non-nil (the default) means to render text antialiased. Only has an effect on OS X Panther and above.");
6209 ns_antialias_text = Qt;
6210
6211 DEFVAR_LISP ("ns-confirm-quit", &ns_confirm_quit,
6212 "Whether to confirm application quit using dialog.");
6213 ns_confirm_quit = Qnil;
6214
6215 staticpro (&ns_display_name_list);
6216 ns_display_name_list = Qnil;
6217
6218 staticpro (&last_mouse_motion_frame);
6219 last_mouse_motion_frame = Qnil;
6220
6221 /* from 23+ we need to tell emacs what modifiers there are.. */ 6147 /* from 23+ we need to tell emacs what modifiers there are.. */
6222 Qmodifier_value = intern ("modifier-value"); 6148 Qmodifier_value = intern ("modifier-value");
6223 Qalt = intern ("alt"); 6149 Qalt = intern ("alt");
6224 Fput (Qalt, Qmodifier_value, make_number (alt_modifier)); 6150 Fput (Qalt, Qmodifier_value, make_number (alt_modifier));
6225 Qhyper = intern ("hyper"); 6151 Qhyper = intern ("hyper");
6229 Qsuper = intern ("super"); 6155 Qsuper = intern ("super");
6230 Fput (Qsuper, Qmodifier_value, make_number (super_modifier)); 6156 Fput (Qsuper, Qmodifier_value, make_number (super_modifier));
6231 Qcontrol = intern ("control"); 6157 Qcontrol = intern ("control");
6232 Fput (Qcontrol, Qmodifier_value, make_number (ctrl_modifier)); 6158 Fput (Qcontrol, Qmodifier_value, make_number (ctrl_modifier));
6233 6159
6160 DEFVAR_LISP ("ns-input-file", &ns_input_file,
6161 "The file specified in the last NS event.");
6162 ns_input_file =Qnil;
6163
6164 DEFVAR_LISP ("ns-input-text", &ns_input_text,
6165 "The data received in the last NS text drag event.");
6166 ns_input_text =Qnil;
6167
6168 DEFVAR_LISP ("ns-working-text", &ns_working_text,
6169 "String for visualizing working composition sequence.");
6170 ns_working_text =Qnil;
6171
6172 DEFVAR_LISP ("ns-input-font", &ns_input_font,
6173 "The font specified in the last NS event.");
6174 ns_input_font =Qnil;
6175
6176 DEFVAR_LISP ("ns-input-fontsize", &ns_input_fontsize,
6177 "The fontsize specified in the last NS event.");
6178 ns_input_fontsize =Qnil;
6179
6180 DEFVAR_LISP ("ns-input-line", &ns_input_line,
6181 "The line specified in the last NS event.");
6182 ns_input_line =Qnil;
6183
6184 DEFVAR_LISP ("ns-input-color", &ns_input_color,
6185 "The color specified in the last NS event.");
6186 ns_input_color =Qnil;
6187
6188 DEFVAR_LISP ("ns-input-spi-name", &ns_input_spi_name,
6189 "The service name specified in the last NS event.");
6190 ns_input_spi_name =Qnil;
6191
6192 DEFVAR_LISP ("ns-input-spi-arg", &ns_input_spi_arg,
6193 "The service argument specified in the last NS event.");
6194 ns_input_spi_arg =Qnil;
6195
6196 DEFVAR_LISP ("ns-alternate-modifier", &ns_alternate_modifier,
6197 "This variable describes the behavior of the alternate or option key.\n\
6198 Set to control, meta, alt, super, or hyper means it is taken to be that key.\n\
6199 Set to none means that the alternate / option key is not interpreted by Emacs\n\
6200 at all, allowing it to be used at a lower level for accented character entry.");
6201 ns_alternate_modifier = Qmeta;
6202
6203 DEFVAR_LISP ("ns-command-modifier", &ns_command_modifier,
6204 "This variable describes the behavior of the command key.\n\
6205 Set to control, meta, alt, super, or hyper means it is taken to be that key.");
6206 ns_command_modifier = Qsuper;
6207
6208 DEFVAR_LISP ("ns-control-modifier", &ns_control_modifier,
6209 "This variable describes the behavior of the control key.\n\
6210 Set to control, meta, alt, super, or hyper means it is taken to be that key.");
6211 ns_control_modifier = Qcontrol;
6212
6213 DEFVAR_LISP ("ns-function-modifier", &ns_function_modifier,
6214 "This variable describes the behavior of the function key (on laptops).\n\
6215 Set to control, meta, alt, super, or hyper means it is taken to be that key.\n\
6216 Set to none means that the function key is not interpreted by Emacs at all,\n\
6217 allowing it to be used at a lower level for accented character entry.");
6218 ns_function_modifier = Qnone;
6219
6220 DEFVAR_LISP ("ns-antialias-text", &ns_antialias_text,
6221 "Non-nil (the default) means to render text antialiased. Only has an effect on OS X Panther and above.");
6222 ns_antialias_text = Qt;
6223
6224 DEFVAR_LISP ("ns-confirm-quit", &ns_confirm_quit,
6225 "Whether to confirm application quit using dialog.");
6226 ns_confirm_quit = Qnil;
6227
6228 staticpro (&ns_display_name_list);
6229 ns_display_name_list = Qnil;
6230
6231 staticpro (&last_mouse_motion_frame);
6232 last_mouse_motion_frame = Qnil;
6233
6234 /* TODO: move to common code */ 6234 /* TODO: move to common code */
6235 DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars, 6235 DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars,
6236 doc: /* If not nil, Emacs uses toolkit scroll bars. */); 6236 doc: /* If not nil, Emacs uses toolkit scroll bars. */);
6237 #ifdef USE_TOOLKIT_SCROLL_BARS 6237 #ifdef USE_TOOLKIT_SCROLL_BARS
6238 Vx_toolkit_scroll_bars = Qt; 6238 Vx_toolkit_scroll_bars = Qt;