summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/map.el
diff options
context:
space:
mode:
authorNicolas Petton <nicolas@petton.fr>2015-10-14 09:37:59 +0200
committerNicolas Petton <nicolas@petton.fr>2015-10-14 09:40:10 +0200
commitb5e2d7495017e0d87de331f41838810b72730942 (patch)
treef94249685d0b4b65a6619b7d22b3baa492b19c22 /lisp/emacs-lisp/map.el
parente668176e7d89e885902287da18c69297bf04fed3 (diff)
downloademacs-b5e2d7495017e0d87de331f41838810b72730942.tar.gz
Better docstrings in seq.el and map.el
* lisp/emacs-lisp/map.el: * lisp/emacs-lisp/seq.el: Improve the docstring for the pcase patterns.
Diffstat (limited to 'lisp/emacs-lisp/map.el')
-rw-r--r--lisp/emacs-lisp/map.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/map.el b/lisp/emacs-lisp/map.el
index ea56efefe97..7564463e6c6 100644
--- a/lisp/emacs-lisp/map.el
+++ b/lisp/emacs-lisp/map.el
@@ -46,11 +46,15 @@
(pcase-defmacro map (&rest args)
"pcase pattern matching map elements.
+
Matches if the object is a map (list, hash-table or array), and
-binds values from ARGS to their corresponding elements of the map.
+each PATTERN matches the corresponding elements of the map.
+
+Supernumerary elements of the map are ignore if less ARGS are
+given, and the match does not fail.
-ARGS can be a list elements of the form (KEY PAT), in which case
-KEY in an unquoted form.
+ARGS can be a list of the form (KEY PAT), in which case KEY in an
+unquoted form.
ARGS can also be a list of symbols, which stands for ('SYMBOL
SYMBOL)."