all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: emacs-devel@gnu.org
Subject: What's the equivalent of `boundp' for lexical variables?
Date: Fri, 26 Jan 2024 20:16:46 +0000	[thread overview]
Message-ID: <ZbQTLlGyoXckMdM9@ACM> (raw)

Hello, Emacs.

I have a problem in a macro, where I have the expression ,expr.  I want
to evaluate it, but get the error message void-variable (expr).

In the good old days, I could have tested this with

    (if (boundp 'expr) (eval ,expr))

, but now, with lexical variables, I can't find the equivalent to boundp.
Is there such a facility for lexical variables, and if so what is it?

Thanks!

-- 
Alan Mackenzie (Nuremberg, Germany).



             reply	other threads:[~2024-01-26 20:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-26 20:16 Alan Mackenzie [this message]
2024-01-26 20:50 ` What's the equivalent of `boundp' for lexical variables? Andreas Schwab
2024-01-26 20:58   ` Alan Mackenzie
2024-01-26 21:25     ` Andreas Schwab
2024-01-26 21:36       ` Alan Mackenzie
2024-01-26 21:44         ` Andreas Schwab
2024-01-28  5:28         ` Po Lu
2024-01-27  6:21 ` tomas
2024-01-28  3:01   ` Richard Stallman

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=ZbQTLlGyoXckMdM9@ACM \
    --to=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    /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.