From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.cc-mode.general,gmane.emacs.devel Subject: Re: [sigra@home.se: C++-mode: Syntax highlighting: wrong color for function identifier depending on the kind of whitespace that follows] Date: Thu, 10 Mar 2005 20:46:45 -0500 Message-ID: References: Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1110505671 17018 80.91.229.2 (11 Mar 2005 01:47:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 11 Mar 2005 01:47:51 +0000 (UTC) Cc: emacs-devel@gnu.org, bug-cc-mode@gnu.org Original-X-From: cc-mode-help-admin@lists.sourceforge.net Fri Mar 11 02:47:51 2005 Original-Received: from lists-outbound.sourceforge.net ([66.35.250.225]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D9ZFi-0001cX-1a for sf-cc-mode-help@m.gmane.org; Fri, 11 Mar 2005 02:47:46 +0100 Original-Received: from projects.sourceforge.net (sc8-sf-list1-b.sourceforge.net [10.3.1.7]) by sc8-sf-spam2.sourceforge.net (Postfix) with ESMTP id 820FB1E113; Thu, 10 Mar 2005 17:47:44 -0800 (PST) Original-Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.11] helo=sc8-sf-mx1.sourceforge.net) by sc8-sf-list1.sourceforge.net with esmtp (Exim 4.30) id 1D9ZEm-0004UL-F0 for cc-mode-help@lists.sourceforge.net; Thu, 10 Mar 2005 17:46:48 -0800 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by sc8-sf-mx1.sourceforge.net with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.41) id 1D9ZEk-0004lP-Vo for cc-mode-help@lists.sourceforge.net; Thu, 10 Mar 2005 17:46:48 -0800 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1D9ZEj-0003x6-B1; Thu, 10 Mar 2005 20:46:45 -0500 Original-To: Alan Mackenzie In-reply-to: (message from Alan Mackenzie on Wed, 9 Mar 2005 21:18:40 +0000 (GMT)) X-Spam-Score: -0.3 (/) X-Spam-Report: Spam Filtering performed by sourceforge.net. See http://spamassassin.org/tag/ for more details. Report problems to http://sf.net/tracker/?func=add&group_id=1&atid=200001 -0.3 AWL AWL: From: address is in the auto white-list Original-Sender: cc-mode-help-admin@lists.sourceforge.net Errors-To: cc-mode-help-admin@lists.sourceforge.net X-BeenThere: cc-mode-help@lists.sourceforge.net X-Mailman-Version: 2.0.9-sf.net Precedence: bulk List-Unsubscribe: , List-Id: Bug reports, feature requests, and general talk about CC Mode. List-Post: List-Help: List-Subscribe: , List-Archive: X-Original-Date: Thu, 10 Mar 2005 20:46:45 -0500 X-MailScanner-From: cc-mode-help-admin@lists.sourceforge.net X-MailScanner-To: sf-cc-mode-help@m.gmane.org Xref: news.gmane.org gmane.emacs.cc-mode.general:2282 gmane.emacs.devel:34448 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34448 Hmmm. The advice facility exists within Emacs, and it is difficult to see what it could be used on, aside from another part of Emacs. After all, one does not need to advise one's own code, having full control over the source. It is meant for users to use in their Lisp code. We can't anticipate all of what they need. But when something is part of Emacs, it should not use advice. When we install code in Emacs, if it advises some other part of Emacs, then we should add a hook for it to use instead of the advice. The reason the hook is better is that it is visible in the source. If you are debugging a call to the function foo, there is nothing to show you it has advice. That can be a real pain in debugging. How much time would you waste before it occurred to you to wonder if the code that's running really matches the source? If foo has a hook, at least you'll see `run-hooks' in the code for foo, so you will ask yourself "What's in that hook?" I just had an idea that could perhaps eliminate this problem. Emacs Lisp mode could have a feature to put an overlay on the defun for a function that has advice. The overlay could have `after-text' like " [Function has advice]". If you see (defun foo [Function has advice] (x y) you would not be confused by the advice. The overlay could also perhaps be a button that you could use to view the advice. I will add this to TODO. ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click