help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [External] : Re: Printing alist pairs to a dedicated buffur


From: Emanuel Berg
Subject: Re: [External] : Re: Printing alist pairs to a dedicated buffur
Date: Fri, 26 Apr 2024 00:29:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Drew Adams wrote:

>> `setq' creates global static/lexical variables
>
> Not true.

As you know -

unless there already is another variable with that name, and
such as that can be present in many forms (`let' bindings,
formal parameters etc) including dynamic/special variables and
if so it remains dynamic/special with `setq' but otherwise
it'll be static/lexical.

> As (elisp) "Scoping Rules for Variable Bindings" says:
>
>   "By default, the local bindings that Emacs 
>    creates are "dynamic bindings".
>    ...
>    The dynamic binding was (and still is)
>    the default in Emacs for many years [...]

Emacs is de facto static/lexical.

  $ cd ~/src/emacs

  $ ls **/*.el | wc -l
  2312

  $ head **/*.el | grep -I "lexical-binding" | wc -l
  2285

There are certain interesting special cases, let's return to
those some other time.

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]