diff options
author | Dave Love <fx@gnu.org> | 2000-02-02 15:25:07 +0000 |
---|---|---|
committer | Dave Love <fx@gnu.org> | 2000-02-02 15:25:07 +0000 |
commit | b22a152b02d897c5ba295a06832468fbd43c5c9d (patch) | |
tree | f3f7c4c8c2e795a700b1d66c247bc7868c597d6b /lisp/emacs-lisp | |
parent | d240a249cad17efdec437a35e36b84def86f6deb (diff) | |
download | emacs-b22a152b02d897c5ba295a06832468fbd43c5c9d.tar.gz emacs-b22a152b02d897c5ba295a06832468fbd43c5c9d.tar.bz2 emacs-b22a152b02d897c5ba295a06832468fbd43c5c9d.zip |
(cl-builtin-gethash, cl-builtin-remhash, cl-builtin-clrhash)
(cl-builtin-maphash): Remove definitions. Use the new builtins
directly.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/cl-extra.el | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el index 96636a9b6d2..9c6e17e9fec 100644 --- a/lisp/emacs-lisp/cl-extra.el +++ b/lisp/emacs-lisp/cl-extra.el @@ -681,25 +681,12 @@ The Common Lisp keywords :rehash-size and :rehash-threshold are ignored." (t (assoc* key sym ':test test)))) sym str))) -(defvar cl-builtin-gethash - (if (and (fboundp 'gethash) (subrp (symbol-function 'gethash))) - (symbol-function 'gethash) 'cl-not-hash-table)) -(defvar cl-builtin-remhash - (if (and (fboundp 'remhash) (subrp (symbol-function 'remhash))) - (symbol-function 'remhash) 'cl-not-hash-table)) -(defvar cl-builtin-clrhash - (if (and (fboundp 'clrhash) (subrp (symbol-function 'clrhash))) - (symbol-function 'clrhash) 'cl-not-hash-table)) -(defvar cl-builtin-maphash - (if (and (fboundp 'maphash) (subrp (symbol-function 'maphash))) - (symbol-function 'maphash) 'cl-not-hash-table)) - (defun cl-gethash (key table &optional def) "Look up KEY in HASH-TABLE; return corresponding value, or DEFAULT." (if (consp table) (let ((found (cl-hash-lookup key table))) (if (car found) (cdr (car found)) def)) - (funcall cl-builtin-gethash key table def))) + (gethash key table def))) (defun cl-puthash (key val table) (if (consp table) @@ -730,8 +717,8 @@ The Common Lisp keywords :rehash-size and :rehash-threshold are ignored." (setcar (cdr (cdr (cdr table))) (1- (nth 3 table))) (if (nth 2 found) (set (intern (nth 2 found) (nth 2 table)) del) (set (nth 2 table) del)) t))) - (prog1 (not (eq (funcall cl-builtin-gethash key table '--cl--) '--cl--)) - (funcall cl-builtin-remhash key table)))) + (prog1 (not (eq (gethash key table '--cl--) '--cl--)) + (remhash key table)))) (defun cl-clrhash (table) "Clear HASH-TABLE." @@ -741,7 +728,7 @@ The Common Lisp keywords :rehash-size and :rehash-threshold are ignored." (if (symbolp (nth 2 table)) (set (nth 2 table) nil) (setcar (cdr (cdr table)) (make-vector (length (nth 2 table)) 0))) (setcar (cdr (cdr (cdr table))) 0)) - (funcall cl-builtin-clrhash table)) + (clrhash table)) nil) (defun cl-maphash (cl-func cl-table) @@ -756,7 +743,7 @@ The Common Lisp keywords :rehash-size and :rehash-threshold are ignored." (setq cl-x (cdr cl-x))))) (if (symbolp (nth 2 cl-table)) (vector (nth 2 cl-table)) (nth 2 cl-table))) - (funcall cl-builtin-maphash cl-func cl-table))) + (maphash cl-func cl-table))) (defun cl-hash-table-count (table) "Return the number of entries in HASH-TABLE." |