unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Checking conditions unrelated to expression
@ 2024-12-08 12:05 Heime via Users list for the GNU Emacs text editor
  2024-12-08 12:31 ` Thibaut Verron
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Heime via Users list for the GNU Emacs text editor @ 2024-12-08 12:05 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor

It looks like pcase can only be used with some variable condition

This will check condition of featr

  (pcase featr
     ('this (do-this))
     ('that (do-that))
     (_ (message "some message"))

What if I want to check a number of conditions, not all dependent upon
featr, what should one do? 

Suppose I want to test (eq duck 'quack), cannot use a pcase because tests
are dependent upon featr.

  (pcase featr
     ('this (do-this))
     ('that (do-that))
     (_ (message "some message"))






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-12-08 19:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-08 12:05 Checking conditions unrelated to expression Heime via Users list for the GNU Emacs text editor
2024-12-08 12:31 ` Thibaut Verron
2024-12-08 14:49   ` Heime via Users list for the GNU Emacs text editor
2024-12-08 16:01 ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-12-08 19:19 ` Michael Heerdegen via Users list for the GNU Emacs text editor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).