X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fcl-extra.el;h=2acba6ac533c6bfe0b866ab4ec43bbf71ce158a2;hb=a6f3dc9882f7eec7fbbe4700581bace298ab3335;hp=cac76f9ab40e34e533199aca776fc79cb09bd9f8;hpb=716cfba952c1dc0d2cf5c968971f3780ba728a89;p=chise%2Fxemacs-chise.git.1 diff --git a/lisp/cl-extra.el b/lisp/cl-extra.el index cac76f9..2acba6a 100644 --- a/lisp/cl-extra.el +++ b/lisp/cl-extra.el @@ -76,8 +76,8 @@ TYPE is a Common Lisp type specifier." ((eq type 'array) (if (arrayp x) x (vconcat x))) ((and (eq type 'character) (stringp x) (= (length x) 1)) (aref x 0)) ((and (eq type 'character) (symbolp x)) (coerce (symbol-name x) type)) - ((and (eq type 'character) (numberp x) (char-or-char-int-p x) - (int-char x))) + ((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)) ((eq type 'bit-vector) (if (bit-vector-p x) x (apply 'bit-vector (append x nil)))) @@ -638,12 +638,7 @@ argument VECP, this copies vectors as well as conses." ;; XEmacs: our `get' groks DEFAULT. (defalias 'get* 'get) - -(defun getf (plist property &optional default) - "Search PLIST for property PROPERTY; return its value or DEFAULT. -PLIST is a list of the sort returned by `symbol-plist'." - (setplist '--cl-getf-symbol-- plist) - (get '--cl-getf-symbol-- property default)) +(defalias 'getf 'plist-get) (defun cl-set-getf (plist tag val) (let ((p plist)) @@ -655,17 +650,6 @@ PLIST is a list of the sort returned by `symbol-plist'." (while (and (cdr p) (not (eq (car (cdr p)) tag))) (setq p (cdr (cdr p)))) (and (cdr p) (progn (setcdr p (cdr (cdr (cdr p)))) t)))) -(defun cl-remprop (sym tag) - "Remove from SYMBOL's plist the property PROP and its value." - (let ((plist (symbol-plist sym))) - (if (and plist (eq tag (car plist))) - (progn (setplist sym (cdr (cdr plist))) t) - (cl-do-remf plist tag)))) -(or (and (fboundp 'remprop) (subrp (symbol-function 'remprop))) - (defalias 'remprop 'cl-remprop)) - - - ;;; Hash tables. ;; The `regular' Common Lisp hash-table stuff has been moved into C.