Subject: Re: File local byte-compile-dynamic-docstrings:nil ignored (was: bug#68200: 30.0.50; Emacs reloads init file when calling `documentation')
From: Alan Mackenzie <[email-masked]>
To: Michael Heerdegen <[email-masked]>
Cc: Gerd Möllmann <[email-masked]>, [email-masked], Eli Zaretskii <[email-masked]>, [email-masked]
Date: Thu, 11 Jan 2024 17:59:34 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello, Michael.

On Wed, Jan 10, 2024 at 04:28:32 +0100, Michael Heerdegen wrote:
> Alan Mackenzie <[email-masked]> writes:

> > You've almost certainly written your own patch for it by now, but
> > nevertheless, could I ask you to try out this patch.  I don't have a
> > convenient test case here.

> > diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
> > index 2bc8d54ba77..ad8d53d01e9 100644
> > --- a/lisp/emacs-lisp/bytecomp.el
> > +++ b/lisp/emacs-lisp/bytecomp.el
> > @@ -2605,9 +2605,10 @@ byte-compile-output-docform
> >  `defvaralias', `autoload' and `custom-declare-variable' need that."
> >    ;; We need to examine byte-compile-dynamic-docstrings
> >    ;; in the input buffer (now current), not in the output buffer.
> > -  (let ((byte-compile-dynamic-docstrings byte-compile-dynamic-docstrings))
> > +  (let ((dynamic-docstrings byte-compile-dynamic-docstrings))
> >      (with-current-buffer byte-compile--outbuffer
> > -      (let ((position (point))
> > +      (let ((byte-compile-dynamic-docstrings dynamic-docstrings)
> > +            (position (point))

> Yes, that's what I tried as well.  This approach seems to fix this
> problem here, so: fine by me.

OK, I've committed the fix and I'm closing the bug with this post.

> Thanks,

> Michael.

-- 
Alan Mackenzie (Nuremberg, Germany).