diff options
| author | Mattias EngdegÄrd | 2024-02-11 18:30:22 +0100 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2024-02-23 13:02:27 +0100 |
| commit | 6a182658a533acab94d8fa0aec3e2b7a4f7d6a93 (patch) | |
| tree | 566d832e87c1b4aa8b0f4ca6e0820c0de03cbe39 /lisp/obarray.el | |
| parent | 3beaa3131e78bea618cb93d03c5d8b0f8977fb94 (diff) | |
| download | emacs-6a182658a533acab94d8fa0aec3e2b7a4f7d6a93.tar.gz emacs-6a182658a533acab94d8fa0aec3e2b7a4f7d6a93.zip | |
Add obarray-clear and use it
* lisp/obarray.el (obarray-clear): New.
* lisp/abbrev.el (clear-abbrev-table):
* lisp/vc/vc.el (vc-clear-context): Use it instead of assuming the
obarray is a vector that can be 0-filled.
* test/lisp/obarray-tests.el (obarray-clear): New test.
Diffstat (limited to 'lisp/obarray.el')
| -rw-r--r-- | lisp/obarray.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/obarray.el b/lisp/obarray.el index a26992df8e2..e1ebb2ade51 100644 --- a/lisp/obarray.el +++ b/lisp/obarray.el | |||
| @@ -66,5 +66,10 @@ Return t on success, nil otherwise." | |||
| 66 | "Call function FN on every symbol in obarray OB and return nil." | 66 | "Call function FN on every symbol in obarray OB and return nil." |
| 67 | (mapatoms fn ob)) | 67 | (mapatoms fn ob)) |
| 68 | 68 | ||
| 69 | (defun obarray-clear (ob) | ||
| 70 | "Remove all symbols from obarray OB." | ||
| 71 | ;; FIXME: This doesn't change the symbols to uninterned status. | ||
| 72 | (fillarray ob 0)) | ||
| 73 | |||
| 69 | (provide 'obarray) | 74 | (provide 'obarray) |
| 70 | ;;; obarray.el ends here | 75 | ;;; obarray.el ends here |