Mercurial > hg > xemacs-beta
comparison lisp/subr.el @ 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 | 5bdbc721d46a |
children | 943eaba38521 |
comparison
equal
deleted
inserted
replaced
562:c775bd016b32 | 563:183866b06e0b |
---|---|
1 ;;; subr.el --- basic lisp subroutines for XEmacs | 1 ;;; subr.el --- basic lisp subroutines for XEmacs |
2 | 2 |
3 ;; Copyright (C) 1985, 1986, 1992, 1994-5, 1997 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1985, 1986, 1992, 1994-5, 1997 Free Software Foundation, Inc. |
4 ;; Copyright (C) 1995 Tinker Systems and INS Engineering Corp. | 4 ;; Copyright (C) 1995 Tinker Systems and INS Engineering Corp. |
5 ;; Copyright (C) 1995 Sun Microsystems. | 5 ;; Copyright (C) 1995 Sun Microsystems. |
6 ;; Copyright (C) 2000 Ben Wing. | 6 ;; Copyright (C) 2000, 2001 Ben Wing. |
7 | 7 |
8 ;; Maintainer: XEmacs Development Team | 8 ;; Maintainer: XEmacs Development Team |
9 ;; Keywords: extensions, dumped | 9 ;; Keywords: extensions, dumped |
10 | 10 |
11 ;; This file is part of XEmacs. | 11 ;; This file is part of XEmacs. |
623 an error is signalled using the error symbol `error' and formatted string. | 623 an error is signalled using the error symbol `error' and formatted string. |
624 Although this usage of `error' is very common, it is deprecated because it | 624 Although this usage of `error' is very common, it is deprecated because it |
625 totally defeats the purpose of having structured errors. There is now | 625 totally defeats the purpose of having structured errors. There is now |
626 a rich set of defined errors you can use: | 626 a rich set of defined errors you can use: |
627 | 627 |
628 quit | |
629 | |
628 error | 630 error |
629 syntax-error | |
630 invalid-read-syntax | |
631 list-formation-error | |
632 malformed-list | |
633 malformed-property-list | |
634 circular-list | |
635 circular-property-list | |
636 invalid-regexp | |
637 specifier-syntax-error | |
638 | |
639 invalid-argument | 631 invalid-argument |
632 syntax-error | |
633 invalid-read-syntax | |
634 invalid-regexp | |
635 structure-formation-error | |
636 list-formation-error | |
637 malformed-list | |
638 malformed-property-list | |
639 circular-list | |
640 circular-property-list | |
641 invalid-function | |
642 no-catch | |
643 undefined-keystroke-sequence | |
644 invalid-constant | |
640 wrong-type-argument | 645 wrong-type-argument |
641 args-out-of-range | 646 args-out-of-range |
642 wrong-number-of-arguments | 647 wrong-number-of-arguments |
643 invalid-function | |
644 no-catch | |
645 undefined-keystroke-sequence | |
646 specifier-argument-error | |
647 | 648 |
648 invalid-state | 649 invalid-state |
649 void-function | 650 void-function |
650 cyclic-function-indirection | 651 cyclic-function-indirection |
651 void-variable | 652 void-variable |
652 cyclic-variable-indirection | 653 cyclic-variable-indirection |
653 protected-field | |
654 invalid-byte-code | 654 invalid-byte-code |
655 stack-overflow | |
656 out-of-memory | |
657 invalid-key-binding | |
658 internal-error | |
655 | 659 |
656 invalid-operation | 660 invalid-operation |
657 invalid-change | 661 invalid-change |
658 setting-constant | 662 setting-constant |
659 specifier-change-error | 663 protected-field |
660 editing-error | 664 editing-error |
661 beginning-of-buffer | 665 beginning-of-buffer |
662 end-of-buffer | 666 end-of-buffer |
663 buffer-read-only | 667 buffer-read-only |
664 io-error | 668 io-error |
665 file-error | 669 file-error |
666 file-already-exists | 670 file-already-exists |
667 file-locked | 671 file-locked |
668 file-supersession | 672 file-supersession |
669 end-of-file | 673 end-of-file |
670 coding-system-error | 674 process-error |
671 image-conversion-error | 675 network-error |
672 tooltalk-error | 676 tooltalk-error |
677 gui-error | |
678 dialog-box-error | |
679 sound-error | |
680 conversion-error | |
681 text-conversion-error | |
682 image-conversion-error | |
683 base64-conversion-error | |
684 selection-conversion-error | |
673 arith-error | 685 arith-error |
674 range-error | 686 range-error |
675 domain-error | 687 domain-error |
676 singularity-error | 688 singularity-error |
677 overflow-error | 689 overflow-error |
678 underflow-error | 690 underflow-error |
679 dialog-box-error | |
680 search-failed | 691 search-failed |
681 selection-conversion-error | 692 printing-unreadable-object |
682 | 693 unimplemented |
683 unimplemented | 694 |
684 | 695 Note the semantic differences between some of the more common errors: |
685 internal-error | 696 |
686 | 697 -- `invalid-argument' is for all cases where a bad value is encountered. |
687 The five most common errors you will probably use or base your new | 698 -- `invalid-constant' is for arguments where only a specific set of values |
688 errors off of are `syntax-error', `invalid-argument', `invalid-state', | 699 is allowed. |
689 `invalid-operation', and `invalid-change'. Note the semantic differences: | 700 -- `syntax-error' is when complex structures (parsed strings, lists, |
690 | 701 and the like) are badly formed. If the problem is just a single bad |
691 -- `syntax-error' is for errors in complex structures: parsed strings, lists, | 702 value inside the structure, you should probably be using something else, |
692 and the like. | 703 e.g. `invalid-constant', `wrong-type-argument', or `invalid-argument'. |
693 -- `invalid-argument' is for errors in a simple value. Typically, the entire | |
694 value, not just one part of it, is wrong. | |
695 -- `invalid-state' means that some settings have been changed in such a way | 704 -- `invalid-state' means that some settings have been changed in such a way |
696 that their current state is unallowable. More and more, code is being | 705 that their current state is unallowable. More and more, code is being |
697 written more carefully, and catches the error when the settings are being | 706 written more carefully, and catches the error when the settings are being |
698 changed, rather than afterwards. This leads us to the next error: | 707 changed, rather than afterwards. This leads us to the next error: |
699 -- `invalid-change' means that an attempt is being made to change some settings | 708 -- `invalid-change' means that an attempt is being made to change some settings |
700 into an invalid state. `invalid-change' is a type of `invalid-operation'. | 709 into an invalid state. `invalid-change' is a type of `invalid-operation'. |
701 -- `invalid-operation' refers to all cases where code is trying to do something | 710 -- `invalid-operation' refers to all cases where code is trying to do something |
702 that's disallowed. This includes file errors, buffer errors (e.g. running | 711 that's disallowed, or when an error occurred during an operation. (These |
703 off the end of a buffer), `invalid-change' as just mentioned, and | 712 two concepts are merged because there's no clear distinction between them.) |
704 arithmetic errors. | 713 -- `io-error' refers to errors involving interaction with any external |
714 components (files, other programs, the operating system, etc). | |
705 | 715 |
706 See also `cerror', `signal', and `signal-error'." | 716 See also `cerror', `signal', and `signal-error'." |
707 (while t (apply | 717 (while t (apply |
708 'cerror datum args))) | 718 'cerror datum args))) |
709 | 719 |