bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14935: 24.3.50; pcase (or) UPAT fails?


From: Stefan Monnier
Subject: bug#14935: 24.3.50; pcase (or) UPAT fails?
Date: Tue, 23 Jul 2013 09:44:49 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> This doesn't:

> (pcase (list 23 nil "%")
>   (`(,scale nil (or "^" "%")) (message "%s" scale))
>   (_ (message "failed")))

> Is this a bug?

No, it's normal.  The third pattern matches a list of 3 elements (the
first being the symbol `or').  You probably meant to do

   (pcase (list 23 nil "%")
     (`(,scale nil ,(or `"^" `"%")) (message "%s" scale))
     (_ (message "failed")))


-- Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]