From: Alan Mackenzie <acm@muc.de>
To: "Herring, Davis" <herring@lanl.gov>
Cc: emacs-devel@gnu.org
Subject: Re: Supporting tabs for indentation, spaces for alignment
Date: Sat, 13 Apr 2019 13:54:46 +0000 [thread overview]
Message-ID: <20190413135446.GD13636@ACM> (raw)
In-Reply-To: <b483d42ddde945b3a479800566aa257c@lanl.gov>
Hello, Davis.
On Fri, Apr 12, 2019 at 16:39:16 +0000, Herring, Davis wrote:
> [Sent off-list because I don't know whether my DMARC issues have been
> addressed. Feel free to share it there if you'd like to make a public
> reply.]
I'm doing this. I believe these mail issues, as they interact with
mailing lists, are a Hard Problem. I'm not sure how much progress has
been made on this by the admins, but they certainly haven't been
disregarding the problem.
> > Getting concrete again, my understanding (please correct me if I am
> > wrong) of what you are suggesting is: "continuation" CC Mode source
> > lines should be indented with tabs up to the indent position of the
> > "main" line, and spaces after that. For some value of
> > "continuation" and "main" (see below).
> I'm not saying your description in terms of CC Mode internals was
> incorrect, but I'd like to provide an implementation-independent
> description that can be easily verified. (Also, in case it hasn't
> been posted recently, the Emacs Wiki discusses this idea in some depth
> <https://www.emacswiki.org/emacs/SmartTabs>.)
Thanks, I've read that. I've also downloaded the pertinent Elisp file.
I'm not quite sure how smart-tabs-mode works, yet, so I'm also not sure
what a secific CC Mode implementation could add.
> The definition of "continuation" is simply that tabs are used whenever
> the user chooses the width of indentation and spaces are used whenever
> the editor chooses it (by comparing column positions in the text).
So, roughly speaking, if a CC Mode "offset" is + or ++, then tabs would
be appropriate, otherwise spaces.
> There is a tacit assumption here that the amounts of indentation
> chosen by the user are expressed in units of tabs. Conveniently, CC
> Mode already defines indentation in terms of levels, so this just
> means that a level equals a tab--i.e., that c-basic-offset and
> tab-width are not independent. It probably makes sense to, when this
> style is engaged, (setq tab-width c-basic-offset) after computing the
> latter from whatever other style information since it is more specific
> than any global setting of tab-width.
Yes. I'll work out the precise details.
But I'm now wondering why I should want to write a CC Mode specific
implementation.
> Hope this helps,
Very much so, thanks!
> Davis
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2019-04-13 13:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-11 9:02 Supporting tabs for indentation, spaces for alignment Alan Mackenzie
2019-04-11 10:24 ` Ergus
2019-04-11 13:29 ` Eli Zaretskii
2019-04-11 14:43 ` Ergus
2019-04-12 15:54 ` Alan Mackenzie
2019-04-12 17:00 ` Ergus
[not found] ` <b483d42ddde945b3a479800566aa257c@lanl.gov>
2019-04-13 13:54 ` Alan Mackenzie [this message]
2019-04-13 15:56 ` Ergus
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=20190413135446.GD13636@ACM \
--to=acm@muc.de \
--cc=emacs-devel@gnu.org \
--cc=herring@lanl.gov \
/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.