comparison src/event-stream.c @ 5118:e0db3c197671 ben-lisp-object

merge up to latest default branch, doesn't compile yet
author Ben Wing <ben@xemacs.org>
date Sat, 26 Dec 2009 21:18:49 -0600
parents 3742ea8250b5 2fd201d73a92
children d1247f3cc363
comparison
equal deleted inserted replaced
5117:3742ea8250b5 5118:e0db3c197671
253 253
254 #ifdef DEBUG_XEMACS 254 #ifdef DEBUG_XEMACS
255 Fixnum debug_emacs_events; 255 Fixnum debug_emacs_events;
256 256
257 static void 257 static void
258 external_debugging_print_event (char *event_description, Lisp_Object event) 258 external_debugging_print_event (const char *event_description, Lisp_Object event)
259 { 259 {
260 write_c_string (Qexternal_debugging_output, "("); 260 write_c_string (Qexternal_debugging_output, "(");
261 write_c_string (Qexternal_debugging_output, event_description); 261 write_c_string (Qexternal_debugging_output, event_description);
262 write_c_string (Qexternal_debugging_output, ") "); 262 write_c_string (Qexternal_debugging_output, ") ");
263 print_internal (event, Qexternal_debugging_output, 1); 263 print_internal (event, Qexternal_debugging_output, 1);
362 b->echo_buf = 0; 362 b->echo_buf = 0;
363 } 363 }
364 } 364 }
365 } 365 }
366 366
367 DEFINE_NONDUMPABLE_LISP_OBJECT ("command-builder", command_builder, 367 DEFINE_NODUMP_LISP_OBJECT ("command-builder", command_builder,
368 mark_command_builder, 368 mark_command_builder,
369 0, 369 internal_object_printer,
370 finalize_command_builder, 0, 0, 370 finalize_command_builder, 0, 0,
371 command_builder_description, 371 command_builder_description,
372 struct command_builder); 372 struct command_builder);
373 373
374 static void 374 static void
375 reset_command_builder_event_chain (struct command_builder *builder) 375 reset_command_builder_event_chain (struct command_builder *builder)
376 { 376 {
377 builder->current_events = Qnil; 377 builder->current_events = Qnil;
416 copy_command_builder (struct command_builder *collapsing, 416 copy_command_builder (struct command_builder *collapsing,
417 struct command_builder *new_buildings) 417 struct command_builder *new_buildings)
418 { 418 {
419 if (!new_buildings) 419 if (!new_buildings)
420 new_buildings = XCOMMAND_BUILDER (allocate_command_builder (Qnil, 0)); 420 new_buildings = XCOMMAND_BUILDER (allocate_command_builder (Qnil, 0));
421
422 new_buildings->console = collapsing->console;
421 423
422 new_buildings->self_insert_countdown = collapsing->self_insert_countdown; 424 new_buildings->self_insert_countdown = collapsing->self_insert_countdown;
423 425
424 deallocate_event_chain (new_buildings->current_events); 426 deallocate_event_chain (new_buildings->current_events);
425 new_buildings->current_events = 427 new_buildings->current_events =
820 : make_string (command_builder->echo_buf, 822 : make_string (command_builder->echo_buf,
821 buf_index)); 823 buf_index));
822 struct gcpro gcpro1, gcpro2; 824 struct gcpro gcpro1, gcpro2;
823 GCPRO2 (echo, help); 825 GCPRO2 (echo, help);
824 826
825 record_unwind_protect (save_window_excursion_unwind, 827 record_unwind_protect (Feval,
826 call1 (Qcurrent_window_configuration, Qnil)); 828 list2 (Qset_window_configuration,
829 call0 (Qcurrent_window_configuration)));
827 reset_key_echo (command_builder, 1); 830 reset_key_echo (command_builder, 1);
828 831
829 help = Feval (Vhelp_form); 832 help = IGNORE_MULTIPLE_VALUES (Feval (Vhelp_form));
830 if (STRINGP (help)) 833 if (STRINGP (help))
831 internal_with_output_to_temp_buffer (build_string ("*Help*"), 834 internal_with_output_to_temp_buffer (build_string ("*Help*"),
832 print_help, help, Qnil); 835 print_help, help, Qnil);
833 Fnext_command_event (event, Qnil); 836 Fnext_command_event (event, Qnil);
834 /* Remove the help from the frame */ 837 /* Remove the help from the frame */
1028 { XD_LISP_OBJECT, offsetof (Lisp_Timeout, function) }, 1031 { XD_LISP_OBJECT, offsetof (Lisp_Timeout, function) },
1029 { XD_LISP_OBJECT, offsetof (Lisp_Timeout, object) }, 1032 { XD_LISP_OBJECT, offsetof (Lisp_Timeout, object) },
1030 { XD_END } 1033 { XD_END }
1031 }; 1034 };
1032 1035
1033 DEFINE_INTERNAL_LISP_OBJECT ("timeout", timeout, Lisp_Timeout, 1036 DEFINE_DUMPABLE_INTERNAL_LISP_OBJECT ("timeout", timeout,
1034 timeout_description, mark_timeout); 1037 mark_timeout, timeout_description,
1038 Lisp_Timeout);
1035 1039
1036 /* Generate a timeout and return its ID. */ 1040 /* Generate a timeout and return its ID. */
1037 1041
1038 int 1042 int
1039 event_stream_generate_wakeup (unsigned int milliseconds, 1043 event_stream_generate_wakeup (unsigned int milliseconds,
3150 but that can eradicate timestamps and other such stuff. 3154 but that can eradicate timestamps and other such stuff.
3151 This way is safer. */ 3155 This way is safer. */
3152 Lisp_Object ev2 = Fmake_event (Qnil, Qnil); 3156 Lisp_Object ev2 = Fmake_event (Qnil, Qnil);
3153 3157
3154 character_to_event (XCHAR (traduit), XEVENT (ev2), 3158 character_to_event (XCHAR (traduit), XEVENT (ev2),
3155 XCONSOLE (XEVENT_CHANNEL (event)), 0, 1); 3159 XCONSOLE (XEVENT_CHANNEL (event)),
3160 high_bit_is_meta, 1);
3156 XSET_EVENT_KEY_KEYSYM (event, XEVENT_KEY_KEYSYM (ev2)); 3161 XSET_EVENT_KEY_KEYSYM (event, XEVENT_KEY_KEYSYM (ev2));
3157 XSET_EVENT_KEY_MODIFIERS (event, XEVENT_KEY_MODIFIERS (ev2)); 3162 XSET_EVENT_KEY_MODIFIERS (event, XEVENT_KEY_MODIFIERS (ev2));
3158 Fdeallocate_event (ev2); 3163 Fdeallocate_event (ev2);
3159 did_translate = 1; 3164 did_translate = 1;
3160 } 3165 }
3175 but that can eradicate timestamps and other such stuff. 3180 but that can eradicate timestamps and other such stuff.
3176 This way is safer. */ 3181 This way is safer. */
3177 Lisp_Object ev2 = Fmake_event (Qnil, Qnil); 3182 Lisp_Object ev2 = Fmake_event (Qnil, Qnil);
3178 3183
3179 character_to_event (XCHAR (traduit), XEVENT (ev2), 3184 character_to_event (XCHAR (traduit), XEVENT (ev2),
3180 XCONSOLE (XEVENT_CHANNEL (event)), 0, 1); 3185 XCONSOLE (XEVENT_CHANNEL (event)),
3186 high_bit_is_meta, 1);
3181 XSET_EVENT_KEY_KEYSYM (event, XEVENT_KEY_KEYSYM (ev2)); 3187 XSET_EVENT_KEY_KEYSYM (event, XEVENT_KEY_KEYSYM (ev2));
3182 XSET_EVENT_KEY_MODIFIERS (event, 3188 XSET_EVENT_KEY_MODIFIERS (event,
3183 XEVENT_KEY_MODIFIERS (event) | 3189 XEVENT_KEY_MODIFIERS (event) |
3184 XEVENT_KEY_MODIFIERS (ev2)); 3190 XEVENT_KEY_MODIFIERS (ev2));
3185 3191
4345 else 4351 else
4346 zmacs_update_region (); 4352 zmacs_update_region ();
4347 4353
4348 safe_run_hook_trapping_problems 4354 safe_run_hook_trapping_problems
4349 (Qcommand, Qpost_command_hook, 4355 (Qcommand, Qpost_command_hook,
4350 INHIBIT_EXISTING_PERMANENT_DISPLAY_OBJECT_DELETION); 4356 0);
4351 4357
4352 #if 0 /* FSF Emacs */ 4358 #if 0 /* FSF Emacs */
4353 if (!NILP (current_buffer->mark_active)) 4359 if (!NILP (current_buffer->mark_active))
4354 { 4360 {
4355 if (!NILP (Vdeactivate_mark) && !NILP (Vtransient_mark_mode)) 4361 if (!NILP (Vdeactivate_mark) && !NILP (Vtransient_mark_mode))