diff options
| author | Stefan Monnier | 2017-03-16 12:31:07 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2017-03-16 12:31:07 -0400 |
| commit | ffbb46849990bf4bf952e01b78c9a1a0ca0d4432 (patch) | |
| tree | ab2d6dbd1f93e8c42a8508342abfb379a4a14d9f /lisp/obarray.el | |
| parent | 265a5d9791bf42da0bab7bdbef4352e8d734ef31 (diff) | |
| download | emacs-ffbb46849990bf4bf952e01b78c9a1a0ca0d4432.tar.gz emacs-ffbb46849990bf4bf952e01b78c9a1a0ca0d4432.zip | |
Add obarray-size and fix tests accordingly. Use obarrayp in cedet.
* lisp/obarray.el (obarray-size): New function.
* lisp/cedet/semantic/lex-spp.el (semantic-lex-spp-symbol)
(semantic-lex-spp-save-table, semantic-lex-spp-macros):
* lisp/cedet/semantic/bovine/c.el (semantic-c-describe-environment):
Use obarrayp.
* test/lisp/obarray-tests.el (obarray-make-default-test)
(obarray-make-with-size-test): Use it.
Diffstat (limited to 'lisp/obarray.el')
| -rw-r--r-- | lisp/obarray.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/obarray.el b/lisp/obarray.el index aaffe00a072..a4631859925 100644 --- a/lisp/obarray.el +++ b/lisp/obarray.el | |||
| @@ -37,6 +37,10 @@ | |||
| 37 | (make-vector size 0) | 37 | (make-vector size 0) |
| 38 | (signal 'wrong-type-argument '(size 0))))) | 38 | (signal 'wrong-type-argument '(size 0))))) |
| 39 | 39 | ||
| 40 | (defun obarray-size (obarray) | ||
| 41 | "Return the number of slots of OBARRAY." | ||
| 42 | (length obarray)) | ||
| 43 | |||
| 40 | (defun obarrayp (object) | 44 | (defun obarrayp (object) |
| 41 | "Return t if OBJECT is an obarray." | 45 | "Return t if OBJECT is an obarray." |
| 42 | (and (vectorp object) | 46 | (and (vectorp object) |