static Lisp_Object default_error_handler (Lisp_Object data) { int speccount = specpdl_depth (); /* None of this is invoked, normally. This code is almost identical to the `command-error' function, except `command-error' does cool tricks with sounds. This function is a fallback, invoked if command-error is unavailable. */ Fding (Qnil, Qnil, Qnil); if (!NILP (Fboundp (Qerrors_deactivate_region)) && !NILP (Fsymbol_value (Qerrors_deactivate_region))) zmacs_deactivate_region (); Fdiscard_input (); specbind (Qinhibit_quit, Qt); Vstandard_output = Qt; Vstandard_input = Qt; Vexecuting_macro = Qnil; Fset (intern ("last-error"), data); clear_echo_area (selected_frame (), Qnil, 0); Fdisplay_error (data, Qt); check_quit (); /* make Vquit_flag accurate */ Vquit_flag = Qnil; return (unbind_to (speccount, Qt)); }
void copy_symbol1(CL_FORM *base) { if(CL_SYMBOLP(ARG(0))) { LOAD_SMSTR(SYM_NAME(ARG(0)), ARG(2)); } else { if(CL_TRUEP(ARG(0))) { COPY(SYMVAL(Slisp, 676), ARG(2)); /* SYM_EXPECTED */ COPY(ARG(0), ARG(3)); Ferror(ARG(2), 2); } else { LOAD_SMSTR((CL_FORM *)&KClisp[266], ARG(2)); /* NIL */ } } Fmake_symbol(ARG(2)); if(CL_TRUEP(ARG(1))) { COPY(ARG(0), ARG(3)); Fboundp(ARG(3)); if(CL_TRUEP(ARG(3))) { COPY(ARG(2), ARG(3)); if(CL_SYMBOLP(ARG(0))) { COPY(SYM_VALUE(ARG(0)), ARG(4)); } else { if(CL_TRUEP(ARG(0))) { COPY(SYMVAL(Slisp, 676), ARG(4)); /* SYM_EXPECTED */ COPY(ARG(0), ARG(5)); Ferror(ARG(4), 2); } else { LOAD_NIL(ARG(4)); } } Fset(ARG(3)); } if(CL_SYMBOLP(ARG(0))) { COPY(SYM_PLIST(ARG(0)), ARG(3)); } else { if(CL_TRUEP(ARG(0))) { COPY(SYMVAL(Slisp, 676), ARG(3)); /* SYM_EXPECTED */ COPY(ARG(0), ARG(4)); Ferror(ARG(3), 2); } else { COPY(SYMVAL(Slisp, 678), ARG(3)); /* *NIL-PLIST* */ } } Fcopy_list(ARG(3)); COPY(ARG(3), ARG(4)); COPY(ARG(2), ARG(5)); Fset_symbol_plist(ARG(4)); } COPY(ARG(2), ARG(0)); }
/* Called from main(). */ bool sys_init(char *program_name) { int argc; char **argv; repv head, *last; gtk_set_locale (); if (!batch_mode_p ()) setpgid (0, 0); make_argv (Fcons (Fsymbol_value (Qprogram_name, Qt), Fsymbol_value (Qcommand_line_args, Qt)), &argc, &argv); /* We need to initialise GTK now. The rep-gtk library will not reinitialise it.. */ gtk_init (&argc, &argv); argc--; argv++; head = Qnil; last = &head; while(argc > 0) { *last = Fcons(rep_string_copy(*argv), Qnil); last = &rep_CDR(*last); argc--; argv++; } Fset (Qcommand_line_args, head); def_font_str = rep_VAL (&def_font_str_data); #ifdef HAVE_X11 get_resources (program_name); #endif get_options (); use_options (); color_map = gdk_colormap_get_system (); gtk_meta_mod = gtk_find_meta (); /* Loading the gtk rep library will replace the usual event loop with one that works with GTK. */ rep_INTERN(gtk_feature); #if rep_INTERFACE >= 9 Frequire (Qgtk_feature); #else Fload (rep_string_copy ("gtk"), Qnil, Qnil, Qnil, Qnil); #endif if (!rep_throw_value) { /* Find the gtkobj<->lispobj converters */ gtk_jade_wrap_gtkobj = rep_find_dl_symbol (Qgtk_feature, "sgtk_wrap_gtkobj"); gtk_jade_get_gtkobj = rep_find_dl_symbol (Qgtk_feature, "sgtk_get_gtkobj"); gtk_jade_callback_postfix = rep_find_dl_symbol (Qgtk_feature, "sgtk_callback_postfix"); assert (gtk_jade_wrap_gtkobj != 0 && gtk_jade_get_gtkobj != 0 && gtk_jade_callback_postfix != 0); return true; } else return false; }