From: Heime <heimeborgia@protonmail.com>
To: Heime via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org>
Subject: Setting numeric value according to symbol with cl-case
Date: Sun, 30 Oct 2022 10:21:47 +0000 [thread overview]
Message-ID: <j_ze5sRZ-WJTVl5ktHSKP8Y403bBqRQr4VvUTDI3AZ0u9i_bfJIUIckSkQ5FHSkcX2zInfHDZvyrkLnFJq5Nfa7lgUrcKIpfDiSON8KfWq0=@protonmail.com> (raw)
Is this a good way to set a numeric value to a variable depending
on a whether another variable was set to a particular symbol. Have
been scrutinising the possibility of setting a value to the symbol
itself, but do not know how.
(setq mbcomplt
(cl-case armg
('auto 0)
('icomplt-horz 1)
('icomplt-vert 2)
('ivy 3)
('vertico 4)
('helm 5)))
next reply other threads:[~2022-10-30 10:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-30 10:21 Heime [this message]
2022-10-30 10:53 ` Setting numeric value according to symbol with cl-case Emanuel Berg
2022-10-30 12:57 ` Stefan Monnier via Users list for the GNU Emacs text editor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='j_ze5sRZ-WJTVl5ktHSKP8Y403bBqRQr4VvUTDI3AZ0u9i_bfJIUIckSkQ5FHSkcX2zInfHDZvyrkLnFJq5Nfa7lgUrcKIpfDiSON8KfWq0=@protonmail.com' \
--to=heimeborgia@protonmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).