* Re: [Emacs-diffs] emacs-25 fb7c581: Minor correction to pcase docstring
[not found] ` <E1aMW9a-0006Yp-It@vcs.savannah.gnu.org>
@ 2016-01-22 14:46 ` Stefan Monnier
2016-01-22 17:52 ` John Wiegley
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2016-01-22 14:46 UTC (permalink / raw)
To: emacs-devel; +Cc: John Wiegley
> +of values. For example, the pattern (foo bar) matches any two
Hmm...no.
> meaning they must match exactly: The pattern (\\='foo \\='bar)
> matches only against two element lists containing the symbols
Hmm...still not.
If you want (...) to mean "the pattern that matches a list ..." then you
need a backquote in front:
`(foo bar) matches a list containing the symbols `foo' and `bar'.
`(,foo ,bar) matches any two-element list.
The intuition is that the pattern matches elements that could be the
result of evaluating an expression of the same shape.
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Emacs-diffs] emacs-25 fb7c581: Minor correction to pcase docstring
2016-01-22 14:46 ` [Emacs-diffs] emacs-25 fb7c581: Minor correction to pcase docstring Stefan Monnier
@ 2016-01-22 17:52 ` John Wiegley
0 siblings, 0 replies; 2+ messages in thread
From: John Wiegley @ 2016-01-22 17:52 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
>>>>> Stefan Monnier <monnier@iro.umontreal.ca> writes:
> If you want (...) to mean "the pattern that matches a list ..." then you
> need a backquote in front:
Thanks, Stefan, I didn't test fully enough before committing. I didn't realize
that using a list in a pattern always requires a backquote, though I can see
now why it does. I'll fix the docstring.
--
John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-01-22 17:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20160122072906.25181.94661@vcs.savannah.gnu.org>
[not found] ` <E1aMW9a-0006Yp-It@vcs.savannah.gnu.org>
2016-01-22 14:46 ` [Emacs-diffs] emacs-25 fb7c581: Minor correction to pcase docstring Stefan Monnier
2016-01-22 17:52 ` John Wiegley
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.