From 2821ca31aeb88459835bc48822e7bfa252287842 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gerd=20M=C3=B6llmann?= Date: Fri, 14 Oct 2022 16:21:03 +0200 Subject: [PATCH] Use packages instead of obarrays in obarray.el --- lisp/obarray.el | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) 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 -- 2.39.2