[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] fix/bug-3133-pcase-doc fa03d3a 06/13: (docstring) rewrite
From: |
Thien-Thi Nguyen |
Subject: |
[Emacs-diffs] fix/bug-3133-pcase-doc fa03d3a 06/13: (docstring) rewrite first para |
Date: |
Fri, 11 May 2018 12:50:51 -0400 (EDT) |
branch: fix/bug-3133-pcase-doc
commit fa03d3ab19c26135a4d7c47289e118a8bc04bfc6
Author: Thien-Thi Nguyen <address@hidden>
Commit: Thien-Thi Nguyen <address@hidden>
(docstring) rewrite first para
- introduce ‘EXPVAL’ in first line
- mention control flow in first line
- expand
- allude to iteration
- mention ‘PATTERN’, "matches", ‘CODE’
- describe return value in all cases
---
lisp/emacs-lisp/pcase.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el
index ce148c9..5505760 100644
--- a/lisp/emacs-lisp/pcase.el
+++ b/lisp/emacs-lisp/pcase.el
@@ -108,8 +108,11 @@
;;;###autoload
(defmacro pcase (exp &rest cases)
- "Evaluate EXP and attempt to match it against structural patterns.
+ "Evaluate EXP to get EXPVAL; try passing control to one of CASES.
CASES is a list of elements of the form (PATTERN CODE...).
+For the first CASE whose PATTERN \"matches\" EXPVAL,
+evaluate its CODE..., and return the value of the last form.
+If no CASE has a PATTERN that matches, return nil.
A structural PATTERN describes a template that identifies a class
of values. For example, the pattern \\=`(,foo ,bar) matches any
- [Emacs-diffs] branch fix/bug-3133-pcase-doc created (now 82791b1), Thien-Thi Nguyen, 2018/05/11
- [Emacs-diffs] fix/bug-3133-pcase-doc 7b00deb 02/13: add @cindex entry for ‘backquote’, Thien-Thi Nguyen, 2018/05/11
- [Emacs-diffs] fix/bug-3133-pcase-doc 0f42499 03/13: refine "value being matched" note, Thien-Thi Nguyen, 2018/05/11
- [Emacs-diffs] fix/bug-3133-pcase-doc edae74f 09/13: (docstring) update elisp.info ref, Thien-Thi Nguyen, 2018/05/11
- [Emacs-diffs] fix/bug-3133-pcase-doc dcb6d91 04/13: further refinement: introduce @var{expval}; GSR, Thien-Thi Nguyen, 2018/05/11
- [Emacs-diffs] fix/bug-3133-pcase-doc 80ed201 07/13: (docstring) explode "ATOM"; flatten; zonk "match themselves" sentence, Thien-Thi Nguyen, 2018/05/11
- [Emacs-diffs] fix/bug-3133-pcase-doc f927f6a 10/13: (docstring) move { 'VAL, KEYWORD, INTEGER, STRING } prior to SYMBOL, Thien-Thi Nguyen, 2018/05/11
- [Emacs-diffs] fix/bug-3133-pcase-doc 82791b1 13/13: (docstring) move ‘FUN’ para after after logical pattern table; refine, Thien-Thi Nguyen, 2018/05/11
- [Emacs-diffs] fix/bug-3133-pcase-doc c3d1896 12/13: (docstring) rework middle, Thien-Thi Nguyen, 2018/05/11
- [Emacs-diffs] fix/bug-3133-pcase-doc fdbdb64 05/13: more @var{expval} insinuation, Thien-Thi Nguyen, 2018/05/11
- [Emacs-diffs] fix/bug-3133-pcase-doc fa03d3a 06/13: (docstring) rewrite first para,
Thien-Thi Nguyen <=
- [Emacs-diffs] fix/bug-3133-pcase-doc dc67ead 08/13: (docstring) use ‘EXPVAL’ more, Thien-Thi Nguyen, 2018/05/11
- [Emacs-diffs] fix/bug-3133-pcase-doc 1181796 01/13: do ‘s/UPattern/U-pattern/g’, ‘s/QPattern/Q-pattern/g’, Thien-Thi Nguyen, 2018/05/11
- [Emacs-diffs] fix/bug-3133-pcase-doc 9449c39 11/13: pxref ‘Lambda Expressions’, Thien-Thi Nguyen, 2018/05/11