unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Jean Louis <bugs@gnu.support>
To: tomas@tuxteam.de
Cc: emacs-devel@gnu.org
Subject: Re: Why is lexical-binding's global value ignored?
Date: Sun, 29 Jan 2023 12:36:00 +0300	[thread overview]
Message-ID: <Y9Y+AHkw06zWEBGy@protected.localdomain> (raw)
In-Reply-To: <Y9TKX7g1kc4oqh1h@tuxteam.de>

* tomas@tuxteam.de <tomas@tuxteam.de> [2023-01-28 10:12]:
> On Fri, Jan 27, 2023 at 08:01:47PM -0700, abq@bitrot.link wrote:
> > If somebody does (setq-default lexical-binding t), the intention is obvious.
> > But in current versions of Emacs, when loading a file that doesn't specify a
> > local value for lexical-binding, the global value is ignored. Why?
> > 
> > IOW, what would break if the global value were honored? It defaults to nil,
> > which is already how files are loaded if no local value is specified, so
> > honoring the global wouldn't change anything by default.
> 
> I think it's backward compatibility, mainly. Files with no explicit
> lexical binding setting (may) contain code which expects dynamic
> binding and would break.

Some programs cannot work with lexical binding turned on.

Such is the RCD Template Interpolation System for Emacs:
https://hyperscope.link/3/7/1/3/3/RCD-Template-Interpolation-System-for-Emacs.html

I use that package for text based spreadsheet-like calculations.

Demonstration here:
https://gnu.support/images/2022/11/2022-11-11/2022-11-11-11:11:11.ogv

Calling it from lexical bindings works only with modified `rcd-dlet'
function, how it was in it's original. 

Calling is one aspect of it.

Other application that does not work with lexical binding is `eev' package.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



  reply	other threads:[~2023-01-29  9:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-28  3:01 Why is lexical-binding's global value ignored? abq
2023-01-28  7:10 ` tomas
2023-01-29  9:36   ` Jean Louis [this message]
2023-01-31  4:19     ` Richard Stallman
2023-01-31 13:49       ` Eli Zaretskii
2023-01-28 16:11 ` abq
2023-01-28 18:44   ` tomas
2023-01-28 22:34   ` abq
2023-01-29  6:54     ` Eli Zaretskii
2023-01-30  3:53       ` abq
2023-01-30 12:32         ` Eli Zaretskii
2023-01-30 12:59           ` tomas
2023-01-30 13:45         ` Po Lu
2023-02-01  2:04     ` abq

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=Y9Y+AHkw06zWEBGy@protected.localdomain \
    --to=bugs@gnu.support \
    --cc=emacs-devel@gnu.org \
    --cc=tomas@tuxteam.de \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).