help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Functions with multiple optional arguments


From: Emanuel Berg
Subject: Re: Functions with multiple optional arguments
Date: Fri, 21 Oct 2022 05:29:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Jean Louis wrote:

>>>> CL has another way, more practical probably, to assign
>>>> default values to optional arguments and that can be used
>>>> in Elisp as well with `cl-defun' ...
>>>
>>> I keep anything like Common Lisp for Common Lisp and
>>> strive to keep Emacs Lisp functions without CL stuff for
>>> clarity of my mind.
>> 
>> If so, relax, as `cl-defun' is as much Elisp as `defun' ...
>> 
>> C-h f cl-defun RET
>> 
>> It's in cl-macs.el ...
>
> I do not load what is not needed.

Well, it's not about what's needed or not, there are obviously
several ways to do this as we have seen in this thread
already, and what `cl-defun' offers is another such solution,
one that some people would say is more clean than the
solutions with `or' and `setq'/`let' ...

> And Emacs Lisp is not Common Lisp, no need to conform to it.

Again, there is no need to do any of this but it remains that
`cl-defun' is an Elisp macro ...

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]