comparison lisp/prim/subr.el @ 207:e45d5e7c476e r20-4b2

Import from CVS: tag r20-4b2
author cvs
date Mon, 13 Aug 2007 10:03:52 +0200
parents acd284d43ca1
children
comparison
equal deleted inserted replaced
206:d3e9274cbc4e 207:e45d5e7c476e
394 ;; not obsolete. 394 ;; not obsolete.
395 (define-function 'string= 'string-equal) 395 (define-function 'string= 'string-equal)
396 (define-function 'string< 'string-lessp) 396 (define-function 'string< 'string-lessp)
397 (define-function 'int-to-string 'number-to-string) 397 (define-function 'int-to-string 'number-to-string)
398 (define-function 'string-to-int 'string-to-number) 398 (define-function 'string-to-int 'string-to-number)
399
400 ;; These two names are a bit awkward, as they conflict with the normal
401 ;; foo-to-bar naming scheme, but CLtL2 has them, so they stay.
402 (define-function 'char-int 'char-to-int)
403 (define-function 'int-char 'int-to-char)
404
399 405
400 ;; alist/plist functions 406 ;; alist/plist functions
401 (defun plist-to-alist (plist) 407 (defun plist-to-alist (plist)
402 "Convert property list PLIST into the equivalent association-list form. 408 "Convert property list PLIST into the equivalent association-list form.
403 The alist is returned. This converts from 409 The alist is returned. This converts from
570 (setq abbrev-table-name-list 576 (setq abbrev-table-name-list
571 (cons (cons name defs) 577 (cons (cons name defs)
572 abbrev-table-name-list))))))) 578 abbrev-table-name-list)))))))
573 579
574 (defun functionp (obj) 580 (defun functionp (obj)
575 "Returns t if OBJ is a function, nil otherwise." 581 "Non-nil if OBJECT is a type of object that can be called as a function."
576 (cond 582 (cond
577 ((symbolp obj) (fboundp obj)) 583 ((symbolp obj) (fboundp obj))
578 ((subrp obj)) 584 ((subrp obj))
579 ((compiled-function-p obj)) 585 ((compiled-function-p obj))
580 ((consp obj) 586 ((consp obj)