Subject: Re: bug#54031: 29.0.50; *scratch* buffer defaults to dynamic scoping when initial-major-mode 'emacs-lisp-mode

From: No Wayman <[email-masked]>
Date: Wed, 16 Feb 2022 17:48:20 -0500

Lars Ingebrigtsen <[email-masked]> writes:

> No Wayman <[email-masked]> writes:
>
>> With the following minimal init.el the initial *scratch* buffer 
>> does
>> not have lexical binding enabled:
>>
>> (setq initial-buffer t
>
> This variable doesn't seem to exist (in Emacs 29).
>

Apologies, a typo of initial-buffer-choice on my end.

>>      initial-major-mode 'emacs-lisp-mode)
>>
>> Bug, or my misunderstanding?
>
> emacs-lisp-mode defaults to dynamic binding, so this sounds like 
> it's
> working as designed.

I see now after a closer reading of the NEWS.27 entry:

> ** Lexical binding is now used by default when evaluating 
> interactive Elisp.
> [...] as well as in
> 'lisp-interaction-mode' and 'ielm-mode', used in the "*scratch*" 
> and
> "*ielm*" buffers.

Agreed that it sounds like it's working as designed.
Sorry for the noise and thanks for your help.