From: Heime via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: Heime via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org>
Subject: pcase with progn
Date: Wed, 27 Nov 2024 18:45:22 +0000 [thread overview]
Message-ID: <jHq9rWXqRnWofI7NLTSS7ikqw0LlI6OYjd4IX8MkL_mpUKa4LPtPOTO7TX9moxEgn-msXi3po0kbMQtbMT-CuyBwD9IbYgAoFpvQuZwzj0I=@protonmail.com> (raw)
Does pcase require progn for multiple commands?
(defun pola-symbol-name (sbl &optional sel)
"Get the string representation of symbol SBL. If it is
already a string, return it unchanged."
(cond
((symbolp sbl) (symbol-name sbl))
((stringp sbl) sbl)
(t (pcase sel
('nil (error "SBL must be a symbol or a string: %s" sbl))
('nil-output nil)
('default "unknown")
('warn (progn
(message "SBL not symbol nor string: %s" sbl)
nil))
('pass sbl)
(_ (error "SEL Invalid: %s" sel))))))
Sent with Proton Mail secure email.
next reply other threads:[~2024-11-27 18:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-27 18:45 Heime via Users list for the GNU Emacs text editor [this message]
2024-11-27 19:39 ` pcase with progn Scott Bell
2024-11-27 20:50 ` Heime via Users list for the GNU Emacs text editor
2024-11-27 22:33 ` Scott Bell
2024-11-28 14:44 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='jHq9rWXqRnWofI7NLTSS7ikqw0LlI6OYjd4IX8MkL_mpUKa4LPtPOTO7TX9moxEgn-msXi3po0kbMQtbMT-CuyBwD9IbYgAoFpvQuZwzj0I=@protonmail.com' \
--to=help-gnu-emacs@gnu.org \
--cc=heimeborgia@protonmail.com \
/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.
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.