[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#15666: 24.3.50; regression: `defadvice' of a special form

From: Drew Adams
Subject: bug#15666: 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 (i686-pc-mingw32)
 of 2013-10-19 on LEG570
Bzr revision: 114715 address@hidden
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --enable-checking 'CFLAGS=-O0 -g3' CPPFLAGS=-DGLYPH_DEBUG=1'

reply via email to

[Prev in Thread] Current Thread [Next in Thread]