diff options
author | Stefan Kangas <stefan@marxist.se> | 2020-10-25 00:51:23 +0200 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2020-10-25 00:53:17 +0200 |
commit | b6a41c76a5a4b95a1cf62d708e33e8b7472302aa (patch) | |
tree | 60caaa5d92a98b7c3078b2ef6e7461755485f348 /lisp/emacs-lisp | |
parent | 32e427cca112f5471356c1fa95ba1ed256d200b6 (diff) | |
download | emacs-b6a41c76a5a4b95a1cf62d708e33e8b7472302aa.tar.gz emacs-b6a41c76a5a4b95a1cf62d708e33e8b7472302aa.tar.bz2 emacs-b6a41c76a5a4b95a1cf62d708e33e8b7472302aa.zip |
Add shortdoc group for hash-table
* lisp/emacs-lisp/shortdoc.el (hash-table): New shortdoc group.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/shortdoc.el | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el index 7ae6d53a21b..af17a7bf971 100644 --- a/lisp/emacs-lisp/shortdoc.el +++ b/lisp/emacs-lisp/shortdoc.el @@ -380,6 +380,37 @@ There can be any number of :example/:result elements." :no-eval (set-file-acl "/tmp/foo" "group::rxx") :eg-result t)) +(define-short-documentation-group hash-table + "Hash Table Basics" + (make-hash-table + :no-eval (make-hash-table) + :result-string "#s(hash-table ...)") + (puthash + :no-eval (puthash 'key "value" table)) + (gethash + :no-eval (gethash 'key table) + :eg-result "value") + (remhash + :no-eval (remhash 'key table) + :result nil) + (clrhash + :no-eval (clrhash table) + :result-string "#s(hash-table ...)") + (maphash + :no-eval (maphash (lambda (key value) (message value)) table) + :result nil) + "Other Hash Table Functions" + (hash-table-p + :eval (hash-table-p 123)) + (copy-hash-table + :no-eval (copy-hash-table table) + :result-string "#s(hash-table ...)") + (hash-table-count + :no-eval (hash-table-count table) + :eg-result 15) + (hash-table-size + :no-eval (hash-table-size table) + :eg-result 65)) (define-short-documentation-group list "Making Lists" |