pkg update and first config fix
org-brain not working, add org-roam
This commit is contained in:
23
lisp/ht.el
23
lisp/ht.el
@@ -4,8 +4,8 @@
|
||||
|
||||
;; Author: Wilfred Hughes <me@wilfred.me.uk>
|
||||
;; Version: 2.4
|
||||
;; Package-Version: 20210119.741
|
||||
;; Package-Commit: c4c1be487d6ecb353d07881526db05d7fc90ea87
|
||||
;; Package-Version: 20221031.705
|
||||
;; Package-Commit: ef768ccdeb8159814628ab0e2714e7dc8d9674fa
|
||||
;; Keywords: hash table, hash map, hash
|
||||
;; Package-Requires: ((dash "2.12.0"))
|
||||
|
||||
@@ -184,7 +184,7 @@ these variables, then use `ht-map' to avoid warnings."
|
||||
(ht-map (lambda (_key value) value) table))
|
||||
|
||||
(defun ht-items (table)
|
||||
"Return a list of two-element lists '(key value) from TABLE."
|
||||
"Return a list of two-element lists \\='(key value) from TABLE."
|
||||
(declare (side-effect-free t))
|
||||
(ht-amap (list key value) table))
|
||||
|
||||
@@ -208,12 +208,12 @@ variables key and value bound."
|
||||
(puthash key (gethash key table) result)))))
|
||||
|
||||
(defun ht->plist (table)
|
||||
"Return a flat list '(key1 value1 key2 value2...) from TABLE.
|
||||
"Return a flat list \\='(key1 value1 key2 value2...) from TABLE.
|
||||
|
||||
Note that hash tables are unordered, so this cannot be an exact
|
||||
inverse of `ht<-plist'. The following is not guaranteed:
|
||||
|
||||
\(let ((data '(a b c d)))
|
||||
\(let ((data \\='(a b c d)))
|
||||
(equalp data
|
||||
(ht->plist (ht<-plist data))))"
|
||||
(declare (side-effect-free t))
|
||||
@@ -227,12 +227,12 @@ inverse of `ht<-plist'. The following is not guaranteed:
|
||||
(inline-quote (copy-hash-table ,table)))
|
||||
|
||||
(defun ht->alist (table)
|
||||
"Return a list of two-element lists '(key . value) from TABLE.
|
||||
"Return a list of two-element lists \\='(key . value) from TABLE.
|
||||
|
||||
Note that hash tables are unordered, so this cannot be an exact
|
||||
inverse of `ht<-alist'. The following is not guaranteed:
|
||||
|
||||
\(let ((data '((a . b) (c . d))))
|
||||
\(let ((data \\='((a . b) (c . d))))
|
||||
(equalp data
|
||||
(ht->alist (ht<-alist data))))"
|
||||
(declare (side-effect-free t))
|
||||
@@ -245,7 +245,7 @@ inverse of `ht<-alist'. The following is not guaranteed:
|
||||
(defalias 'ht-p 'hash-table-p)
|
||||
|
||||
(define-inline ht-contains? (table key)
|
||||
"Return 't if TABLE contains KEY."
|
||||
"Return \\='t if TABLE contains KEY."
|
||||
(declare (side-effect-free t))
|
||||
(inline-quote
|
||||
(let ((not-found-symbol (make-symbol "ht--not-found")))
|
||||
@@ -327,8 +327,11 @@ Does not compare equality predicates."
|
||||
(sentinel (make-symbol "ht-sentinel")))
|
||||
(and (equal (length keys1) (length keys2))
|
||||
(--all?
|
||||
(equal (ht-get table1 it)
|
||||
(ht-get table2 it sentinel))
|
||||
(if (ht-p (ht-get table1 it))
|
||||
(ht-equal-p (ht-get table1 it)
|
||||
(ht-get table2 it))
|
||||
(equal (ht-get table1 it)
|
||||
(ht-get table2 it sentinel)))
|
||||
keys1))))
|
||||
|
||||
(defalias 'ht-equal-p 'ht-equal?)
|
||||
|
||||
Reference in New Issue
Block a user