From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: Macro used for dynamic setting of font-lock-keywords Date: Mon, 28 May 2007 18:37:05 +1000 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <87646dwdhq.fsf@lion.rapttech.com.au> References: <874pm0573o.fsf@lion.rapttech.com.au> <87lkfb4nj4.fsf@lion.rapttech.com.au> <87d50n3pvk.fsf@lion.rapttech.com.au> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1180341691 24575 80.91.229.12 (28 May 2007 08:41:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 28 May 2007 08:41:31 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon May 28 10:41:29 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HsanA-0002ya-QM for geh-help-gnu-emacs@m.gmane.org; Mon, 28 May 2007 10:41:29 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hsan9-0005DT-Ne for geh-help-gnu-emacs@m.gmane.org; Mon, 28 May 2007 04:41:27 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.berkeley.edu!ucberkeley!sn-xt-sjc-03!sn-xt-sjc-01!sn-xt-sjc-08!sn-post-sjc-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) Cancel-Lock: sha1:vizdXaZljtMVGNEbvRu/mH/+im4= Original-X-Complaints-To: abuse@supernews.com Original-Lines: 30 Original-Xref: shelby.stanford.edu gnu.emacs.help:148911 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:44499 Archived-At: Xavier Maillard 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