all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Drew Adams <drew.adams@oracle.com>
Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: Re: Conditional binding and testing of `lexical-binding'
Date: Sun, 02 Jan 2022 13:27:14 -0500	[thread overview]
Message-ID: <jwvk0fivvv8.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <SJ0PR10MB5488D4372A6BCE46CF82D0E1F3479@SJ0PR10MB5488.namprd10.prod.outlook.com> (Drew Adams's message of "Sat, 1 Jan 2022 22:24:36 +0000")

> What's the best way, or a reasonable way, of
> setting `lexical-binding' conditionally,

I don't know what you mean by that, nor why you think it's necessary
for:

> so a library can be used with both Emacs versions that support lexical
> binding and versions that don't support it?

Adding the -*- lexical-binding:t -*- at the beginning of the file
does that (this is used by CC-mode, for example).


        Stefan




  parent reply	other threads:[~2022-01-02 18:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-01 22:24 Conditional binding and testing of `lexical-binding' Drew Adams
2022-01-02 12:36 ` LdBeth
2022-01-02 12:41   ` Po Lu
2022-01-02 18:29     ` Stefan Monnier
2022-01-02 23:01       ` [External] : " Drew Adams
2022-01-02 23:01     ` Drew Adams
2022-01-03  0:49       ` Po Lu
2022-01-02 23:01   ` Drew Adams
2022-01-03  3:09     ` LdBeth
2022-01-03  3:31       ` Drew Adams
2022-01-02 18:27 ` Stefan Monnier [this message]
2022-01-02 23:01   ` Drew Adams

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=jwvk0fivvv8.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=drew.adams@oracle.com \
    --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.