all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.