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: Marcin Borkowski
Subject: Re: Defining functions within functions?
Date: Wed, 25 May 2016 17:39:52 +0200
User-agent: mu4e 0.9.16; emacs 25.1.50.1

On 2016-05-25, at 16:18, Drew Adams <drew.adams@oracle.com> wrote:

>> > A suggestion: Post a concrete example of what you need, and
>                          ^^^^^^^^
>> > see what concrete suggestions you get.
>> >
>> > Typically, this stuff is not complicated.  The first thing
>> > to do, IMO, is to determine whether you really need/want to
>> > do something special/complicated.  Why do you think you want
>> > a nested defun or other form of local function definition?
>> 
>> The reason is simple: I have this long, almost 60-lines function, with
>> three levels of lambdas nested.  (I'm using request.el, and I have to
>> make two requests sequentially, so I have a callback inside a callback.
>> I could probably use deferred or something, this is one of the ideas.)
>> It's just pretty complicated, and changing anything in this code is
>> a headache.  Also, edebugging is simpler with separate instrumentable
>> defuns.
>
> I repeat the suggestion above, in case it helps: _concrete_ example.

I agree, though it will take me some time to distill the problem into
a kind of minimal example.  I'll try to get back here when I do it.

Thanks,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



reply via email to

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