changeset 5257:30bf66dd3ca0

Add fixnum as an accepted destination type, #'coerce 2010-09-03 Aidan Kehoe <kehoea@parhasard.net> * cl-extra.el (coerce): Add fixnum as an accepted destination type.
author Aidan Kehoe <kehoea@parhasard.net>
date Fri, 03 Sep 2010 17:14:10 +0100
parents 6c8f5574d4a1
children 1ed4cefddd12
files lisp/ChangeLog lisp/cl-extra.el
diffstat 2 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Sep 03 15:35:53 2010 +0100
+++ b/lisp/ChangeLog	Fri Sep 03 17:14:10 2010 +0100
@@ -1,3 +1,8 @@
+2010-09-03  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* cl-extra.el (coerce):
+	Add fixnum as an accepted destination type.
+
 2010-09-02  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* obsolete.el (process-get):
--- a/lisp/cl-extra.el	Fri Sep 03 15:35:53 2010 +0100
+++ b/lisp/cl-extra.el	Fri Sep 03 17:14:10 2010 +0100
@@ -64,11 +64,11 @@
 	((and (eq type 'character) (symbolp x)) (coerce (symbol-name x) type))
 	;; XEmacs addition character <-> integer coercions
 	((and (eq type 'character) (char-int-p x)) (int-char x))
-	((and (eq type 'integer) (characterp x)) (char-int x))
+	((and (memq type '(integer fixnum)) (characterp x)) (char-int x))
 	((eq type 'float) (float x))
 	;; XEmacs addition: enhanced numeric type coercions
 	((and-fboundp 'coerce-number
-	   (memq type '(integer ratio bigfloat))
+	   (memq type '(integer ratio bigfloat fixnum))
 	   (coerce-number x type)))
 	;; XEmacs addition: bit-vector coercion
 	((or (eq type 'bit-vector)