From: ueno Date: Tue, 22 Aug 2000 09:26:00 +0000 (+0000) Subject: * elmo-util.el (elmo-define-error): New function. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c00a2a51f691fdd8513e9e6a8f3f6623d0200b15;p=elisp%2Fwanderlust.git * elmo-util.el (elmo-define-error): New function. --- diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index e79bcee..f8e1ee4 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -1484,6 +1484,18 @@ Otherwise treat \\ in NEWTEXT string as special: (setq first nil)) (princ err-mes stream)))) +(if (fboundp 'define-error) + (defalias 'elmo-define-error 'define-error) + (defun elmo-define-error (error doc &optional parents) + (or parents + (setq parents 'error)) + (let ((conds (get parents 'error-conditions))) + (or conds + (error "Not an error symbol: %s" error)) + (setplist error + (list 'error-message doc + 'error-conditions (cons error conds)))))) + (cond ((fboundp 'lprogress-display) (defalias 'elmo-display-progress 'lprogress-display)) ((fboundp 'progress-feedback-with-label)