emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: /* */ style comments in C++ sources


From: Stefan Monnier
Subject: Re: /* */ style comments in C++ sources
Date: Fri, 16 Jun 2017 14:45:23 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

>> We could probably improve on this fairly easily by adding
>> a comment-end-alist so that the user only needs to set comment-start and
>> the matching comment-end would automatically be chosen.
> I thought back when you first suggested this, and I still think now
> that letting users futz with these variables is not TRT.

It's always been meant to be modifiable by users (to change the default
comment markers, or to change the default spacing used for those comment
markers, ...).
The major mode just sets comment-start and comment-end to sane
default values.

Maybe you're thinking of comment-start-skip and comment-end-skip which
are variables which are supposed to reflect the language's syntax and
not the user's preference: these aren't expected to be modified by the
user, indeed.

> We need a command or a defcustom,

Defcustoms are global, so how do you suggest to let users specify these
choices per-mode?  Make it an alist?  Have each major mode invent its
own defcustom?

As for a command, we can easily write a command which gives a simple UI
on top of comment-end-alist, with completion, and defaulting to cycles
through the various alternatives.


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]