[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pcase and minus-sign
From: |
Michael Heerdegen |
Subject: |
Re: pcase and minus-sign |
Date: |
Wed, 30 Nov 2016 14:31:57 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
> Thanks, that helps. Seems it relates to the following in docstring:
>
> SYMBOL matches anything and binds it to SYMBOL.
Exactly.
> Now if I use some arbitrary char, like "a",
>
> (defun foo (arg)
> (interactive "P")
> (pcase arg
> (a (message "%s" "ARG was `a'"))
> (1 (message "%s" "ARG was `1'"))
> ('- (message "%s" "ARG was minus-sign"))
> (_ (message "%s" "ARG not minus-sign"))))
>
> It picks that a-branch at any case - as documented but strange.
It's not so strange anymore if you correct the message string ;-)
Michael.
- pcase and minus-sign, Andreas Röhler, 2016/11/30
- Re: pcase and minus-sign, Joost Kremers, 2016/11/30
- Re: pcase and minus-sign, Andreas Röhler, 2016/11/30
- Re: pcase and minus-sign,
Michael Heerdegen <=
- Re: pcase and minus-sign, tomas, 2016/11/30
- Re: pcase and minus-sign, Joost Kremers, 2016/11/30
- Re: pcase and minus-sign, Andreas Röhler, 2016/11/30
- Re: pcase and minus-sign, Michael Heerdegen, 2016/11/30
- Re: pcase and minus-sign, Joost Kremers, 2016/11/30