GNU bug report logs - #68294
[PATCH] Set the 'name' prop in 'define-advice'

Previous Next

Package: emacs;

Reported by: Steven Allen <steven <at> stebalien.com>

Date: Sat, 6 Jan 2024 17:55:02 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 68294 in the body.
You can then email your comments to 68294 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#68294; Package emacs. (Sat, 06 Jan 2024 17:55:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Steven Allen <steven <at> stebalien.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 06 Jan 2024 17:55:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Steven Allen <steven <at> stebalien.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Set the 'name' prop in 'define-advice'
Date: Sat, 06 Jan 2024 09:54:36 -0800
[Message part 1 (text/plain, inline)]
In addition to naming the advice function 'symbol <at> name', set the 'name'
property to NAME. The code should be good, but I'm less sure about the
updated documentation.

Requested in Bug#68114.

[Message part 2 (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68294; Package emacs. (Sun, 07 Jan 2024 06:28:02 GMT) Full text and rfc822 format available.

Message #8 received at 68294 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Steven Allen <steven <at> stebalien.com>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 68294 <at> debbugs.gnu.org
Subject: Re: bug#68294: [PATCH] Set the 'name' prop in 'define-advice'
Date: Sun, 07 Jan 2024 08:27:03 +0200
> From: Steven Allen <steven <at> stebalien.com>
> Date: Sat, 06 Jan 2024 09:54:36 -0800
> 
> In addition to naming the advice function 'symbol <at> name', set the 'name'
> property to NAME. The code should be good, but I'm less sure about the
> updated documentation.
> 
> Requested in Bug#68114.

Stefan, any comments?

>  @defmac define-advice symbol (where lambda-list &optional name depth) &rest body
>  This macro defines a piece of advice and adds it to the function named
> -@var{symbol}.  The advice is an anonymous function if @var{name} is
> -@code{nil} or a function named @code{symbol@@name}.  See
> -@code{advice-add} for explanation of other arguments.
> +@var{symbol}.  If @var{name} is non-nil, the advice is named
> +@code{symbol@@name} and installed with the name @var{name}; otherwise,
   ^^^^^^^^^^^^^^^^^^^
This should be @code{@var{symbol}@@@var{name}}.

> +** 'define-advice' now sets the new advice's 'name' property to NAME
> +Named advice defined with 'define-advice' can now be remove with
                                                        ^^^^^^
This should be "removed".




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68294; Package emacs. (Sun, 07 Jan 2024 15:00:02 GMT) Full text and rfc822 format available.

Message #11 received at 68294 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 68294 <at> debbugs.gnu.org, Steven Allen <steven <at> stebalien.com>
Subject: Re: bug#68294: [PATCH] Set the 'name' prop in 'define-advice'
Date: Sun, 07 Jan 2024 09:58:51 -0500
>> In addition to naming the advice function 'symbol <at> name', set the 'name'
>> property to NAME. The code should be good, but I'm less sure about the
>> updated documentation.
>> Requested in Bug#68114.
>
> Stefan, any comments?

Sounds fine to me.


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68294; Package emacs. (Mon, 08 Jan 2024 15:43:01 GMT) Full text and rfc822 format available.

Message #14 received at 68294 <at> debbugs.gnu.org (full text, mbox):

From: Steven Allen <steven <at> stebalien.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 68294 <at> debbugs.gnu.org
Subject: Re: bug#68294: [PATCH] Set the 'name' prop in 'define-advice'
Date: Mon, 08 Jan 2024 07:42:29 -0800
[Message part 1 (text/plain, inline)]
>>  @defmac define-advice symbol (where lambda-list &optional name depth) &rest body
>>  This macro defines a piece of advice and adds it to the function named
>> -@var{symbol}.  The advice is an anonymous function if @var{name} is
>> -@code{nil} or a function named @code{symbol@@name}.  See
>> -@code{advice-add} for explanation of other arguments.
>> +@var{symbol}.  If @var{name} is non-nil, the advice is named
>> +@code{symbol@@name} and installed with the name @var{name}; otherwise,
>    ^^^^^^^^^^^^^^^^^^^
> This should be @code{@var{symbol}@@@var{name}}.

Fixed.

>> +** 'define-advice' now sets the new advice's 'name' property to NAME
>> +Named advice defined with 'define-advice' can now be remove with
>                                                         ^^^^^^
> This should be "removed".

Fixed.

[Message part 2 (text/x-patch, attachment)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 13 Jan 2024 09:45:02 GMT) Full text and rfc822 format available.

Notification sent to Steven Allen <steven <at> stebalien.com>:
bug acknowledged by developer. (Sat, 13 Jan 2024 09:45:02 GMT) Full text and rfc822 format available.

Message #19 received at 68294-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Steven Allen <steven <at> stebalien.com>
Cc: 68294-done <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#68294: [PATCH] Set the 'name' prop in 'define-advice'
Date: Sat, 13 Jan 2024 11:44:19 +0200
> From: Steven Allen <steven <at> stebalien.com>
> Cc: 68294 <at> debbugs.gnu.org
> Date: Mon, 08 Jan 2024 07:42:29 -0800
> 
> >>  @defmac define-advice symbol (where lambda-list &optional name depth) &rest body
> >>  This macro defines a piece of advice and adds it to the function named
> >> -@var{symbol}.  The advice is an anonymous function if @var{name} is
> >> -@code{nil} or a function named @code{symbol@@name}.  See
> >> -@code{advice-add} for explanation of other arguments.
> >> +@var{symbol}.  If @var{name} is non-nil, the advice is named
> >> +@code{symbol@@name} and installed with the name @var{name}; otherwise,
> >    ^^^^^^^^^^^^^^^^^^^
> > This should be @code{@var{symbol}@@@var{name}}.
> 
> Fixed.
> 
> >> +** 'define-advice' now sets the new advice's 'name' property to NAME
> >> +Named advice defined with 'define-advice' can now be remove with
> >                                                         ^^^^^^
> > This should be "removed".
> 
> Fixed.

Thanks, installed on master, and closing the bug.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 10 Feb 2024 12:24:22 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 223 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.