all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: 49163-done@debbugs.gnu.org
Subject: bug#49163: 28.0.50; Dynbind add-function and lambdas as file vars
Date: Sun, 27 Jun 2021 18:18:14 -0400	[thread overview]
Message-ID: <jwvzgvbj79b.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87mtritz26.fsf@web.de> (Michael Heerdegen's message of "Tue, 22 Jun 2021 04:26:09 +0200")

>> -     (save-excursion (eval val)))
>> +     (save-excursion (eval val t)))
> I would certainly welcome that.

Pushed.  I understand it doesn't directly satisfies your original
request, but that seems harder to do.

This said, technically you *can* get exactly what you asked for with
something like:

    Local Variables:
    my-do-with-test-process-fun: #[257 "\300\301\^B\302\303\^B\"\302\304\^C\"B\262\^A\305\306$\207" [advice--add-function :before make-closure #[0 "\301\300!\207" [V0 process-sentinel] 2] #[257 "\301\300\^B\"\207" [V0 set-process-sentinel] 4 "\n\n(fn GV--VAL)"] #[128 "\300\301!\207" [message "Test"] 3 "\n\n(fn &rest _)"] nil] 8 "\n\n(fn P)"]
    End:

which you can generate with:

    M-: (let ((lexical-binding t) (print-escape-newlines t)) (insert (format "%S" (byte-compile '(lambda (p) (add-function :before (process-sentinel p) (lambda (&rest _) (message "Test"))))))))

I wouldn't encourage you to do that, tho.


        Stefan






  reply	other threads:[~2021-06-27 22:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-21 23:16 bug#49163: 28.0.50; Dynbind add-function and lambdas as file vars Michael Heerdegen
2021-06-22  1:54 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-22  2:26   ` Michael Heerdegen
2021-06-27 22:18     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-06-28  2:56       ` Michael Heerdegen

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=jwvzgvbj79b.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=49163-done@debbugs.gnu.org \
    --cc=michael_heerdegen@web.de \
    --cc=monnier@iro.umontreal.ca \
    /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.