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: Tim X
Subject: Re: Macro used for dynamic setting of font-lock-keywords
Date: Mon, 28 May 2007 18:37:05 +1000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

Xavier Maillard <address@hidden> writes:

> 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.
>

A little extreme don't you think. There are certainly some things to watch out
for and it can make things a bit harder for debugging if you forget etc, but I
don't think it can be called *dangerous* any more than any other feature we
have available. Obviously, just like macros, it can be misused. However,
telling people its dangerous and should be avoided does nothing but create FUD.
As long as people follow the guidelines in the Emacs Lisp Reference, then I
can't see a problem (BTW, it does not say anything about it being *dangerous*
in the manual). 

I've been using a package of over 66k lines with over 1700 bits of advice in it
that has worked extremely well for over 10 years. Innearly all cases, using
defadvice was the only way to achieve the desired outcome. Without this
feature, the package simply would not have been possible. 

Tim
 

-- 
tcross (at) rapttech dot com dot au


reply via email to

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