bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#64272: 28.1; lisp_file_lexically_bound_p behavior mismatches file lo


From: LdBeth
Subject: bug#64272: 28.1; lisp_file_lexically_bound_p behavior mismatches file local variables
Date: Sat, 24 Jun 2023 13:22:38 -0500
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (Gojō) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.1 (x86_64-apple-darwin21.4.0) MULE/6.0 (HANACHIRUSATO)

Basically, if an emacs lisp source file starts with some whitespace

| ;; -*- lexical-binding: t -*-
|(let ((x 1)) (setq foo (lambda () x)))
|(funcall foo)

rather than

|;; -*- lexical-binding: t -*-
|(let ((x 1)) (setq foo (lambda () x)))
|(funcall foo)

that will cause `load' eval the file with `lexical-binding' set to nil,
and would report `x' is a void variable.

This behavior is in contrast to how file local variables are applied
when opening a file, that is, as long as the variable list is in
the first line, it is applied.

Either the documentation should bring up this behavior, or the
C function `lisp_file_lexically_bound_p' in `src/lread.c' should be fixed.



-- 
ldb






reply via email to

[Prev in Thread] Current Thread [Next in Thread]