diff options
author | Glenn Morris <rgm@gnu.org> | 2019-12-25 07:50:19 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2019-12-25 07:50:19 -0800 |
commit | 2bb7bb4abfa5667ba5cd220ca3dd89731f33ff09 (patch) | |
tree | 3317f66921cf3cd0d787816217bfd056e2bc2a3f /lisp/emacs-lisp/map.el | |
parent | 93d4725f9ceabfaf40e75ecf2e28b67789741941 (diff) | |
parent | ca6a53d3bc91d6fef9aa872495ab74298ce91bee (diff) | |
download | emacs-2bb7bb4abfa5667ba5cd220ca3dd89731f33ff09.tar.gz emacs-2bb7bb4abfa5667ba5cd220ca3dd89731f33ff09.tar.bz2 emacs-2bb7bb4abfa5667ba5cd220ca3dd89731f33ff09.zip |
Merge from origin/emacs-27
ca6a53d3bc Don't default to showing X-Faces externally in Gnus
dbf4b5b2d0 Fix manual typo in Special Read Syntax
a9fe6dfa90 Fix problem with emacs -nw / eww / svg
0de63092c8 Clarify base64 requirements and say what {en,de}code_codin...
6184aa003f ; * etc/NEWS: Fix boring oddities.
51ea32dd12 * src/emacs-module.h.in: Add reference to manual.
75d0cef20d Trivial docstring fixes
ee12c421b6 imagemagick-types needs to initialize ImageMagick
# Conflicts:
# etc/NEWS
Diffstat (limited to 'lisp/emacs-lisp/map.el')
-rw-r--r-- | lisp/emacs-lisp/map.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/map.el b/lisp/emacs-lisp/map.el index 74927b6224f..c1db79809d1 100644 --- a/lisp/emacs-lisp/map.el +++ b/lisp/emacs-lisp/map.el @@ -141,7 +141,8 @@ In the base definition, MAP can be an alist, hash-table, or array." "Associate KEY with VALUE in MAP and return VALUE. If KEY is already present in MAP, replace the associated value with VALUE. -When MAP is a list, test equality with TESTFN if non-nil, otherwise use `eql'. +When MAP is a list, test equality with TESTFN if non-nil, +otherwise use `eql'. MAP can be a list, hash-table or array." (declare (obsolete "use map-put! or (setf (map-elt ...) ...) instead" "27.1")) @@ -287,7 +288,7 @@ The default implementation delegates to `map-length'." ;; so specifying `testfn' here is problematic: e.g. for hash-tables ;; we shouldn't use `gethash' unless `testfn' is the same as the map's own ;; test function! - "Return non-nil If and only if MAP contains KEY. + "Return non-nil if and only if MAP contains KEY. TESTFN is deprecated. Its default depends on MAP. The default implementation delegates to `map-do'." (unless testfn (setq testfn #'equal)) @@ -325,7 +326,7 @@ The default implementation delegates to `map-apply'." nil)) (cl-defgeneric map-every-p (pred map) - "Return non-nil if (PRED key val) is non-nil for all elements of the map MAP. + "Return non-nil if (PRED key val) is non-nil for all elements of MAP. The default implementation delegates to `map-apply'." ;; FIXME: Not sure if there's much benefit to defining it as defgeneric, ;; since as defined, I can't think of a map-type where we could provide an @@ -475,8 +476,8 @@ KEYWORD-ARGS are forwarded to `make-hash-table'." (cl-defmethod map-into (map (type (head hash-table))) "Convert MAP into a hash-table. -TYPE is a list where the car is `hash-table' and the cdr are the keyword-args -forwarded to `make-hash-table'. +TYPE is a list where the car is `hash-table' and the cdr are the +keyword-args forwarded to `make-hash-table'. Example: (map-into '((1 . 3)) '(hash-table :test eql))" |