unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: 15666@debbugs.gnu.org
Subject: bug#15666: 24.3.50; regression: `defadvice' of a special form
Date: Sun, 20 Oct 2013 16:15:25 -0700 (PDT)	[thread overview]
Message-ID: <6bc447c6-2d04-47d5-9e55-c8e6362fd4c7@default> (raw)

(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@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'





             reply	other threads:[~2013-10-20 23:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-20 23:15 Drew Adams [this message]
2013-10-20 23:32 ` bug#15666: 24.3.50; regression: `defadvice' of a special form Drew Adams
2021-05-30  5:45 ` Lars Ingebrigtsen
2021-05-30 14:32   ` bug#15666: [External] : " Drew Adams

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=6bc447c6-2d04-47d5-9e55-c8e6362fd4c7@default \
    --to=drew.adams@oracle.com \
    --cc=15666@debbugs.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 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).