[Top][All Lists]

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

Re: Spaces rather than tabs by a major mode hook

From: goncholden
Subject: Re: Spaces rather than tabs by a major mode hook
Date: Fri, 10 Jun 2022 07:42:19 +0000

------- Original Message -------
On Friday, June 10th, 2022 at 6:41 PM, Eli Zaretskii <> wrote:

> > Date: Fri, 10 Jun 2022 05:46:44 +0000
> > From: goncholden
> > Cc:
> >
> > > > The TAB key is usually bound to some indentation command such as 
> > > > indent-according-to-mode. So bind that to some other key and TAB to 
> > > > self-insert-command.
> > >
> > > Or use "C-q TAB" to insert a literal TAB no matter what command TAB is
> > > bound to.
> >
> > A superior choice would be to all TAB to be a tab by default, rather than 
> > binding to some other thing, making the key non-functional. RETURN could 
> > introduce indentation, but with the tab
> > key introducing a literal tab.
> No, that would be a step back. TAB is important because it re-indents
> the current line, so you don't need to type RET and insert a newline
> if all you want is re-indentation.
> It is a relatively rare situation where you need to insert a literal
> TAB, so having it bound to self-insert-command would be much less
> useful than its current binding.
> I think your current views are because you are trying to fight Emacs
> features instead of using them to your benefit. Why do you need to
> insert literal TABs so much? You never explained that.

It usually happens with legacy code where people used tabs most times.  Then if 
the setting in for spaces, the file would end with a mix of tabs and spaces.  
Indentation could get mixed up this way.  What could be a solution?  Still with 
'C-q TAB' ?

reply via email to

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