[Top][All Lists]

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

Re: require basic stuff from specific packages

From: Udyant Wig
Subject: Re: require basic stuff from specific packages
Date: Wed, 10 Aug 2016 23:24:45 +0530
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.1.0

On Wednesday 10 August 2016 09:09 PM, Emanuel Berg wrote:
>> (require 'cl-lib)
>> (defun* string-number-sequnce (start end
>> &optional (step 1) (separator " "))
> I have not seen this default value notation for
> unsubmitted optional arguments, and while
> I instinctively don't like it, I can see the
> benefit of doing that in a standardized way, as
> it is a very common thing to do - and this is
> faster (less typing), as well!
> And the reason I haven't seen it, is that
> I don't have it!
> So where did you get the "defun*" stuff?

I cannot tell if you are serious in your question seeing that you
required `cl-lib' in your own implementation.  Thus, I presume that you
were at least somewhat familiar with the Common Lisp emulation package,
and so I am puzzled how you missed `defun*'.

In any case, C-h f tells me, at least, that

  defun* is an alias for `cl-defun' in `cl.el'.


  Define NAME as a function.
  Like normal `defun', except ARGLIST allows full Common Lisp
  conventions, and BODY is implicitly surrounded by (cl-block NAME ...).

I made the mistake of using the alias `defun*' instead of the namespace
clean `cl-defun', simply because I have been using the star suffixed
form since before "Stefan Monnier added the file ‘cl-lib.el’ and
rationalized the namespace for Emacs 24.3." (from the GNU Emacs Common
Lisp Emulation Info manual), but that does not alter my basic point.  If
you have `cl-lib', you should have the rest too.

Udyant Wig

reply via email to

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