# HG changeset patch # User Aidan Kehoe # Date 1283530450 -3600 # Node ID 30bf66dd3ca0d987bf2ad8a05ea8843bf92d437d # Parent 6c8f5574d4a16620ba5f97eac7e377d8fc0f79ae Add fixnum as an accepted destination type, #'coerce 2010-09-03 Aidan Kehoe * cl-extra.el (coerce): Add fixnum as an accepted destination type. diff -r 6c8f5574d4a1 -r 30bf66dd3ca0 lisp/ChangeLog --- 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 + + * cl-extra.el (coerce): + Add fixnum as an accepted destination type. + 2010-09-02 Aidan Kehoe * obsolete.el (process-get): diff -r 6c8f5574d4a1 -r 30bf66dd3ca0 lisp/cl-extra.el --- 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)