unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: tromey@redhat.com, 4192@debbugs.gnu.org
Subject: bug#4192: 23.1; special fontification for "//" in cc-mode
Date: Sat, 2 Nov 2019 16:35:13 +0000	[thread overview]
Message-ID: <20191102163513.GC6710__25471.1475734197$1572712648$gmane$org@ACM> (raw)
In-Reply-To: <87wocjzii7.fsf@gnus.org>

Hello, Lars.

On Fri, Nov 01, 2019 at 17:08:48 +0100, Lars Ingebrigtsen wrote:
> Lars Ingebrigtsen <larsi@gnus.org> writes:

> > Alan Mackenzie <acm@muc.de> 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).





  reply	other threads:[~2019-11-02 16:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-18 16:24 bug#4192: 23.1; special fontification for "//" in cc-mode Tom Tromey
2009-08-21 21:33 ` Alan Mackenzie
2016-02-29  3:36   ` Lars Ingebrigtsen
2019-11-01 16:08     ` Lars Ingebrigtsen
2019-11-02 16:35       ` Alan Mackenzie [this message]
     [not found]       ` <20191102163513.GC6710@ACM>
2019-11-03 15:55         ` Lars Ingebrigtsen
2019-11-03 17:46           ` Alan Mackenzie
     [not found]           ` <20191103174618.GA11619@ACM>
2019-11-03 17:59             ` Eli Zaretskii
2019-11-03 19:20               ` Alan Mackenzie
2019-11-07 20:11             ` Lars Ingebrigtsen
2019-11-09 12:20               ` Alan Mackenzie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='20191102163513.GC6710__25471.1475734197$1572712648$gmane$org@ACM' \
    --to=acm@muc.de \
    --cc=4192@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).