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: Tassilo Horn
Subject: Re: Spaces rather than tabs by a major mode hook
Date: Thu, 09 Jun 2022 21:24:52 +0200
User-agent: mu4e 1.7.26; emacs 29.0.50

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



reply via email to

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