all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: /* */ style comments in C++ sources
Date: Fri, 16 Jun 2017 14:45:23 -0400	[thread overview]
Message-ID: <jwva857ew41.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <8360fv29j7.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 16 Jun 2017 19:15:56 +0300")

>> 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	other threads:[~2017-06-16 18:45 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-23 18:57 /* */ style comments in C++ sources Eli Zaretskii
2017-05-23 20:31 ` Alan Mackenzie
2017-05-24  0:02   ` Richard Stallman
2017-05-24 20:36     ` Sam Steingold
2017-05-24  2:27   ` Eli Zaretskii
2017-05-24 20:53     ` Alan Mackenzie
2017-05-25  1:51       ` Stefan Monnier
2017-05-25  2:32       ` Eli Zaretskii
2017-05-25 15:48         ` Alan Mackenzie
2017-05-25 16:59           ` Stefan Monnier
2017-05-25 17:44             ` Alan Mackenzie
2017-05-26  9:16           ` Alan Mackenzie
2017-06-15 21:10             ` Alan Mackenzie
2017-06-16  6:22               ` Eli Zaretskii
2017-06-16 11:50                 ` Alan Mackenzie
2017-06-16 12:40                   ` Alan Mackenzie
2017-06-16 13:33                     ` Eli Zaretskii
2017-06-16 13:22                   ` Eli Zaretskii
2017-06-16 13:37                     ` Stefan Monnier
2017-06-16 14:25                       ` Stefan Monnier
2017-06-16 16:15                         ` Eli Zaretskii
2017-06-16 18:45                           ` Stefan Monnier [this message]
2017-06-16 19:30                             ` Eli Zaretskii
2017-05-25  3:13       ` Herring, Davis
2017-05-25 16:00         ` Alan Mackenzie
2017-05-24 17:19   ` John Mastro
2017-05-24 18:10     ` Eli Zaretskii
2017-05-25  1:49       ` Stefan Monnier
2017-05-24  9:08 ` Dani Moncayo

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

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

  git send-email \
    --in-reply-to=jwva857ew41.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.