[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
- Re: /* */ style comments in C++ sources, Alan Mackenzie, 2017/06/15
- Re: /* */ style comments in C++ sources, Eli Zaretskii, 2017/06/16
- Re: /* */ style comments in C++ sources, Alan Mackenzie, 2017/06/16
- Re: /* */ style comments in C++ sources, Eli Zaretskii, 2017/06/16
- Re: /* */ style comments in C++ sources, Stefan Monnier, 2017/06/16
- Re: /* */ style comments in C++ sources, Stefan Monnier, 2017/06/16
- Re: /* */ style comments in C++ sources, Eli Zaretskii, 2017/06/16
- Re: /* */ style comments in C++ sources,
Stefan Monnier <=
- Re: /* */ style comments in C++ sources, Eli Zaretskii, 2017/06/16