[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [External] : Re: Functions with multiple optional arguments
From: |
Drew Adams |
Subject: |
RE: [External] : Re: Functions with multiple optional arguments |
Date: |
Mon, 17 Oct 2022 16:52:08 +0000 |
> I want the last argument to use a symbol. Would you be so kind to scrutinise
> my implementation please.
>
> (defun mesgb (mesg &optional bufr actm)
> "Display message except on 'nogo symbol."
> (let ((bfr (or bufr "*Gundit*"))
> (acm (or actm 'go)))
>
> (when (not (eq 'nogo acm))
> (with-current-buffer (get-buffer-create bfr)
> (org-mode)
> (insert mesg))) ))
(defun mesgb (message &optional buffer actm)
"Show MESSAGE, unless ACTM is the symbol `nogo'."
(setq buffer (or buffer "*Gundit*")
actm (or actm 'go))
(unless (eq 'actm 'nogo)
(with-current-buffer (get-buffer-create buffer))
(org-mode)
(insert message))))
Re: Functions with multiple optional arguments, Emanuel Berg, 2022/10/17
- Re: Functions with multiple optional arguments, Jean Louis, 2022/10/17
- Re: Functions with multiple optional arguments, Emanuel Berg, 2022/10/18
- Re: Functions with multiple optional arguments, Jean Louis, 2022/10/20
- Re: Functions with multiple optional arguments, Emanuel Berg, 2022/10/22
- Re: Functions with multiple optional arguments, Jean Louis, 2022/10/23
- Re: Functions with multiple optional arguments, Emanuel Berg, 2022/10/24
- Re: Functions with multiple optional arguments, Emanuel Berg, 2022/10/25