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

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

Re: Defining functions within functions?


From: Emanuel Berg
Subject: Re: Defining functions within functions?
Date: Mon, 23 May 2016 09:47:11 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Marcin Borkowski <address@hidden> writes:

> In Scheme, one would probably use define
> inside another define. Is it a good idea to
> use a (cl-)defun within a defun in Elisp to
> obtain a closure in this situation? If not,
> what is a better way?

Create a new file and put all defuns on the
same level in that file.

Otherwise `cl-labels' but I'm hesitant if this
really makes the code more readable... (Not
compared to isolated defuns, for sure.)

-- 
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
                   - so far: 39 Blogomatic articles -                   


reply via email to

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