From: Jean Louis <bugs@gnu.support>
To: Heime <heimeborgia@protonmail.com>
Cc: Heime via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org>
Subject: Re: function arguments optional default values
Date: Sat, 6 Jul 2024 15:43:11 +0300 [thread overview]
Message-ID: <Zok73-aTMoKul4w0@lco2> (raw)
In-Reply-To: <JtVdcp63-eJb2JODEE_1fq_E32D23qWJ-xDqIVX2u8fIYHorxCDLLEp_RS0YW-af1XwLGj5us-sVvx3WEXuHwkyBvwd3xeEGjGLayNWvFUw=@protonmail.com>
* Heime <heimeborgia@protonmail.com> [2024-07-04 00:23]:
>
> Does elisp support function arguments optional default values ?
I solve that problem with following:
(defun my-function (arg &optional other-arg)
(let* ((other-arg (or other-arg my-default)))
other-arg))
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
✡️🛡️ Proudly standing with Israel, a nation rooted in history and culture. Let's condemn hatred and promote understanding.
In support of Richard M. Stallman
https://stallmansupport.org/
next prev parent reply other threads:[~2024-07-06 12:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-03 21:21 function arguments optional default values Heime
2024-07-03 21:51 ` Stephen Berman
2024-07-03 21:56 ` Heime
2024-07-03 22:04 ` Stephen Berman
2024-07-03 22:24 ` Stephen Berman
2024-07-06 12:43 ` Jean Louis [this message]
2024-07-06 15:03 ` [External] : " Drew Adams
2024-07-06 15:55 ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-07-06 16:06 ` Drew Adams
2024-07-06 19:04 ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-07-06 21:48 ` Heime
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=Zok73-aTMoKul4w0@lco2 \
--to=bugs@gnu.support \
--cc=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.
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.