Eli Zaretskii writes: > Ping! Ping! > >> Cc: mekeor@posteo.de, monnier@iro.umontreal.ca, 71503@debbugs.gnu.org >> Date: Sat, 06 Jul 2024 10:38:00 +0300 >> From: Eli Zaretskii >> >> Ping! >> >> > Cc: mekeor@posteo.de, 71503@debbugs.gnu.org >> > Date: Sat, 22 Jun 2024 11:37:02 +0300 >> > From: Eli Zaretskii >> > >> > > Cc: 71503@debbugs.gnu.org >> > > From: Philip Kaludercic >> > > Date: Fri, 14 Jun 2024 08:42:25 +0000 >> > > >> > > Mekeor Melire writes: >> > > >> > > > I was expecting these two expressions to evaluate to the same value. >> > > > First, we call `pcase' on a value with a pattern involving `and' and >> > > > `guard': >> > > > >> > > > (pcase "value" >> > > > ((and v (guard (string= "not-value" v))) v)) >> > > > ;; => nil >> > > > >> > > > Second, let's use the same value and pattern, but this time using >> > > > `pcase-lambda': >> > > > >> > > > (funcall >> > > > (pcase-lambda >> > > > ((and v (guard (string= "not-value" v)))) v) >> > > > "value") >> > > > ;; => "value" >> > > > >> > > > Am I missing something or is this a bug? >> > > >> > > The difference is that pcase-lambda doesn't do case-distinction, but >> > > just pattern matching/destruncting. So if the pattern-matching fails, >> > > then the variable is just not bound, instead of the entire expression >> > > falling back to returning no value/nil. I am guessing you wanted to >> > > have something like Scheme's `case-lambda'[0]? Or we could clarify this >> > > point in the docstring. >> > >> > Would you mind suggesting a clarification for the doc string (and the >> > ELisp manual as well)? Sorry, I didn't realise you were pining me. I was thinking of something like