comparison src/console.c @ 563:183866b06e0b

[xemacs-hg @ 2001-05-24 07:50:48 by ben] Makefile.in.in, abbrev.c, alloc.c, buffer.c, bytecode.c, callint.c, callproc.c, casetab.c, chartab.c, cmdloop.c, cmds.c, console-msw.c, console-msw.h, console-stream.c, console-tty.c, console-x.c, console.c, data.c, database.c, debug.c, device-gtk.c, device-msw.c, device-tty.c, device-x.c, device.c, dialog-gtk.c, dialog-msw.c, dialog-x.c, dialog.c, dired-msw.c, dired.c, doc.c, doprnt.c, dragdrop.c, editfns.c, eldap.c, eldap.h, elhash.c, emacs-widget-accessors.c, emacs.c, emodules.c, esd.c, eval.c, event-Xt.c, event-gtk.c, event-msw.c, event-stream.c, events.c, extents.c, faces.c, file-coding.c, fileio.c, filelock.c, floatfns.c, fns.c, font-lock.c, frame-gtk.c, frame-x.c, frame.c, general-slots.h, glade.c, glyphs-gtk.c, glyphs-msw.c, glyphs-widget.c, glyphs-x.c, glyphs.c, glyphs.h, gpmevent.c, gui-gtk.c, gui-x.c, gui.c, gutter.c, hpplay.c, indent.c, input-method-xlib.c, insdel.c, intl.c, keymap.c, libsst.c, libsst.h, linuxplay.c, lisp.h, lread.c, lstream.c, lstream.h, macros.c, marker.c, md5.c, menubar-gtk.c, menubar-msw.c, menubar-x.c, menubar.c, minibuf.c, miscplay.c, miscplay.h, mule-ccl.c, mule-charset.c, mule-wnnfns.c, mule.c, nas.c, ntplay.c, ntproc.c, objects-gtk.c, objects-msw.c, objects-x.c, objects.c, postgresql.c, print.c, process-nt.c, process-unix.c, process.c, ralloc.c, rangetab.c, redisplay.c, scrollbar.c, search.c, select-gtk.c, select-x.c, select.c, sgiplay.c, sheap.c, sound.c, specifier.c, sunplay.c, symbols.c, symeval.h, symsinit.h, syntax.c, sysdep.c, toolbar-msw.c, toolbar.c, tooltalk.c, ui-byhand.c, ui-gtk.c, undo.c, unexaix.c, unexapollo.c, unexconvex.c, unexec.c, widget.c, win32.c, window.c: -- defsymbol -> DEFSYMBOL. -- add an error type to all errors. -- eliminate the error functions in eval.c that let you just use Qerror as the type. -- redo the error API to be more consistent, sensibly named, and easier to use. -- redo the error hierarchy somewhat. create new errors: structure-formation-error, gui-error, invalid-constant, stack-overflow, out-of-memory, process-error, network-error, sound-error, printing-unreadable-object, base64-conversion- error; coding-system-error renamed to text-conversion error; some others. -- fix Mule problems in error strings in emodules.c, tooltalk.c. -- fix error handling in mswin open-network-stream. -- Mule-ize all sound files and clean up the headers. -- nativesound.h -> sound.h and used for all sound files. -- move some shared stuff into glyphs-shared.c: first attempt at eliminating some of the massive GTK code duplication. xemacs.mak: add glyphs-shared.c. xemacs-faq.texi: document how to debug X errors subr.el: fix doc string to reflect reality
author ben
date Thu, 24 May 2001 07:51:33 +0000
parents 0784d089fdc9
children 190b164ddcac
comparison
equal deleted inserted replaced
562:c775bd016b32 563:183866b06e0b
121 { 121 {
122 struct console *con = XCONSOLE (obj); 122 struct console *con = XCONSOLE (obj);
123 char buf[256]; 123 char buf[256];
124 124
125 if (print_readably) 125 if (print_readably)
126 error ("printing unreadable object #<console %s 0x%x>", 126 printing_unreadable_object ("#<console %s 0x%x>",
127 XSTRING_DATA (con->name), con->header.uid); 127 XSTRING_DATA (con->name), con->header.uid);
128 128
129 sprintf (buf, "#<%s-console", !CONSOLE_LIVE_P (con) ? "dead" : 129 sprintf (buf, "#<%s-console", !CONSOLE_LIVE_P (con) ? "dead" :
130 CONSOLE_TYPE_NAME (con)); 130 CONSOLE_TYPE_NAME (con));
131 write_c_string (buf, printcharfun); 131 write_c_string (buf, printcharfun);
132 if (CONSOLE_LIVE_P (con) && !NILP (CONSOLE_CONNECTION (con))) 132 if (CONSOLE_LIVE_P (con) && !NILP (CONSOLE_CONNECTION (con)))
182 182
183 for (i = 0; i < Dynarr_length (the_console_type_entry_dynarr); i++) 183 for (i = 0; i < Dynarr_length (the_console_type_entry_dynarr); i++)
184 if (EQ (type, Dynarr_at (the_console_type_entry_dynarr, i).symbol)) 184 if (EQ (type, Dynarr_at (the_console_type_entry_dynarr, i).symbol))
185 return Dynarr_at (the_console_type_entry_dynarr, i).meths; 185 return Dynarr_at (the_console_type_entry_dynarr, i).meths;
186 186
187 maybe_signal_simple_error ("Invalid console type", type, Qconsole, errb); 187 maybe_invalid_constant ("Invalid console type", type, Qconsole, errb);
188 188
189 return 0; 189 return 0;
190 } 190 }
191 191
192 int 192 int
279 { 279 {
280 struct frame *f = XFRAME(frame); 280 struct frame *f = XFRAME(frame);
281 Fselect_window (FRAME_SELECTED_WINDOW (f), Qnil); 281 Fselect_window (FRAME_SELECTED_WINDOW (f), Qnil);
282 } 282 }
283 else 283 else
284 error ("Can't select console with no frames."); 284 invalid_operation ("Can't select console with no frames", Qunbound);
285 } 285 }
286 else 286 else
287 error ("Can't select a console with no devices"); 287 invalid_operation ("Can't select a console with no devices", Qunbound);
288 return Qnil; 288 return Qnil;
289 } 289 }
290 290
291 void 291 void
292 set_console_last_nonminibuf_frame (struct console *con, 292 set_console_last_nonminibuf_frame (struct console *con,
459 { 459 {
460 Lisp_Object console = Ffind_console (connection, type); 460 Lisp_Object console = Ffind_console (connection, type);
461 if (NILP (console)) 461 if (NILP (console))
462 { 462 {
463 if (NILP (type)) 463 if (NILP (type))
464 signal_simple_error ("No such console", connection); 464 invalid_argument ("No such console", connection);
465 else 465 else
466 signal_simple_error_2 ("No such console", type, connection); 466 invalid_argument_2 ("No such console", type, connection);
467 } 467 }
468 return console; 468 return console;
469 } 469 }
470 470
471 Lisp_Object 471 Lisp_Object
623 down_we_go = 1; 623 down_we_go = 1;
624 624
625 if (down_we_go) 625 if (down_we_go)
626 { 626 {
627 if (!force) 627 if (!force)
628 error ("Attempt to delete the only frame"); 628 invalid_operation ("Attempt to delete the only frame", Qunbound);
629 else if (from_io_error) 629 else if (from_io_error)
630 { 630 {
631 /* Mayday mayday! We're going down! */ 631 /* Mayday mayday! We're going down! */
632 stderr_out (" Autosaving and exiting...\n"); 632 stderr_out (" Autosaving and exiting...\n");
633 Vwindow_system = Qnil; /* let it lie! */ 633 Vwindow_system = Qnil; /* let it lie! */
1105 1105
1106 DEFSUBR (Fsuspend_emacs); 1106 DEFSUBR (Fsuspend_emacs);
1107 DEFSUBR (Fset_input_mode); 1107 DEFSUBR (Fset_input_mode);
1108 DEFSUBR (Fcurrent_input_mode); 1108 DEFSUBR (Fcurrent_input_mode);
1109 1109
1110 defsymbol (&Qconsolep, "consolep"); 1110 DEFSYMBOL (Qconsolep);
1111 defsymbol (&Qconsole_live_p, "console-live-p"); 1111 DEFSYMBOL (Qconsole_live_p);
1112 1112
1113 defsymbol (&Qcreate_console_hook, "create-console-hook"); 1113 DEFSYMBOL (Qcreate_console_hook);
1114 defsymbol (&Qdelete_console_hook, "delete-console-hook"); 1114 DEFSYMBOL (Qdelete_console_hook);
1115 1115
1116 defsymbol (&Qsuspend_hook, "suspend-hook"); 1116 DEFSYMBOL (Qsuspend_hook);
1117 defsymbol (&Qsuspend_resume_hook, "suspend-resume-hook"); 1117 DEFSYMBOL (Qsuspend_resume_hook);
1118 } 1118 }
1119 1119
1120 static const struct lrecord_description cte_description_1[] = { 1120 static const struct lrecord_description cte_description_1[] = {
1121 { XD_LISP_OBJECT, offsetof (console_type_entry, symbol) }, 1121 { XD_LISP_OBJECT, offsetof (console_type_entry, symbol) },
1122 { XD_STRUCT_PTR, offsetof (console_type_entry, meths), 1, &console_methods_description }, 1122 { XD_STRUCT_PTR, offsetof (console_type_entry, meths), 1, &console_methods_description },