From: Stefan Kangas <stefankangas@gmail.com>
To: Daan Ro <daanturo@gmail.com>, Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 59820@debbugs.gnu.org
Subject: bug#59820: [PATCH] * nadvice/nadvice.el: support non-symbol (closure/lambda) advices (old Emacs)
Date: Mon, 9 Oct 2023 09:45:20 +0000 [thread overview]
Message-ID: <CADwFkmk0pcRrSR04nwv7tiuB9uVFKNVDW6w6nRCRsDt+QjSaYw@mail.gmail.com> (raw)
In-Reply-To: <CAGNN0nDNa2o4ngakELSvd_2w5NFzsyf=wH-W280T3NK9v_QdLg@mail.gmail.com>
tags 59820 + patch
thanks
Daan Ro <daanturo@gmail.com> writes:
> Use `warn` instead of `message`.
Stefan, what do you think? Should the below patch be installed?
> From f30a1f6d815a038dde51ea09089e9aa2155c8c62 Mon Sep 17 00:00:00 2001
> From: Daanturo <daanturo@gmail.com>
> Date: Tue, 13 Dec 2022 21:28:03 +0700
> Subject: [PATCH] * nadvice/nadvice.el: warn against non-symbol FUNCTIONs
>
> ---
> nadvice.el | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/nadvice.el b/nadvice.el
> index 443a5d0..c6666d0 100644
> --- a/nadvice.el
> +++ b/nadvice.el
> @@ -57,6 +57,8 @@
> (if (symbolp func)
> func
> (let* ((sym (intern (format "%S" func))))
> + (warn "This version of nadvice.el recommends that \
> +FUNCTION: %S is a named symbol instead." func)
> (unless (fboundp sym)
> (defalias sym func))
> sym)))
> --
> 2.39.0
next prev parent reply other threads:[~2023-10-09 9:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-04 17:14 bug#59820: [PATCH] * nadvice/nadvice.el: support non-symbol (closure/lambda) advices (old Emacs) daanturo
2022-12-13 1:04 ` Stefan Kangas
2022-12-13 13:50 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-13 14:59 ` daanturo
2022-12-13 15:02 ` Daan Ro
2023-10-09 9:45 ` Stefan Kangas [this message]
2023-10-09 22:06 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-10 10:44 ` Stefan Kangas
2023-10-11 6:04 ` Daan Ro
2023-10-11 6:50 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CADwFkmk0pcRrSR04nwv7tiuB9uVFKNVDW6w6nRCRsDt+QjSaYw@mail.gmail.com \
--to=stefankangas@gmail.com \
--cc=59820@debbugs.gnu.org \
--cc=daanturo@gmail.com \
--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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).