all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Phil Sainty <psainty@orcon.net.nz>
Cc: 49116@debbugs.gnu.org, psainty@orcon.net.nz, bugs@gnu.support
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	[thread overview]
Message-ID: <83lf76vwt8.fsf@gnu.org> (raw)
In-Reply-To: <3157c274e97fc9db7ceb345ba020f74b@webmail.orcon.net.nz> (message from Phil Sainty on Sun, 20 Jun 2021 00:49:14 +1200)

> 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	other threads:[~2021-06-19 12:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-19 11:39 bug#49116: 28.0.50; Why `bound-and-true-p' is not working in lexical binding? Jean Louis
2021-06-19 12:49 ` Phil Sainty
2021-06-19 12:54   ` Eli Zaretskii [this message]
2021-06-19 13:01     ` Lars Ingebrigtsen
2021-06-19 13:13     ` Phil Sainty
2021-06-19 13:21       ` Lars Ingebrigtsen
2021-06-21 17:00         ` Michael Heerdegen
2021-06-22 12:59           ` Lars Ingebrigtsen
2021-06-22 23:00 ` Michael Heerdegen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83lf76vwt8.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=49116@debbugs.gnu.org \
    --cc=bugs@gnu.support \
    --cc=psainty@orcon.net.nz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.