help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Redefining functions and variables


From: Johan Bockgård
Subject: Re: Redefining functions and variables
Date: Wed, 08 Dec 2010 15:21:47 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Andreas Politz <politza@fh-trier.de> writes:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>> Just as is the case for `defun', redefining macros with `defmacro'
>> is problematic.  I really recommend not to do that and use defadvice
>> instead, which was designed specifically for this purpose.
>
> Last time I tried to advice `defun', it gave me a `invalid function'
> error or some such.

Emacs chokes on the irregular "[DOCSTRING]" argument:

    (defun NAME ARGLIST [DOCSTRING] BODY...)

You have to provide an explicit ARGLIST:

    (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...)
      [DOCSTRING] [INTERACTIVE-FORM]
      BODY...)



reply via email to

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