all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Adam Porter <adam@alphapapa.net>
To: incal@dataswamp.org
Cc: emacs-devel@gnu.org
Subject: Re: optional argument defaults in `cl-defun' vs old way - warning, discrepancy!
Date: Fri, 6 Oct 2023 04:36:39 -0500	[thread overview]
Message-ID: <8149455e-40e4-4566-8a3c-96834e803be0@alphapapa.net> (raw)
In-Reply-To: <871qe832jl.fsf@dataswamp.org>

Hi Emanuel,

Yes, this is how CL optional and keyword arguments work.  See (info 
"(cl) Argument Lists") and search for "SVAR".  It does require a bit 
more diligence in some cases, but it also provides more flexibility. 
And FWIW, I think I actually have to check the SVAR something like 1% of 
the time I use CL argument lists, or maybe less.  So that "gotcha" 
rarely "gets you" in practice.  :)

--Adam



  reply	other threads:[~2023-10-06  9:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-06  2:30 optional argument defaults in `cl-defun' vs old way - warning, discrepancy! Emanuel Berg
2023-10-06  9:36 ` Adam Porter [this message]
2023-10-07 13:01   ` Emanuel Berg
2023-10-06 13:54 ` [External] : " Drew Adams
2023-10-07 13:12   ` Emanuel Berg
2023-10-06 21:37 ` Richard Stallman

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=8149455e-40e4-4566-8a3c-96834e803be0@alphapapa.net \
    --to=adam@alphapapa.net \
    --cc=emacs-devel@gnu.org \
    --cc=incal@dataswamp.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.