help-gnu-emacs
[Top][All Lists]
Advanced

[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: Thu, 09 Jun 2022 19:40:05 +0000

------- Original Message -------
On Friday, June 10th, 2022 at 7:24 AM, Tassilo Horn <tsdh@gnu.org> wrote:


> goncholden goncholden@protonmail.com writes:
>
> > > > ((c++-mode
> > > > (indent-tabs-mode . t)
> > > > (c-mode
> > > > (indent-tabs-mode . t)))
> >
> > Suppose I have a file with tabs, would the change show the tabs as
> > spaces? I would rather have the file show as it is. If there are
> > tabs in the file, would (setq-default indent-tabs-mode nil) show them
> > as spaces?
>
>
> It doesn't affect how tabs/spaces are displayed. It just defines if
> emacs' indentation commands may insert tabs. Even with indent-tabs-mode
> set to nil, you can still manually insert a TAB using C-q TAB.
>
> If you want to convert a file from/to tabs, you can use the commands
> tabify and untabify.
>
> Bye,
> Tassilo

Makes sense but I find it somewhat complicated.

It works well if I press return and get indentation with spaces.  But if 
someone presses the tab key, why does it not accept that tab?

I would like to be able to introduce a tab with the tab key but indent with 
spaces.




reply via email to

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