From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Daniel Colascione" <dancol@dancol.org>
Cc: emacs-devel@gnu.org
Subject: Re: Should indent-tabs-mode insert tabs only leading whitespace?
Date: Fri, 17 Jul 2020 14:10:35 -0400 [thread overview]
Message-ID: <jwvimemkonf.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <0456f08d3ac9a2ee84ced480529ced00.squirrel@dancol.org> (Daniel Colascione's message of "Fri, 17 Jul 2020 10:52:20 -0700")
> There are lots of fixes for this problem, but the fundamental issue seems
> to be that indent-to inserts tab characters for column alignment *after*
> non-whitespace characters on a given line. What if indent-to always
> inserted spaces when there were non-whitespace characters between BOL and
> point? That whitespace manipulation isn't really indentation.
AFAIK `indent-to` is a low-level function that is used for indentation
indeed but is also used for alignment and many other purposes, so
changing it as you suggested will likely lead to undesired behaviors in
some cases.
So I think this should be fixed elsewhere or at least be conditional on
some new variable setting (e.g. `indent-tab-mode` set to `only-at-bol`).
Stefan
prev parent reply other threads:[~2020-07-17 18:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-17 17:52 Should indent-tabs-mode insert tabs only leading whitespace? Daniel Colascione
2020-07-17 18:10 ` Stefan Monnier [this message]
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=jwvimemkonf.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=dancol@dancol.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.