Mercurial > hg > xemacs-beta
changeset 5318:203dcac81dae
Provide some milquetoast compatibility in our errors, type-error, program-error
2010-12-30 Aidan Kehoe <kehoea@parhasard.net>
* cl.el:
Provde the Common Lisp program-error, type-error as error
symbols. This doesn't nearly go far enough for anyone using the
Common Lisp errors.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Thu, 30 Dec 2010 00:15:37 +0000 |
parents | 8aa511adfad6 |
children | ed5d4f081fa9 |
files | lisp/ChangeLog lisp/cl.el |
diffstat | 2 files changed, 20 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Wed Dec 29 23:56:57 2010 +0000 +++ b/lisp/ChangeLog Thu Dec 30 00:15:37 2010 +0000 @@ -1,3 +1,10 @@ +2010-12-30 Aidan Kehoe <kehoea@parhasard.net> + + * cl.el: + Provde the Common Lisp program-error, type-error as error + symbols. This doesn't nearly go far enough for anyone using the + Common Lisp errors. + 2010-12-29 Aidan Kehoe <kehoea@parhasard.net> * cl-macs.el (delete-duplicates):
--- a/lisp/cl.el Wed Dec 29 23:56:57 2010 +0000 +++ b/lisp/cl.el Thu Dec 30 00:15:37 2010 +0000 @@ -603,6 +603,19 @@ ;; XEmacs change (define-error 'cl-assertion-failed "Assertion failed") +;; XEmacs; provide a milquetoast amount of compatibility in our error symbols. +(define-error 'type-error "Wrong type" 'wrong-type-argument) +(define-error 'program-error "Error in your program" 'invalid-argument) + +(map-plist + #'(lambda (key value) + (mapc #'(lambda (error) + (put error 'error-conditions + (cons key (get error 'error-conditions)))) + value)) + '(program-error (wrong-number-of-arguments invalid-keyword-argument) + type-error (wrong-type-argument malformed-list circular-list))) + ;; XEmacs change: omit the autoload rules; we handle those a different way ;;; Define data for indentation and edebug.