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

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

bug#49116: 28.0.50; Why `bound-and-true-p' is not working in lexical bin


From: Eli Zaretskii
Subject: bug#49116: 28.0.50; Why `bound-and-true-p' is not working in lexical binding?
Date: Sat, 19 Jun 2021 15:54:59 +0300

> Date: Sun, 20 Jun 2021 00:49:14 +1200
> From: Phil Sainty <psainty@orcon.net.nz>
> Cc: 49116-done@debbugs.gnu.org
> 
> (bound-and-true-p VAR) is syntactic sugar for (and (boundp 'VAR) VAR)
> which means that it works only for dynamic variables (i.e. variables
> stored in the value slot of a symbol).
> 
> Under lexical binding, function arguments are lexical variables, which
> means they are not stored in the symbol of that name, and hence cannot
> be detected with `boundp'.

Should this be mentioned in the doc string of bound-and-true-p?





reply via email to

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