emacs-devel
[Top][All Lists]
Advanced

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

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


From: Daniel Colascione
Subject: Should indent-tabs-mode insert tabs only leading whitespace?
Date: Fri, 17 Jul 2020 10:52:20 -0700
User-agent: SquirrelMail/1.4.23 [SVN]

I recently debugged a weird interaction between make-mode and
ws-butler-mode that let to random tab characters being strewn in my
makefiles: ws-butler-mode uses move-to-column after save to restore
trailing whitespace on the line containing point. move-to-column calls
indent-to to actually do the move. And because makefile-mode sets
indent-tabs-mode, that indent-to inserts tabs sometimes, resulting in
stray tab files in places where they don't belong.

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.




reply via email to

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