Only to show that this could be a XY-problem (TLDR: If we knew better what you want to do we could give you better help.):
If you are testing var
in each of the pcase
cases you could include that variable in the pcase
-conditions:
(pcase (list grapheme var)
('("dinkus" "this")
"this value")
(`("dinkus" ,_)
"that value"))
Disclaimer: I actually wanted to write this text as a comment. But, that comment turned out to be unreadable because of the missing newlines in the code. So I ended up writing an answer. But, maybe it is even acceptable as one of the possible answers.
(insert (if (equal var "this") "this" "that"))
or(insert (or (and (equal var "this") "this") "that"))
Sometimes one uses theand
-or
-construct when the expression returns something.pcase
statement with dozens of possible choices to insert either a latex character or a greek UTF-8 character. If I'm right about this, then this is the wrong question to ask. Help us by telling us the real problem you're trying to solve.