diff lisp/cl.el @ 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 bbff29a01820
children d1b17a33450b 6506fcb40fcf
line wrap: on
line diff
--- 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.