From: Gerd Möllmann Date: Fri, 14 Oct 2022 14:21:03 +0000 (+0200) Subject: Use packages instead of obarrays in obarray.el X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2821ca31aeb88459835bc48822e7bfa252287842;p=emacs.git Use packages instead of obarrays in obarray.el --- diff --git a/lisp/obarray.el b/lisp/obarray.el index dd62de01a8c..243ab39a778 100644 --- a/lisp/obarray.el +++ b/lisp/obarray.el @@ -32,19 +32,15 @@ (defun obarray-make (&optional size) "Return a new obarray of size SIZE or `obarray-default-size'." - (let ((size (or size obarray-default-size))) - (if (< 0 size) - (make-vector size 0) - (signal 'wrong-type-argument '(size 0))))) + (make-package "obarray")) (defun obarray-size (ob) "Return the number of slots of obarray OB." - (length ob)) + obarray-default-size) (defun obarrayp (object) "Return t if OBJECT is an obarray." - (and (vectorp object) - (< 0 (length object)))) + (packagep object)) ;; Don’t use obarray as a variable name to avoid shadowing. (defun obarray-get (ob name) @@ -67,4 +63,5 @@ Return t on success, nil otherwise." (mapatoms fn ob)) (provide 'obarray) + ;;; obarray.el ends here