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

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

Re: Macro used for dynamic setting of font-lock-keywords


From: Sebastian Tennant
Subject: Re: Macro used for dynamic setting of font-lock-keywords
Date: Sun, 03 Jun 2007 12:39:48 +0300
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.95 (gnu/linux)

Quoth Kevin Rodgers <kevin.d.rodgers@gmail.com>:
> Sebastian Tennant wrote:
>> Quoth Xavier Maillard <xma@gnu.org>:
>>> Hi,
>>>
>>>    seem to get used as often as it probably should. I've seen people post 
>>> 20+
>>>    lines of elisp to this list to do something which could be achieved more
>>>    reliably with 4 or five lines of defadvice. 
>>>
>>> Advice is considered as *dangerous* and not to be used extensively.
>>>
>> Indeed this is what I've been lead to believe.  I think RMS' position
>> on defadvice, which confirms this, is knocking about somewhere.
>
> I think RMS' position is that defadvice should not be used within Emacs
> itself.  But the inclusion of defadvice.el in Emacs is tacit
> acknowledgement of its usefulness: When there is no variable or hook
> function that the user can customize to achieve some new behavior,
> defadvice allows you to modify the behavior of a function _without
> duplicating its original definition in its entirety_.  Thus you can
> write a very small piece of code that is *more* likely to continue
> to work over time, even as the implementation of the underlying function
> evolves within Emacs, and in conjunction with other customizations of
> the function.  That makes it *less* dangerous than the naive approach of
> copy-and-paste.

Ah.  Everything is illuminated.

Many thanks.

Sebastian





reply via email to

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