Mercurial > hg > xemacs-beta
diff src/lread.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 | ed498ef2108b |
children | 190b164ddcac |
line wrap: on
line diff
--- a/src/lread.c Thu May 24 06:30:21 2001 +0000 +++ b/src/lread.c Thu May 24 07:51:33 2001 +0000 @@ -220,15 +220,13 @@ static DOESNT_RETURN read_syntax_error (const char *string) { - signal_error (Qinvalid_read_syntax, - list1 (build_translated_string (string))); + signal_error (Qinvalid_read_syntax, string, Qunbound); } static Lisp_Object continuable_read_syntax_error (const char *string) { - return Fsignal (Qinvalid_read_syntax, - list1 (build_translated_string (string))); + return signal_continuable_error (Qinvalid_read_syntax, string, Qunbound); } @@ -244,7 +242,7 @@ struct buffer *b = XBUFFER (readcharfun); if (!BUFFER_LIVE_P (b)) - error ("Reading from killed buffer"); + invalid_operation ("Reading from killed buffer", Qunbound); if (BUF_PT (b) >= BUF_ZV (b)) return -1; @@ -427,13 +425,13 @@ EMACS_INT pos; if (!INTP (XCDR (victim))) - signal_simple_error ("Bogus doc string reference", victim); + invalid_byte_code ("Bogus doc string reference", victim); pos = XINT (XCDR (victim)); if (pos < 0) pos = -pos; /* kludge to mark a user variable */ tem = unparesseuxify_doc_string (fd, pos, 0, Vload_file_name_internal); if (!STRINGP (tem)) - signal_error (Qerror, tem); + signal_error_1 (Qinvalid_byte_code, tem); return tem; } @@ -473,7 +471,7 @@ NGCPRO1 (juan); ivan = Fread (juan); if (!CONSP (ivan)) - signal_simple_error ("invalid lazy-loaded byte code", ivan); + invalid_byte_code ("invalid lazy-loaded byte code", ivan); XCOMPILED_FUNCTION (john)->instructions = XCAR (ivan); /* v18 or v19 bytecode file. Need to Ebolify. */ if (XCOMPILED_FUNCTION (john)->flags.ebolified @@ -598,7 +596,7 @@ if (fd < 0) { if (NILP (noerror)) - signal_file_error ("Cannot open load file", file); + signal_error (Qfile_error, "Cannot open load file", file); else { UNGCPRO; @@ -816,7 +814,7 @@ return XINT (mode); } else - signal_simple_error ("Invalid value", mode); + invalid_argument ("Invalid value", mode); return 0; /* unreached */ } @@ -1410,7 +1408,7 @@ QUIT; if (b != 0 && !BUFFER_LIVE_P (b)) - error ("Reading from killed buffer"); + invalid_operation ("Reading from killed buffer", Qunbound); c = readchar (readcharfun); if (c == ';') @@ -1487,7 +1485,7 @@ else buf = Fget_buffer (buffer); if (NILP (buf)) - error ("No such buffer."); + invalid_argument ("No such buffer", Qunbound); if (NILP (printflag)) tem = Qsymbolp; /* #### #@[]*&$#*[& SI:NULL-STREAM */ @@ -1672,7 +1670,7 @@ Emchar c = readchar (readcharfun); if (c < 0) - signal_error (Qend_of_file, list1 (READCHARFUN_MAYBE (readcharfun))); + signal_error (Qend_of_file, 0, READCHARFUN_MAYBE (readcharfun)); switch (c) { @@ -1690,12 +1688,12 @@ case 'M': c = readchar (readcharfun); if (c < 0) - signal_error (Qend_of_file, list1 (READCHARFUN_MAYBE (readcharfun))); + signal_error (Qend_of_file, 0, READCHARFUN_MAYBE (readcharfun)); if (c != '-') - error ("Invalid escape character syntax"); + syntax_error ("Invalid escape character syntax", Qunbound); c = readchar (readcharfun); if (c < 0) - signal_error (Qend_of_file, list1 (READCHARFUN_MAYBE (readcharfun))); + signal_error (Qend_of_file, 0, READCHARFUN_MAYBE (readcharfun)); if (c == '\\') c = read_escape (readcharfun); return c | 0200; @@ -1725,15 +1723,15 @@ #define ctl_modifier (0x400000) #define meta_modifier (0x800000) */ -#define FSF_LOSSAGE(mask) \ - if (fail_on_bucky_bit_character_escapes || \ - ((c = readchar (readcharfun)) != '-')) \ - error ("Invalid escape character syntax"); \ - c = readchar (readcharfun); \ - if (c < 0) \ - signal_error (Qend_of_file, list1 (READCHARFUN_MAYBE (readcharfun))); \ - if (c == '\\') \ - c = read_escape (readcharfun); \ +#define FSF_LOSSAGE(mask) \ + if (fail_on_bucky_bit_character_escapes || \ + ((c = readchar (readcharfun)) != '-')) \ + syntax_error ("Invalid escape character syntax", Qunbound); \ + c = readchar (readcharfun); \ + if (c < 0) \ + signal_error (Qend_of_file, 0, READCHARFUN_MAYBE (readcharfun)); \ + if (c == '\\') \ + c = read_escape (readcharfun); \ return c | mask case 'S': FSF_LOSSAGE (shift_modifier); @@ -1751,13 +1749,13 @@ case 'C': c = readchar (readcharfun); if (c < 0) - signal_error (Qend_of_file, list1 (READCHARFUN_MAYBE (readcharfun))); + signal_error (Qend_of_file, 0, READCHARFUN_MAYBE (readcharfun)); if (c != '-') - error ("Invalid escape character syntax"); + syntax_error ("Invalid escape character syntax", Qunbound); case '^': c = readchar (readcharfun); if (c < 0) - signal_error (Qend_of_file, list1 (READCHARFUN_MAYBE (readcharfun))); + signal_error (Qend_of_file, 0, READCHARFUN_MAYBE (readcharfun)); if (c == '\\') c = read_escape (readcharfun); /* FSFmacs junk for non-ASCII controls. @@ -1853,7 +1851,7 @@ { c = readchar (readcharfun); if (c < 0) - signal_error (Qend_of_file, list1 (READCHARFUN_MAYBE (readcharfun))); + signal_error (Qend_of_file, 0, READCHARFUN_MAYBE (readcharfun)); *saw_a_backslash = 1; } Lstream_put_emchar (XLSTREAM (Vread_buffer_stream), c); @@ -2213,7 +2211,7 @@ QUIT; c = readchar (readcharfun); if (c < 0) - signal_error (Qend_of_file, list1 (READCHARFUN_MAYBE (readcharfun))); + signal_error (Qend_of_file, 0, READCHARFUN_MAYBE (readcharfun)); switch (c) { @@ -2819,7 +2817,7 @@ else #endif if (ch != '.') - signal_simple_error ("BUG! Internal reader error", elt); + signal_error (Qinternal_error, "BUG! Internal reader error", elt); else if (!s->allow_dotted_lists) read_syntax_error ("\".\" in a vector"); else @@ -3118,25 +3116,25 @@ DEFSUBR (Feval_buffer); DEFSUBR (Feval_region); - defsymbol (&Qstandard_input, "standard-input"); - defsymbol (&Qread_char, "read-char"); - defsymbol (&Qcurrent_load_list, "current-load-list"); - defsymbol (&Qload, "load"); - defsymbol (&Qload_file_name, "load-file-name"); - defsymbol (&Qfset, "fset"); + DEFSYMBOL (Qstandard_input); + DEFSYMBOL (Qread_char); + DEFSYMBOL (Qcurrent_load_list); + DEFSYMBOL (Qload); + DEFSYMBOL (Qload_file_name); + DEFSYMBOL (Qfset); #ifdef LISP_BACKQUOTES - defsymbol (&Qbackquote, "backquote"); + DEFSYMBOL (Qbackquote); defsymbol (&Qbacktick, "`"); defsymbol (&Qcomma, ","); defsymbol (&Qcomma_at, ",@"); defsymbol (&Qcomma_dot, ",."); #endif - defsymbol (&Qexists, "exists"); - defsymbol (&Qreadable, "readable"); - defsymbol (&Qwritable, "writable"); - defsymbol (&Qexecutable, "executable"); + DEFSYMBOL (Qexists); + DEFSYMBOL (Qreadable); + DEFSYMBOL (Qwritable); + DEFSYMBOL (Qexecutable); } void @@ -3292,7 +3290,7 @@ Ffset (Qload, intern ("load-internal")); #ifdef FEATUREP_SYNTAX - defsymbol (&Qfeaturep, "featurep"); + DEFSYMBOL (Qfeaturep); Fprovide(intern("xemacs")); #ifdef INFODOCK Fprovide(intern("infodock"));