diff options
| author | John Wiegley | 2016-01-21 23:28:50 -0800 |
|---|---|---|
| committer | John Wiegley | 2016-01-21 23:28:50 -0800 |
| commit | fb7c5812fb5e082ac92fb2b50e51a252eea5ef90 (patch) | |
| tree | bf9f51adfa6b92ee9e4d28047ea446972b59a921 | |
| parent | 4763c774c31deaab83f65a2499a0e39ca4207eeb (diff) | |
| download | emacs-fb7c5812fb5e082ac92fb2b50e51a252eea5ef90.tar.gz emacs-fb7c5812fb5e082ac92fb2b50e51a252eea5ef90.zip | |
Minor correction to pcase docstring
| -rw-r--r-- | lisp/emacs-lisp/pcase.el | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el index 9d88e87f040..a2e05245c31 100644 --- a/lisp/emacs-lisp/pcase.el +++ b/lisp/emacs-lisp/pcase.el | |||
| @@ -119,7 +119,7 @@ A significant difference from `cl-destructuring-bind' is that, if | |||
| 119 | a pattern match fails, the next case is tried until either a | 119 | a pattern match fails, the next case is tried until either a |
| 120 | succesful match is found or there are no more cases. | 120 | succesful match is found or there are no more cases. |
| 121 | 121 | ||
| 122 | Another difference is that pattern elements may be quoted, | 122 | Another difference is that pattern elements may be backquoted, |
| 123 | meaning they must match exactly: The pattern (\\='foo \\='bar) | 123 | meaning they must match exactly: The pattern (\\='foo \\='bar) |
| 124 | matches only against two element lists containing the symbols | 124 | matches only against two element lists containing the symbols |
| 125 | `foo' and `bar' in that order. (As a short-hand, atoms always | 125 | `foo' and `bar' in that order. (As a short-hand, atoms always |
| @@ -128,9 +128,8 @@ quoted). | |||
| 128 | 128 | ||
| 129 | Lastly, a pattern can be logical, such as (pred numberp), that | 129 | Lastly, a pattern can be logical, such as (pred numberp), that |
| 130 | matches any number-like element; or the symbol `_', that matches | 130 | matches any number-like element; or the symbol `_', that matches |
| 131 | anything. Patterns may also be backquoted (with \\=`), so that | 131 | anything. Also, when patterns are backquoted, a comma may be |
| 132 | comma (\\=,) can be used to introduce logical patterns inside | 132 | used to introduce logical patterns inside backquoted patterns. |
| 133 | quoted patterns. | ||
| 134 | 133 | ||
| 135 | The complete list of standard patterns is as follows: | 134 | The complete list of standard patterns is as follows: |
| 136 | 135 | ||
| @@ -148,7 +147,7 @@ The complete list of standard patterns is as follows: | |||
| 148 | (let PAT EXP) matches if EXP matches PAT. | 147 | (let PAT EXP) matches if EXP matches PAT. |
| 149 | (app FUN PAT) matches if FUN applied to the object matches PAT. | 148 | (app FUN PAT) matches if FUN applied to the object matches PAT. |
| 150 | 149 | ||
| 151 | Additional patterns may be defined using `pcase-defmacro'. | 150 | Additional patterns can be defined using `pcase-defmacro'. |
| 152 | 151 | ||
| 153 | The FUN argument in the `app' pattern may have the following forms: | 152 | The FUN argument in the `app' pattern may have the following forms: |
| 154 | SYMBOL or (lambda ARGS BODY) in which case it's called with one argument. | 153 | SYMBOL or (lambda ARGS BODY) in which case it's called with one argument. |