diff options
author | Nicolas Petton <nicolas@petton.fr> | 2015-09-06 00:45:48 +0200 |
---|---|---|
committer | Nicolas Petton <nicolas@petton.fr> | 2015-09-06 00:48:06 +0200 |
commit | a1535f938181ea137037d0233924a2c9d9e08f76 (patch) | |
tree | bad17e7d22bf19423fcf70276d2fb111ec18945a /lisp/emacs-lisp | |
parent | aeb1d6bdd54671a2e2b7dfbd22fcfe1aa19b36d1 (diff) | |
download | emacs-a1535f938181ea137037d0233924a2c9d9e08f76.tar.gz emacs-a1535f938181ea137037d0233924a2c9d9e08f76.tar.bz2 emacs-a1535f938181ea137037d0233924a2c9d9e08f76.zip |
Rename map-contains-key-p and map-some-p
Remove the "-p" suffix from both function names.
* lisp/emacs-lisp/map.el (map-contains-key, map-some): Rename the functions.
* test/automated/map-tests.el (test-map-contains-key, test-map-some):
Update both test functions.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/map.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/map.el b/lisp/emacs-lisp/map.el index 5014571a37b..4e7d3b91b16 100644 --- a/lisp/emacs-lisp/map.el +++ b/lisp/emacs-lisp/map.el @@ -249,15 +249,15 @@ MAP can be a list, hash-table or array." :array (seq-empty-p map) :hash-table (zerop (hash-table-count map)))) -(defun map-contains-key-p (map key &optional testfn) +(defun map-contains-key (map key &optional testfn) "Return non-nil if MAP contain the key KEY, nil otherwise. Equality is defined by TESTFN if non-nil or by `equal' if nil. MAP can be a list, hash-table or array." - (seq-contains-p (map-keys map) key testfn)) + (seq-contains (map-keys map) key testfn)) -(defun map-some-p (pred map) - "Return a key/value pair for which (PRED key val) is non-nil in MAP. +(defun map-some (pred map) + "Return a non-nil if (PRED key val) is non-nil for any key/value pair in MAP. MAP can be a list, hash-table or array." (catch 'map--break |