unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Variables indent-tabs-mode and tab-always-indent
@ 2022-06-19  4:12 carlmarcos--- via Users list for the GNU Emacs text editor
  2022-06-19  6:10 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: carlmarcos--- via Users list for the GNU Emacs text editor @ 2022-06-19  4:12 UTC (permalink / raw)
  To: Help Gnu Emacs


Have encountered two variables, namely `indent-tabs-mode` and `tab-always-indent`.

There is adequate information about `tab-always-indent`.  Documentation for variable `indent-tabs-mode` states "Indentation can insert tabs if this is non-nil".

How do these two variables work together, and do they conflict?


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

* Re: Variables indent-tabs-mode and tab-always-indent
  2022-06-19  4:12 Variables indent-tabs-mode and tab-always-indent carlmarcos--- via Users list for the GNU Emacs text editor
@ 2022-06-19  6:10 ` Eli Zaretskii
  2022-06-19 13:06   ` carlmarcos--- via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2022-06-19  6:10 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Sun, 19 Jun 2022 06:12:54 +0200 (CEST)
> From: carlmarcos--- via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
> 
> 
> Documentation for variable `indent-tabs-mode` states "Indentation can insert tabs if this is non-nil".
> 
> How do these two variables work together

When the value of tab-always-indent and the situation in which you
press the TAB key are such that Emacs decides to indent the line,
indent-tabs-mode controls whether Emacs inserts just spaces or a muix
of TABs and spaces.

> and do they conflict?

No.



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

* Re: Variables indent-tabs-mode and tab-always-indent
  2022-06-19  6:10 ` Eli Zaretskii
@ 2022-06-19 13:06   ` carlmarcos--- via Users list for the GNU Emacs text editor
  2022-06-19 13:54     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: carlmarcos--- via Users list for the GNU Emacs text editor @ 2022-06-19 13:06 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs


Jun 19, 2022, 06:10 by eliz@gnu.org:

>> Date: Sun, 19 Jun 2022 06:12:54 +0200 (CEST)
>> From: carlmarcos--- via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
>>
>>
>> Documentation for variable `indent-tabs-mode` states "Indentation can insert tabs if this is non-nil".
>>
>> How do these two variables work together
>>
>
> When the value of tab-always-indent and the situation in which you
> press the TAB key are such that Emacs decides to indent the line,
> indent-tabs-mode controls whether Emacs inserts just spaces or a muix
> of TABs and spaces.
>
Does this mean that `tab-always-indent` is just about what happens when the tab key is used;
whilst `indent-tabs-mode` is concerned about the indentation style of whether to use tab or spaces? 

>> and do they conflict?
>>
>
> No.
>
Do you recommend to enable both?  The variable `indent-tabs-mode` does not say what it uses as default.



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

* Re: Variables indent-tabs-mode and tab-always-indent
  2022-06-19 13:06   ` carlmarcos--- via Users list for the GNU Emacs text editor
@ 2022-06-19 13:54     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2022-06-19 13:54 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Sun, 19 Jun 2022 15:06:40 +0200 (CEST)
> From: carlmarcos@tutanota.com
> Cc: help-gnu-emacs@gnu.org
> 
>  When the value of tab-always-indent and the situation in which you
>  press the TAB key are such that Emacs decides to indent the line,
>  indent-tabs-mode controls whether Emacs inserts just spaces or a muix
>  of TABs and spaces.
> 
> Does this mean that `tab-always-indent` is just about what happens when the tab key is used;
> whilst `indent-tabs-mode` is concerned about the indentation style of whether to use tab or spaces? 

Yes, exactly.

>  and do they conflict?
> 
>  No.
> 
> Do you recommend to enable both?

That depends on the major mode and its conventions, as well as on your
preferences, and whether you intend to exchange your files with people
who use other editors.

> The variable `indent-tabs-mode` does not say what it uses as default.

It does here:

  indent-tabs-mode is a variable defined in ‘src/indent.c’.

  Its value is nil
  Original value was t    <<<<<<<<<<<<<<<<<<<<<<<<<<<
  Local in buffer shr.el; global value is t



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

end of thread, other threads:[~2022-06-19 13:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-19  4:12 Variables indent-tabs-mode and tab-always-indent carlmarcos--- via Users list for the GNU Emacs text editor
2022-06-19  6:10 ` Eli Zaretskii
2022-06-19 13:06   ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-06-19 13:54     ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).