Merge from origin/emacs-26

eb903d8 * lisp/emacs-lisp/pcase.el: Improve docstrings.
86abbb3 * lisp/emacs-lisp/rx.el (rx): Fix typo in doc string.  (Bug#3...
ced58d3 Improve doc string of 'call-process'
38f88a7 Document that generic functions cannot be commands
5aeddfa * lisp/mail/rmailsum.el (rmail-summary-output): Add lost word...
10e0fd8 Add index entries for more isearch commands/bindings (Bug#32990)
de28184 * lisp/simple.el (filter-buffer-substring): Clarify doc (Bug#...
d192c16 Fix recent change in lispref/processes.texi.
This commit is contained in:
Glenn Morris 2018-10-31 07:50:57 -07:00
commit 3a739236d0
9 changed files with 118 additions and 66 deletions

View file

@ -266,7 +266,8 @@ variable name being but a special case of it)."
(defmacro pcase-let* (bindings &rest body)
"Like `let*' but where you can use `pcase' patterns for bindings.
BODY should be an expression, and BINDINGS should be a list of bindings
of the form (PAT EXP)."
of the form (PATTERN EXP).
See `pcase-let' for discussion of how PATTERN is matched."
(declare (indent 1)
(debug ((&rest (pcase-PAT &optional form)) body)))
(let ((cached (gethash bindings pcase--memoize)))
@ -281,10 +282,11 @@ of the form (PAT EXP)."
(defmacro pcase-let (bindings &rest body)
"Like `let' but where you can use `pcase' patterns for bindings.
BODY should be a list of expressions, and BINDINGS should be a list of bindings
of the form (PAT EXP).
The macro is expanded and optimized under the assumption that those
patterns *will* match, so a mismatch may go undetected or may cause
any kind of error."
of the form (PATTERN EXP).
The PATTERNs are only used to extract data, so the code does not test
whether the data does match the corresponding patterns: a mismatch
may signal an error or may go undetected, binding variables to arbitrary
values, such as nil."
(declare (indent 1) (debug pcase-let*))
(if (null (cdr bindings))
`(pcase-let* ,bindings ,@body)
@ -302,7 +304,11 @@ any kind of error."
;;;###autoload
(defmacro pcase-dolist (spec &rest body)
"Like `dolist' but where the binding can be a `pcase' pattern.
"Superset of `dolist' where the VAR binding can be a `pcase' PATTERN.
More specifically, this is just a shorthand for the following combination
of `dolist' and `pcase-let':
(dolist (x LIST) (pcase-let ((PATTERN x)) BODY...))
\n(fn (PATTERN LIST) BODY...)"
(declare (indent 1) (debug ((pcase-PAT form) body)))
(if (pcase--trivial-upat-p (car spec))

View file

@ -1060,7 +1060,7 @@ CHAR
`chinese-two-byte' (\\cC)
`greek-two-byte' (\\cG)
`japanese-hiragana-two-byte' (\\cH)
`indian-tow-byte' (\\cI)
`indian-two-byte' (\\cI)
`japanese-katakana-two-byte' (\\cK)
`korean-hangul-two-byte' (\\cN)
`cyrillic-two-byte' (\\cY)