[Top][All Lists]

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

bug#31350: 27.0; `pcase' message: "Redundant pcase pattern"

From: Michael Heerdegen
Subject: bug#31350: 27.0; `pcase' message: "Redundant pcase pattern"
Date: Thu, 03 May 2018 03:16:25 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Drew Adams <address@hidden> writes:

> But the interpreted code worked as I wanted.  Apparently it was the
> first of the two clauses (not the second, which had the "unused" lexical
> variable) that was ignored when interpreting.  That lexical variable was
> used when interpreting.

Are you sure?  I get

 '(pcase foo
    (`,a `(not ,a))
    ((and a (guard (not recursivep))) `(not ,a))))

 (let ((a foo))
  `(not ,a))

and when running the pcase form, the lexical binding of RECURSIVEP is
ignored for me, e.g.

(let ((recursivep t))
  (pcase 1
    (`,a `(not ,a))
    ((and a (guard (not recursivep))) `(not ,a))))
==> (not 1)   (instead of nil)


reply via email to

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