all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Should indent-tabs-mode insert tabs only leading whitespace?
@ 2020-07-17 17:52 Daniel Colascione
  2020-07-17 18:10 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Colascione @ 2020-07-17 17:52 UTC (permalink / raw)
  To: emacs-devel

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.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-17 18:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-17 17:52 Should indent-tabs-mode insert tabs only leading whitespace? Daniel Colascione
2020-07-17 18:10 ` Stefan Monnier

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.