summaryrefslogtreecommitdiff
path: root/lisp/calc/calc.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/calc/calc.el')
-rw-r--r--lisp/calc/calc.el15
1 files changed, 6 insertions, 9 deletions
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index e72d0aacd5d..2eeb880c34d 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -921,15 +921,12 @@ Used by `calc-user-invocation'.")
(put 'calc-mode 'mode-class 'special)
(put 'calc-trail-mode 'mode-class 'special)
-;; Define "inexact-result" as an e-lisp error symbol.
-(put 'inexact-result 'error-conditions '(error inexact-result calc-error))
-(put 'inexact-result 'error-message "Calc internal error (inexact-result)")
-
-;; Define "math-overflow" and "math-underflow" as e-lisp error symbols.
-(put 'math-overflow 'error-conditions '(error math-overflow calc-error))
-(put 'math-overflow 'error-message "Floating-point overflow occurred")
-(put 'math-underflow 'error-conditions '(error math-underflow calc-error))
-(put 'math-underflow 'error-message "Floating-point underflow occurred")
+(define-error 'calc-error "Calc internal error")
+(define-error 'inexact-result
+ "Calc internal error (inexact-result)" 'calc-error)
+
+(define-error 'math-overflow "Floating-point overflow occurred" 'calc-error)
+(define-error 'math-underflow "Floating-point underflow occurred" 'calc-error)
(defvar calc-trail-pointer nil
"The \"current\" entry in trail buffer.")