Subject: bug#65349: 29.1; "setq-default indent-tabs-mode nil" seem to be ignored

From: Eli Zaretskii <[email-masked]>
Date: Thu, 17 Aug 2023 17:06:28 +0300

> From: håkan engblom <[email-masked]>
> Date: Thu, 17 Aug 2023 14:09:26 +0200
> 
> I'm using Ubuntu 20.04 and the emacs version is:
> 
> GNU Emacs 29.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of
> 2023-08-04
> 
> as seen when I look the emacs-menu help->About Emacs
> 
> In my .emacs file this line is present:
> 
> (setq-default indent-tabs-mode nil)
> 
> which, as far as I understand, shall make the default setting of this variable (indent-tabs-mode) to be
> disabled, i.e. instead of inserting a tab in the code-file, it shall insert a number of spaces, four to be
> exact, according to this line in .emacs:
> 
> (setq-default tab-width 4)
> 
> This is what I want, and it has worked fine until recently. What I get now is that emacs insert a tab (\t)
> character instead. I suspect that it broke during some upgrade of emacs, judging from the build date
> of emacs it is updated recently, 2023-08-04

I cannot reproduce this in Emacs 29.1.  What happens if you start
Emacs as "emacs -Q" and then type

  M-: (setq-default indent-tabs-mode nil) RET

Does then every buffer you create and every file you visit have
indent-tabs-mode set to nil?  That's what happens to me, and that's
what I expect.

If this works as expected in "emacs -Q", then something in your
customizations causes the problem, and you should bisect your
customizations to find which of them does that.

> So it seems to me the problem is that the default setting of this variable is ignored.

It isn't ignored on my system.