Subject: Re: bug#54491: 27.2; left-margin variable breaks autoload generation

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 21 Mar 2022 16:19:20 +0100

Will Tower <[email-masked]> writes:

> Setting left-margin variable breaks many autoload files when
> installing or updating packages.

Easier reproduction (well, if you're in the development tree):

diff --git a/src/buffer.c b/src/buffer.c
index f8a7a4f510..e567a8e23c 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5334,7 +5334,7 @@ init_buffer_once (void)
   bset_enable_multibyte_characters (&buffer_defaults, Qt);
   bset_buffer_file_coding_system (&buffer_defaults, Qnil);
   XSETFASTINT (BVAR (&buffer_defaults, fill_column), 70);
-  XSETFASTINT (BVAR (&buffer_defaults, left_margin), 0);
+  XSETFASTINT (BVAR (&buffer_defaults, left_margin), 8);
   bset_cache_long_scans (&buffer_defaults, Qt);
   bset_file_truename (&buffer_defaults, Qnil);
   XSETFASTINT (BVAR (&buffer_defaults, display_count), 0);

and then "make ldefs-boot.el", and observe that ldefs-boot.el is broken:

(autoload 'allout-widgets-mode "allout-widgets" "\
("Toggle Allout Widgets mode.

	This is a minor mode.  If called interactively, toggle the
	`Allout-Widgets mode' mode.  If the prefix argument is
	positive, enable the mode, and if it is zero or negative,
	disable the mode.

instead of

(autoload 'allout-mode "allout" "\
Toggle Allout outline mode.

This is a minor mode.  If called interactively, toggle the `Allout
mode' mode.  If the prefix argument is positive, enable the mode, and
if it is zero or negative, disable the mode.

(Although you may find it difficult to then actually build Emacs
afterwards.)

I haven't tried debugging further -- is it obvious to anybody else
what's breaking here?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no