GNU bug report logs - #15666
24.3.50; regression: `defadvice' of a special form

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Sun, 20 Oct 2013 23:17:02 UTC

Severity: wishlist

Tags: wontfix

Found in version 24.3.50

Done: Lars Ingebrigtsen <larsi <at> gnus.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 15666 in the body.
You can then email your comments to 15666 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#15666; Package emacs. (Sun, 20 Oct 2013 23:17:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 20 Oct 2013 23:17:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; regression: `defadvice' of a special form
Date: Sun, 20 Oct 2013 16:15:25 -0700 (PDT)
(elisp) `Defining Advice' says that you can use `defadvice' to advise a
special form.  It is quite clear about this:

  "Here, FUNCTION is the name of the function (or macro or special form)
  to be advised.  From now on, we will write just "function" when
  describing the entity being advised, but this always includes macros
                                           ^^^^^^^^^^^^^^^^^^^^
  and special forms."
      ^^^^^^^^^^^^^

And indeed it does...in Emacs 20.  But this was apparently broken,
starting with Emacs 22 (I don't have 21 to test there).  In Emacs 20,
this works fine:

(defadvice defconst (after foo last activate)
  (put (ad-get-arg 0) 'foo-prop t))

In Emacs 22 you get this: (error "Invalid lambda variable [docstring]").
In Emacs 24 you get this:

 (error "Advice impossible: defconst is a special form")

Please reverse the regression, allowing use of `defadvice' with special
forms, as the doc claims and as was in fact the case prior to Emacs 22.


In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
 of 2013-10-19 on LEG570
Bzr revision: 114715 rgm <at> gnu.org-20131019023520-s8mwtib7xcx9e05w
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --enable-checking 'CFLAGS=-O0 -g3' CPPFLAGS=-DGLYPH_DEBUG=1'




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15666; Package emacs. (Sun, 20 Oct 2013 23:33:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: 15666 <at> debbugs.gnu.org
Subject: RE: bug#15666: 24.3.50; regression: `defadvice' of a special form
Date: Sun, 20 Oct 2013 16:32:03 -0700 (PDT)
> In Emacs 24 you get this:
>  (error "Advice impossible: defconst is a special form")

And the code that raises that error has this comment:

(cond
   ((special-form-p def)
    ;; Not worth the trouble trying to handle this, I think.
    (error "Advice impossible: %S is a special form" symbol))

"I think"?  That does not justify this regression.

It was worth the trouble before it was broken, i.e., for a
couple of decades.  Why go to the "trouble" of breaking it?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15666; Package emacs. (Sun, 30 May 2021 05:46:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 15666 <at> debbugs.gnu.org
Subject: Re: bug#15666: 24.3.50; regression: `defadvice' of a special form
Date: Sun, 30 May 2021 07:45:18 +0200
Drew Adams <drew.adams <at> oracle.com> writes:

> (elisp) `Defining Advice' says that you can use `defadvice' to advise a
> special form.  It is quite clear about this:
>
>   "Here, FUNCTION is the name of the function (or macro or special form)
>   to be advised.  From now on, we will write just "function" when
>   describing the entity being advised, but this always includes macros
>                                            ^^^^^^^^^^^^^^^^^^^^
>   and special forms."
>       ^^^^^^^^^^^^^

The manual now says:

  Special forms (@pxref{Special Forms}) cannot be advised, however macros can
be advised, in much the same way as functions.

And I don't think we want to change this at this point, so I'm closing
this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) wontfix. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 30 May 2021 05:46:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 15666 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 30 May 2021 05:46:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15666; Package emacs. (Sun, 30 May 2021 14:34:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: "15666 <at> debbugs.gnu.org" <15666 <at> debbugs.gnu.org>
Subject: RE: [External] : Re: bug#15666: 24.3.50; regression: `defadvice' of a
 special form
Date: Sun, 30 May 2021 14:32:54 +0000
> The manual now says:
> 
>   Special forms (@pxref{Special Forms}) cannot be advised, however
>   macros can be advised, in much the same way as functions.
> 
> And I don't think we want to change this at this point, so I'm closing
> this bug report.

The manual now says that because the regression was
just baked in.  It's still a regression in behavior
for Emacs users.  Really too bad.

This should at least be left open, for possible
fixing at some point by a new generation of Emacs
developers.

It's not like this loss is actually _desired_, is it?
Do you have an argument (other than "that's the way
it is now, and that's how it's doc'd") for why this
loss is _beneficial_?  At the very least, this should
be wishlist, IMO: a regression fix to hope for.






bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 28 Jun 2021 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 274 days ago.

Previous Next


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