From: Yuri Khan <yuri.v.khan@gmail.com>
To: Yuri Khan <yuri.v.khan@gmail.com>,
Help GNU Emacs <help-gnu-emacs@gnu.org>
Subject: Re: Is there way to read function invoked and its parameters?
Date: Mon, 28 Dec 2020 16:04:41 +0700 [thread overview]
Message-ID: <CAP_d_8XWrGfR2pCW6CWo1VGdFR0p53uxqxy1vhfvym6c4QEfRw@mail.gmail.com> (raw)
In-Reply-To: <X+mEKKJCPbWvI0+d@protected.rcdrun.com>
On Mon, 28 Dec 2020 at 14:08, Jean Louis <bugs@gnu.support> wrote:
> The principle for refreshing or reverting is there, that is
> right. Only that it is very inconvenient especially if there is large
> number of functions.
>
> In the above example I would rather like to pass some dynamically
> defined function to add-hook then making many revert functions for
> each report.
>
> I am now thinking to employ something like this concept:
>
> (defun my-report (arg1 arg2 arg3)
> (cl-flet my-report--revert ()
> (my-report arg1 arg2 arg3))
> (invoke-other-function 'my-report--revert))
>
> Then other function can set up hooks by using that function. Does
> this sound alright to you?
It might be possible but it’s not a good idea. Even if you manage to
keep a function definition in a buffer-local variable, debugging that
is likely going to be unpleasant.
next prev parent reply other threads:[~2020-12-28 9:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-27 17:54 Is there way to read function invoked and its parameters? Jean Louis
2020-12-27 18:04 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-12-27 19:11 ` Yuri Khan
2020-12-28 7:07 ` Jean Louis
2020-12-28 9:04 ` Yuri Khan [this message]
[not found] <<courier.000000005FE8CA54.00006BFB@stw1.rcdrun.com>
2020-12-27 18:20 ` Drew Adams
2020-12-27 18:39 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-12-28 6:57 ` Jean Louis
2020-12-28 16:40 ` Drew Adams
2020-12-28 19:58 ` Jean Louis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAP_d_8XWrGfR2pCW6CWo1VGdFR0p53uxqxy1vhfvym6c4QEfRw@mail.gmail.com \
--to=yuri.v.khan@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.