Example #1
0
static bool
reread_doc_file (Lisp_Object file)
{
  if (NILP (file))
    Fsnarf_documentation (Vdoc_file_name);
  else
    Fload (file, Qt, Qt, Qt, Qnil);

  return 1;
}
Example #2
0
File: doc.c Project: T-force/emacs
static int
reread_doc_file (Lisp_Object file)
{
#if 0
  Lisp_Object reply, prompt[3];
  struct gcpro gcpro1;
  GCPRO1 (file);
  prompt[0] = build_string ("File ");
  prompt[1] = NILP (file) ? Vdoc_file_name : file;
  prompt[2] = build_string (" is out of sync.  Reload? ");
  reply = Fy_or_n_p (Fconcat (3, prompt));
  UNGCPRO;
  if (NILP (reply))
    return 0;
#endif

  if (NILP (file))
    Fsnarf_documentation (Vdoc_file_name);
  else
    Fload (file, Qt, Qt, Qt, Qnil);

  return 1;
}
Example #3
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;
}