GNU bug report logs - #54031
29.0.50; *scratch* buffer defaults to dynamic scoping when initial-major-mode 'emacs-lisp-mode

Previous Next

Package: emacs;

Reported by: No Wayman <iarchivedmywholelife <at> gmail.com>

Date: Wed, 16 Feb 2022 22:23:02 UTC

Severity: normal

Tags: notabug

Found in version 29.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 54031 in the body.
You can then email your comments to 54031 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#54031; Package emacs. (Wed, 16 Feb 2022 22:23:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to No Wayman <iarchivedmywholelife <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 16 Feb 2022 22:23:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: No Wayman <iarchivedmywholelife <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; *scratch* buffer defaults to dynamic scoping when
 initial-major-mode 'emacs-lisp-mode
Date: Wed, 16 Feb 2022 17:13:33 -0500
With the following minimal init.el the initial *scratch* buffer 
does not have lexical binding enabled:

(setq initial-buffer t
     initial-major-mode 'emacs-lisp-mode)

Bug, or my misunderstanding?

In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 
3.24.31, cairo version 1.17.4)
of 2022-02-16 built on nbook
Repository revision: 8737d79be8f82bb12ca12dc1a7de37a4d2875f39
Repository branch: master
System Description: Arch Linux

Configured using:
'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
--localstatedir=/var --mandir=/usr/share/man 
--with-gameuser=:games
--with-sound=alsa --with-modules --without-libotf 
--without-m17n-flt
--without-gconf --without-gsettings --with-native-compilation
--with-xinput2 --with-pgtk --without-xaw3d --with-sound=no
--without-gpm --without-compress-install
'--program-transform-name=s/\([ec]tags\)/\1.emacs/'
'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt 
-fexceptions
-Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security
-fstack-clash-protection -fcf-protection'
LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS HARFBUZZ JPEG JSON 
LCMS2
LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK 
PNG
RSVG SECCOMP SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP XIM 
GTK3 ZLIB
Important settings:
 value of $LANG: en_US.UTF-8
 locale-coding-system: utf-8-unix





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54031; Package emacs. (Wed, 16 Feb 2022 22:31:02 GMT) Full text and rfc822 format available.

Message #8 received at 54031 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: No Wayman <iarchivedmywholelife <at> gmail.com>
Cc: 54031 <at> debbugs.gnu.org
Subject: Re: bug#54031: 29.0.50; *scratch* buffer defaults to dynamic
 scoping when initial-major-mode 'emacs-lisp-mode
Date: Wed, 16 Feb 2022 23:30:39 +0100
No Wayman <iarchivedmywholelife <at> gmail.com> 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).

>      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.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54031; Package emacs. (Wed, 16 Feb 2022 22:51:02 GMT) Full text and rfc822 format available.

Message #11 received at 54031 <at> debbugs.gnu.org (full text, mbox):

From: No Wayman <iarchivedmywholelife <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 54031 <at> debbugs.gnu.org
Subject: Re: bug#54031: 29.0.50; *scratch* buffer defaults to dynamic
 scoping when initial-major-mode 'emacs-lisp-mode
Date: Wed, 16 Feb 2022 17:48:20 -0500
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> No Wayman <iarchivedmywholelife <at> gmail.com> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54031; Package emacs. (Thu, 17 Feb 2022 11:49:01 GMT) Full text and rfc822 format available.

Message #14 received at 54031 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: No Wayman <iarchivedmywholelife <at> gmail.com>
Cc: 54031 <at> debbugs.gnu.org
Subject: Re: bug#54031: 29.0.50; *scratch* buffer defaults to dynamic
 scoping when initial-major-mode 'emacs-lisp-mode
Date: Thu, 17 Feb 2022 12:48:44 +0100
No Wayman <iarchivedmywholelife <at> gmail.com> writes:

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

No problem; I'm closing this bug report, then.

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




Added tag(s) notabug. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 17 Feb 2022 11:49:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 54031 <at> debbugs.gnu.org and No Wayman <iarchivedmywholelife <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 17 Feb 2022 11:49:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 18 Mar 2022 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 145 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.