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

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

Re: Pass an argument to a sentinel?


From: Philipp Stephani
Subject: Re: Pass an argument to a sentinel?
Date: Sat, 29 Jul 2017 12:54:24 +0000

Eli Zaretskii <eliz@gnu.org> schrieb am Sa., 29. Juli 2017 um 08:22 Uhr:

> > From: Yassin Philip <philcm@gnu.org>
> > Date: Fri, 28 Jul 2017 21:16:14 +0100
> >
> >     "The sentinel receives /two arguments/: the process for which the
> >     event occurred, and a string describing the type of event."
> >
> > But I need it to receive at least one more argument, because at the end
> > of the process, the context (like the buffer at the time of the sentinel
> > call) may have changed.
> >
> > How can I pass arguments to a sentinel?
>
> One way is to have a global variable with those additional values.
> Another is to put a property on the process object whose value
> provides those arguments.
>
>
The third (and most generic) way is to use a lexical closure.


reply via email to

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