unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* pcase with progn
@ 2024-11-27 18:45 Heime via Users list for the GNU Emacs text editor
  2024-11-27 19:39 ` Scott Bell
  2024-11-28 14:44 ` Stefan Monnier via Users list for the GNU Emacs text editor
  0 siblings, 2 replies; 5+ messages in thread
From: Heime via Users list for the GNU Emacs text editor @ 2024-11-27 18:45 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor


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.



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

end of thread, other threads:[~2024-11-28 14:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-27 18:45 pcase with progn Heime via Users list for the GNU Emacs text editor
2024-11-27 19:39 ` 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

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).