From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#4192: 23.1; special fontification for "//" in cc-mode Date: Fri, 01 Nov 2019 17:08:48 +0100 Message-ID: <87wocjzii7.fsf@gnus.org> References: <20090821213323.GC1897@muc.de> <87k2lo193k.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="146349"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: tromey@redhat.com, 4192@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 01 17:09:48 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 1iQZUi-000bwx-Gg for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Nov 2019 17:09:48 +0100 Original-Received: from localhost ([::1]:40892 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iQZUh-0006Cz-9V for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Nov 2019 12:09:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58538) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iQZU2-0005N5-Jg for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2019 12:09:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iQZU0-0008Q2-C9 for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2019 12:09:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48063) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iQZTy-0008GT-Fq; Fri, 01 Nov 2019 12:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iQZTy-0000ue-5d; Fri, 01 Nov 2019 12:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Fri, 01 Nov 2019 16:09: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.15726245353492 (code B ref 4192); Fri, 01 Nov 2019 16:09:02 +0000 Original-Received: (at 4192) by debbugs.gnu.org; 1 Nov 2019 16:08:55 +0000 Original-Received: from localhost ([127.0.0.1]:56884 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQZTr-0000uF-4Z for submit@debbugs.gnu.org; Fri, 01 Nov 2019 12:08:55 -0400 Original-Received: from quimby.gnus.org ([80.91.231.51]:38484) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQZTp-0000u5-Cy for 4192@debbugs.gnu.org; Fri, 01 Nov 2019 12:08:54 -0400 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iQZTk-0007eB-Fa; Fri, 01 Nov 2019 17:08:52 +0100 In-Reply-To: <87k2lo193k.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 29 Feb 2016 14:36:15 +1100") 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:170620 Archived-At: 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. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no