diff lisp/cl-extra.el @ 1983:9c872f33ecbe

[xemacs-hg @ 2004-04-05 22:49:31 by james] Add bignum, ratio, and bigfloat support.
author james
date Mon, 05 Apr 2004 22:50:11 +0000
parents 175ee2cb4d3a
children 393039450288
line wrap: on
line diff
--- a/lisp/cl-extra.el	Mon Apr 05 21:50:47 2004 +0000
+++ b/lisp/cl-extra.el	Mon Apr 05 22:50:11 2004 +0000
@@ -80,6 +80,9 @@
 	((and (eq type 'character) (char-int-p x)) (int-char x))
 	((and (eq type 'integer) (characterp x)) (char-int x))
 	((eq type 'float) (float x))
+	((and (featurep 'number-types)
+	      (memq type '(integer ratio bigfloat))
+	      (coerce-number x type)))
 	((eq type 'bit-vector) (if (bit-vector-p x) x
 				 (apply 'bit-vector (append x nil))))
 	((eq type 'weak-list)