emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

pkg 2821ca31ae 20/76: Use packages instead of obarrays in obarray.el


From: Gerd Moellmann
Subject: pkg 2821ca31ae 20/76: Use packages instead of obarrays in obarray.el
Date: Fri, 21 Oct 2022 00:16:10 -0400 (EDT)

branch: pkg
commit 2821ca31aeb88459835bc48822e7bfa252287842
Author: Gerd Möllmann <gerd@gnu.org>
Commit: Gerd Möllmann <gerd@gnu.org>

    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 dd62de01a8..243ab39a77 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]