From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#4192: 23.1; special fontification for "//" in cc-mode Date: Mon, 29 Feb 2016 14:36:15 +1100 Message-ID: <87k2lo193k.fsf@gnus.org> References: <20090821213323.GC1897@muc.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1456717054 25732 80.91.229.3 (29 Feb 2016 03:37:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Feb 2016 03:37:34 +0000 (UTC) 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 Mon Feb 29 04:37:17 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aaEe2-0001aQ-SZ for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Feb 2016 04:37:15 +0100 Original-Received: from localhost ([::1]:33789 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaEdz-0001R2-2I for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Feb 2016 22:37:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaEdv-0001Qm-DS for bug-gnu-emacs@gnu.org; Sun, 28 Feb 2016 22:37:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aaEdt-0004Ag-Rm for bug-gnu-emacs@gnu.org; Sun, 28 Feb 2016 22:37:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54079) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaEdp-00049z-Vk; Sun, 28 Feb 2016 22:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aaEdp-0002uy-QJ; Sun, 28 Feb 2016 22:37:01 -0500 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: Mon, 29 Feb 2016 03:37:01 +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.145671700711189 (code B ref 4192); Mon, 29 Feb 2016 03:37:01 +0000 Original-Received: (at 4192) by debbugs.gnu.org; 29 Feb 2016 03:36:47 +0000 Original-Received: from localhost ([127.0.0.1]:51203 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aaEdb-0002uP-2X for submit@debbugs.gnu.org; Sun, 28 Feb 2016 22:36:47 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:36308) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aaEdZ-0002uH-V6 for 4192@debbugs.gnu.org; Sun, 28 Feb 2016 22:36:46 -0500 Original-Received: from cpe-60-225-211-161.nsw.bigpond.net.au ([60.225.211.161] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aaEdB-0000f2-RG; Mon, 29 Feb 2016 04:36:22 +0100 In-Reply-To: <20090821213323.GC1897@muc.de> (Alan Mackenzie's message of "Fri, 21 Aug 2009 21:33:23 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-MailScanner-ID: 1aaEdB-0000f2-RG MailScanner-NULL-Check: 1457321782.75069@uor87vvbJ3dEZ/m68tt4tg 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: 208.118.235.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:114072 Archived-At: 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. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no