From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#4192: 23.1; special fontification for "//" in cc-mode Date: Sat, 2 Nov 2019 16:35:13 +0000 Message-ID: <20191102163513.GC6710__25471.1475734197$1572712648$gmane$org@ACM> References: <20090821213323.GC1897@muc.de> <87k2lo193k.fsf@gnus.org> <87wocjzii7.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="98888"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: tromey@redhat.com, 4192@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 02 17:37:23 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iQwOw-000PbX-SE for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Nov 2019 17:37:23 +0100 Original-Received: from localhost ([::1]:49218 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iQwOu-0005V4-Nh for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Nov 2019 12:37:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40676) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iQwNl-0005AY-GW for bug-gnu-emacs@gnu.org; Sat, 02 Nov 2019 12:36:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iQwNj-0006nm-Ap for bug-gnu-emacs@gnu.org; Sat, 02 Nov 2019 12:36:08 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52396) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iQwNf-0006Sq-Gw; Sat, 02 Nov 2019 12:36:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iQwNe-0006ev-CQ; Sat, 02 Nov 2019 12:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Sat, 02 Nov 2019 16:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 4192 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: patch X-Debbugs-Original-Cc: Tom Tromey , bug-cc-mode@gnu.org, 4192@debbugs.gnu.org Original-Received: via spool by 4192-submit@debbugs.gnu.org id=B4192.157271252625543 (code B ref 4192); Sat, 02 Nov 2019 16:36:02 +0000 Original-Received: (at 4192) by debbugs.gnu.org; 2 Nov 2019 16:35:26 +0000 Original-Received: from localhost ([127.0.0.1]:32984 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQwN1-0006ds-LK for submit@debbugs.gnu.org; Sat, 02 Nov 2019 12:35:26 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:18011 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1iQwMu-0006da-NF for 4192@debbugs.gnu.org; Sat, 02 Nov 2019 12:35:22 -0400 Original-Received: (qmail 44441 invoked by uid 3782); 2 Nov 2019 16:35:14 -0000 Original-Received: from acm.muc.de (p2E5D5AEB.dip0.t-ipconnect.de [46.93.90.235]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 02 Nov 2019 17:35:13 +0100 Original-Received: (qmail 9931 invoked by uid 1000); 2 Nov 2019 16:35:13 -0000 Content-Disposition: inline In-Reply-To: <87wocjzii7.fsf@gnus.org> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:170826 Archived-At: Hello, Lars. On Fri, Nov 01, 2019 at 17:08:48 +0100, Lars Ingebrigtsen wrote: > Lars Ingebrigtsen writes: > > Alan Mackenzie writes: > >>> This is a feature request for cc-mode. > >>> I work on a number of projects that use C89, not C99. In these > >>> projects, it is invalid to use "//"-style comment. It would be > >>> nice if cc-mode would optionally flag such comments in a special > >>> face, so that I can immediately see when I've written a comment > >>> incorrectly. > >> I'm not sure this is important enough to warrant a fully > >> implemented/documented/QA'd feature, but then again, I'm not sure > >> it's not. > >> Here's a quick hack called c-disable-line-comments.el. Load it into > >> your Emacs before CC Mode (in particular, before desktop gets > >> loaded). > >> Toggling c-disable-line-comments doesn't work smoothly with the font > >> locking, but I'm assuming here you'll not really be wanting to > >> toggle this. > > I think this sounds useful. For instance, in the Emacs source code, > > // is also frowned upon, so having those be marked by CC mode would > > be handy. This doesn't seem to have made its way into the code base, > > I think. > Alan, have you thought any further about this? It does seem like a > nice feature. I'm still not sure either way whether or not this is a feature worth implementing. It may be nice, but it will add bulk to CC Mode and Emacs. But, given that there are people (yourself and Tom Tromey, the OP) who think it worthwhile, I'm willing to implement it. It will not be that difficult, except for deciding what to call the new configuration variable(s). ;-) A couple of hours, perhaps. So, yes, sometime in the very near future, I will implement this. > -- > (domestic pets only, the antidote for overdose, milk.) > bloggy blog: http://lars.ingebrigtsen.no -- Alan Mackenzie (Nuremberg, Germany).