From: Gerd Möllmann Date: Mon, 17 Oct 2022 13:24:35 +0000 (+0200) Subject: Recognize vectors as obarrays X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bbb2609103a7724bdc9940921503cfc2fbeeec7b;p=emacs.git Recognize vectors as obarrays * lisp/obarray.el (obarray-make): Ignore parameter. (obarray-size): Ignore parameter. (obarrayp): Accept vectors. --- diff --git a/lisp/obarray.el b/lisp/obarray.el index 243ab39a778..91cf6805b3f 100644 --- a/lisp/obarray.el +++ b/lisp/obarray.el @@ -30,17 +30,18 @@ (defconst obarray-default-size 59 "The value 59 is an arbitrary prime number that gives a good hash.") -(defun obarray-make (&optional size) +(defun obarray-make (&optional _size) "Return a new obarray of size SIZE or `obarray-default-size'." (make-package "obarray")) -(defun obarray-size (ob) +(defun obarray-size (_ob) "Return the number of slots of obarray OB." obarray-default-size) (defun obarrayp (object) "Return t if OBJECT is an obarray." - (packagep object)) + (or (packagep object) + (vectorp object))) ;; Don’t use obarray as a variable name to avoid shadowing. (defun obarray-get (ob name)