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

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

Re: replacing a function with another one


From: Michael Heerdegen
Subject: Re: replacing a function with another one
Date: Sun, 09 Mar 2014 20:10:46 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

lee <address@hidden> writes:

> Defadvice shines.  I wonder who invented that ...

The file header says it was Hans Chalupsky.

Note that defadvice has now been obsoleted by a new implementation:
nadvice.el.  You can do all of the stuff that defadvice can, but it has
cleaner and simpler syntax and semantics.  If this is new to you, you
may want to start learning with the new mechanism.

> And re-defining functions just like that?  IsnĀ“t that a rather
> dangerous and potentially troublesome feature?

Generally you should try to avoid it as much as possible and only use it
when there is no other mean to reach what you want.

If you know what you are doing, it - in my experience - seldom causes
trouble.  Critical are changes in the sources that change syntax or
semantic of the original function, so expect that some of your advices
may stop working in future Emacs releases.


Regards,

Michael.




reply via email to

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