unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: News from the lexical world
Date: Sat, 10 Apr 2021 17:32:00 -0400	[thread overview]
Message-ID: <jwvwnt9lu0i.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <jwvmtw9dzse.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Fri, 12 Feb 2021 11:23:13 -0500")

Stefan Monnier [2021-02-12 11:23:13] wrote:
> Sorry to interrupt your great keybindings discussion, but I'll just
> point out that we have now converted to lexical-binding a bit over 80%
> of Emacs's ELisp files.

Things have progressed a bit since.  We're now down to:

      1 lisp/org/
      1 lisp/progmodes/

    2 / 2019 = 0.099058940069341253%

I.e. there are only 2 files left in Emacs's ELisp codebase which come
without the `lexical-binding:t` cookie.  These are `org-agenda.el`
(which has already been converted upstream, so we're just waiting for
that code to make its way to an Org release and then to Emacs's
`master`) and `verilog-mode.el` (where the situation is a good bit more
delicate: verilog-mode can be used with Verilog files written
specifically for verilog-mode, with embedded ELisp snippets run via
`eval`, and those snippets tend to use "arbitrary" variables which
happened to be bound at that time, so we're still working on
a satisfactory solution, which will likely involve documenting which of
those variables can be used that way, along with what they mean).

This doesn't quite mean that all of Emacs's ELisp code is now using the
new dialect.  The old non-lexbind dialect is still used in a few cases:

- There are still a fair number of calls to `eval` with a nil (or, more
  often, absent) second argument.

- There is also still some code which builds lambda expressions "by
  hand" (typically via backquote or otherwise embedded inside a larger
  quoted piece of data) and without passing the resulting "source code
  expression" to `eval` (or to the byte-compiler) to turn it into
  a "function value".  In the dynbind world those two were one and the
  same, but not so in the lexbind world, and a value that starts with
  a `lambda` will see its body evaluated using the old ELisp dialect.

I welcome help updating those cases.


        Stefan




  parent reply	other threads:[~2021-04-10 21:32 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-12 16:23 News from the lexical world Stefan Monnier
2021-02-12 16:49 ` Stefan Kangas
2021-02-13 11:06   ` Lars Ingebrigtsen
2021-02-12 21:37 ` Andrea Corallo via Emacs development discussions.
2021-02-15 19:18 ` Phillip Lord
2021-04-10 21:32 ` Stefan Monnier [this message]
2021-04-11  6:37   ` Lars Ingebrigtsen
2021-04-11  7:20   ` Andrea Corallo via Emacs development discussions.
2021-04-11 13:44     ` T.V Raman
2021-04-11 14:39       ` Stefan Monnier
2021-04-11 15:10         ` T.V Raman
2021-04-11 15:42         ` Eli Zaretskii
2021-04-11 16:34           ` Stefan Monnier
2021-04-12  8:34             ` Andrea Corallo via Emacs development discussions.
2021-04-12 11:58               ` Eli Zaretskii
2021-04-12 12:58                 ` Andrea Corallo via Emacs development discussions.
2021-04-12 13:23                   ` Stefan Kangas
2021-04-12 13:24                   ` Eli Zaretskii
2021-04-26  6:47   ` Andrew Cohen
2021-04-26 10:08     ` Stefan Kangas
2021-04-26 12:06       ` Andrew Cohen
2021-04-26 16:06         ` Stefan Monnier
2021-04-26 23:31           ` Andrew Cohen
2021-04-29 22:06             ` Stefan Monnier
2021-04-30  0:17               ` Andrew Cohen

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=jwvwnt9lu0i.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --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 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).