comparison lisp/cl-extra.el @ 371:cc15677e0335 r21-2b1

Import from CVS: tag r21-2b1
author cvs
date Mon, 13 Aug 2007 11:03:08 +0200
parents a4f53d9b3154
children 8626e4521993
comparison
equal deleted inserted replaced
370:bd866891f083 371:cc15677e0335
72 ((eq type 'vector) (if (vectorp x) x (vconcat x))) 72 ((eq type 'vector) (if (vectorp x) x (vconcat x)))
73 ((eq type 'string) (if (stringp x) x (concat x))) 73 ((eq type 'string) (if (stringp x) x (concat x)))
74 ((eq type 'array) (if (arrayp x) x (vconcat x))) 74 ((eq type 'array) (if (arrayp x) x (vconcat x)))
75 ((and (eq type 'character) (stringp x) (= (length x) 1)) (aref x 0)) 75 ((and (eq type 'character) (stringp x) (= (length x) 1)) (aref x 0))
76 ((and (eq type 'character) (symbolp x)) (coerce (symbol-name x) type)) 76 ((and (eq type 'character) (symbolp x)) (coerce (symbol-name x) type))
77 ((and (eq type 'character) (char-int-p x)) (int-char x))
78 ((and (eq type 'integer) (characterp x)) (char-int x))
79 ((eq type 'float) (float x)) 77 ((eq type 'float) (float x))
80 ((eq type 'bit-vector) (if (bit-vector-p x) x 78 ((eq type 'bit-vector) (if (bit-vector-p x) x
81 (apply 'bit-vector (append x nil)))) 79 (apply 'bit-vector (append x nil))))
82 ((eq type 'weak-list) 80 ((eq type 'weak-list)
83 (if (weak-list-p x) x 81 (if (weak-list-p x) x
106 (char-equal (downcase x) (downcase y))))) 104 (char-equal (downcase x) (downcase y)))))
107 ((numberp x) 105 ((numberp x)
108 (and (numberp y) (= x y))) 106 (and (numberp y) (= x y)))
109 ((consp x) 107 ((consp x)
110 ;; XEmacs change 108 ;; XEmacs change
111 (while (and (consp x) (consp y) (equalp (car x) (car y))) 109 (while (and (consp x) (consp y) (equalp (cl-pop x) (cl-pop y))))
112 (cl-pop x) (cl-pop y))
113 (and (not (consp x)) (equalp x y))) 110 (and (not (consp x)) (equalp x y)))
114 ((vectorp x) 111 ((vectorp x)
115 (and (vectorp y) (= (length x) (length y)) 112 (and (vectorp y) (= (length x) (length y))
116 (let ((i (length x))) 113 (let ((i (length x)))
117 (while (and (>= (setq i (1- i)) 0) 114 (while (and (>= (setq i (1- i)) 0)