diff options
author | Glenn Morris <rgm@gnu.org> | 2018-04-01 07:50:39 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2018-04-01 07:50:39 -0700 |
commit | d46811eeb5cca3d3de4a97f313c8485f54a55bfc (patch) | |
tree | a94a351b89a9266768ca2f8af94ced338931b7ca /lisp/emacs-lisp | |
parent | e19fde9806999f273ea42a49904a35ed4d3b3a28 (diff) | |
parent | af1624f29bc264fe0cff31c46b25b0b0c90e24bf (diff) | |
download | emacs-d46811eeb5cca3d3de4a97f313c8485f54a55bfc.tar.gz emacs-d46811eeb5cca3d3de4a97f313c8485f54a55bfc.tar.bz2 emacs-d46811eeb5cca3d3de4a97f313c8485f54a55bfc.zip |
Merge from origin/emacs-26
af1624f * lisp/net/shr.el (shr-browse-url): Doc fix. (Bug#30957)
3a451bd ; * doc/emacs/msdos.texi: Fix wording of last change.
3bc1e2f Mention `key-description' as inverse of `kbd' (Bug#30942)
e50196e Document return value of pcase (Bug#30425)
8a2466f * doc/emacs/macos.texi: Tweak grammar and capitalization.
9db62bf Distinguish free from non-free OSes
ff49d86 * doc/emacs/misc.texi (Amusements): Avoid non-printing charac...
5bab671 Fix xrefs in pdf Emacs manual
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/pcase.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el index 6cfd074cf0b..ce148c9e1a9 100644 --- a/lisp/emacs-lisp/pcase.el +++ b/lisp/emacs-lisp/pcase.el @@ -118,7 +118,9 @@ two element list, binding its elements to symbols named `foo' and A significant difference from `cl-destructuring-bind' is that, if a pattern match fails, the next case is tried until either a -successful match is found or there are no more cases. +successful match is found or there are no more cases. The CODE +expression corresponding to the matching pattern determines the +return value. If there is no match the returned value is nil. Another difference is that pattern elements may be quoted, meaning they must match exactly: The pattern \\='(foo bar) @@ -211,7 +213,8 @@ Emacs Lisp manual for more information and examples." ;;;###autoload (defmacro pcase-exhaustive (exp &rest cases) - "The exhaustive version of `pcase' (which see)." + "The exhaustive version of `pcase' (which see). +If EXP fails to match any of the patterns in CASES, an error is signaled." (declare (indent 1) (debug pcase)) (let* ((x (gensym "x")) (pcase--dontwarn-upats (cons x pcase--dontwarn-upats))) |