emacs-devel
[Top][All Lists]
Advanced

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

Re: Should indent-tabs-mode insert tabs only leading whitespace?


From: Stefan Monnier
Subject: Re: Should indent-tabs-mode insert tabs only leading whitespace?
Date: Fri, 17 Jul 2020 14:10:35 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> 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




reply via email to

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