comparison lisp/cl-extra.el @ 343:8bec6624d99b r21-1-1

Import from CVS: tag r21-1-1
author cvs
date Mon, 13 Aug 2007 10:52:53 +0200
parents 57709be46d1b
children a4f53d9b3154
comparison
equal deleted inserted replaced
342:b036ce23deaa 343:8bec6624d99b
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) (numberp x) (char-or-char-int-p x)
78 (int-char x)))
77 ((eq type 'float) (float x)) 79 ((eq type 'float) (float x))
78 ((eq type 'bit-vector) (if (bit-vector-p x) x 80 ((eq type 'bit-vector) (if (bit-vector-p x) x
79 (apply 'bit-vector (append x nil)))) 81 (apply 'bit-vector (append x nil))))
80 ((eq type 'weak-list) 82 ((eq type 'weak-list)
81 (if (weak-list-p x) x 83 (if (weak-list-p x) x
104 (char-equal (downcase x) (downcase y))))) 106 (char-equal (downcase x) (downcase y)))))
105 ((numberp x) 107 ((numberp x)
106 (and (numberp y) (= x y))) 108 (and (numberp y) (= x y)))
107 ((consp x) 109 ((consp x)
108 ;; XEmacs change 110 ;; XEmacs change
109 (while (and (consp x) (consp y) (equalp (cl-pop x) (cl-pop y)))) 111 (while (and (consp x) (consp y) (equalp (car x) (car y)))
112 (cl-pop x) (cl-pop y))
110 (and (not (consp x)) (equalp x y))) 113 (and (not (consp x)) (equalp x y)))
111 ((vectorp x) 114 ((vectorp x)
112 (and (vectorp y) (= (length x) (length y)) 115 (and (vectorp y) (= (length x) (length y))
113 (let ((i (length x))) 116 (let ((i (length x)))
114 (while (and (>= (setq i (1- i)) 0) 117 (while (and (>= (setq i (1- i)) 0)