From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.cc-mode.general,gmane.emacs.bugs Subject: Re: font lock problem in C mode Date: Sat, 16 Jun 2007 10:37:05 +0100 Message-ID: <20070616093705.GA1945@muc.de> References: <4672F616.5030103@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1181981483 3284 80.91.229.12 (16 Jun 2007 08:11:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 16 Jun 2007 08:11:23 +0000 (UTC) Cc: bug-cc-mode@gnu.org, bug-gnu-emacs@gnu.org, maechler@stat.math.ethz.ch To: Stephen Eglen , martin rudalics Original-X-From: cc-mode-help-bounces@lists.sourceforge.net Sat Jun 16 10:11:21 2007 Return-path: Envelope-to: sf-cc-mode-help@m.gmane.org Original-Received: from lists-outbound.sourceforge.net ([66.35.250.225]) by lo.gmane.org with esmtp (Exim 4.50) id 1HzTNQ-0006Jv-G6 for sf-cc-mode-help@m.gmane.org; Sat, 16 Jun 2007 10:11:20 +0200 Original-Received: from sc8-sf-list1-new.sourceforge.net (sc8-sf-list1-new-b.sourceforge.net [10.3.1.93]) by sc8-sf-spam2.sourceforge.net (Postfix) with ESMTP id CCD3C12548; Sat, 16 Jun 2007 01:11:19 -0700 (PDT) Original-Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] helo=mail.sourceforge.net) by sc8-sf-list1-new.sourceforge.net with esmtp (Exim 4.43) id 1HzTNN-0004TQ-Vg for cc-mode-help@lists.sourceforge.net; Sat, 16 Jun 2007 01:11:18 -0700 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by mail.sourceforge.net with esmtps (TLSv1:AES256-SHA:256) (Exim 4.44) id 1HzTNM-0002J9-EA for cc-mode-help@lists.sourceforge.net; Sat, 16 Jun 2007 01:11:17 -0700 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by fencepost.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HzTNG-0000qO-Sv for bug-cc-mode@gnu.org; Sat, 16 Jun 2007 04:11:10 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1HzTNG-00005o-0H for bug-cc-mode@gnu.org; Sat, 16 Jun 2007 04:11:10 -0400 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on monty-python X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=SPF_PASS autolearn=failed version=3.1.0 Original-Received: from colin.muc.de ([193.149.48.1] helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HzTNF-00004u-Gq for bug-cc-mode@gnu.org; Sat, 16 Jun 2007 04:11:09 -0400 Original-Received: (qmail 98527 invoked by uid 3782); 16 Jun 2007 08:11:06 -0000 Original-Received: from acm.muc.de (p54A3F3A1.dip.t-dialin.net [84.163.243.161]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Sat, 16 Jun 2007 10:11:01 +0200 Original-Received: (qmail 2355 invoked by uid 1000); 16 Jun 2007 09:37:05 -0000 Content-Disposition: inline In-Reply-To: <4672F616.5030103@gmx.at> User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-kernel: FreeBSD 4.6-4.9 X-Spam-Score: 1.0 (+) 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 1.0 FORGED_RCVD_HELO Received: contains a forged HELO X-BeenThere: cc-mode-help@lists.sourceforge.net X-Mailman-Version: 2.1.8 Precedence: list List-Id: "Bug reports, feature requests, and general talk about CC Mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: cc-mode-help-bounces@lists.sourceforge.net Errors-To: cc-mode-help-bounces@lists.sourceforge.net Xref: news.gmane.org gmane.emacs.cc-mode.general:4570 gmane.emacs.bugs:15905 Archived-At: Hi, Stephen, Hi, Martin! Stephen, your address wouldn't be "Department of Applied Mathematics and Theoretical Physics", by any chance? On Fri, Jun 15, 2007 at 10:27:02PM +0200, martin rudalics wrote: > > Put the following C comment into a file, called e.g. "s.c" > > > > /** > > * Simple comment. > > */ > > > > and then do: > > > > $emacs -q s2.c > > > > The comment is fontified as a "string", rather than a "comment". > It is fontified as a "doc-string" (if you customize `font-lock-doc-face' > you will see the difference). > > If I delete the 2nd asterisk on the first line, the font switches > > correctly to be fontified as a comment. > It is a "feature". Alan Mackenzie will explain this carefully and in > full detail ... Alan, good evening, it's me again ;-) OK, OK, OK! The feature is in CC Mode what a doc-string is in Emacs Lisp. It's documented in the (new) CC Mode manual on page "Doc Comments". The default in C Mode is "gtkdoc", the documentation convention used by Gnomes. If you don't like it (and I realise here that having an unwanted feature thrust upon one is far worse than the lack of wanted one), disable it by setting c-doc-comment-style to nil. This is a CC Mode "style variable", with all the facilities and hassle that come with these. Basically, set it to nil AS EARLY AS POSSIBLE in your .emacs (or use the customize-.. facilities), as described on the manual page "Config Basics". -- Alan Mackenzie (Ittersbach, Germany). ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/