[Top][All Lists]

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

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

From: Kevin Rodgers
Subject: Re: Macro used for dynamic setting of font-lock-keywords
Date: Fri, 01 Jun 2007 21:41:15 -0600
User-agent: Thunderbird (Macintosh/20070509)

Sebastian Tennant wrote:
Quoth Xavier Maillard <address@hidden>:

   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

Kevin Rodgers
Denver, Colorado, USA

reply via email to

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