[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 02:03:59 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Drew Adams wrote:
> That just shows that most Elisp files provided with Emacs
> have `lexical-binding' = t.
Yes - most :)
> Dynamic binding is still the default in Elisp. The doc is
> correct about that.
Yes, but isn't that a practical measure so that legacy code
won't break? Optimally all files will have the "-*-
lexical-binding: t -*-" directive first, then lexical binding
can be the default and that line won't be needed.
After that one can have the advantages of lexical binding in
general but one can still have dynamic/special variables for
options and other possible use cases, so there is no loss in
that respect.
There are also some interesting border cases where the
endpoints seems to meat, for example this
;; Provide an easy hook to tell if we are running with floats or not.
;; Define pi and e via math-lib calls (much less prone to killer typos).
(defconst float-pi (* 4 (atan 1)) "The value of Pi (3.1415926...).")
(with-suppressed-warnings ((lexical pi))
(defconst pi float-pi
"Obsolete since Emacs-23.3. Use `float-pi' instead."))
(make-obsolete-variable 'pi 'float-pi "23.3")
(internal-make-var-non-special 'pi)
Lines 28-35 in
/usr/local/share/emacs/30.0.50/lisp/emacs-lisp/float-sup.el
Yeah, what should one make of it?
But now the discussion is about dynamic vs lexical scope, what
I said refered to global variables. Why have them with
`defvar', and why have them with `setq'? Often there is no
need for them to be global, that just creates problems.
--
underground experts united
https://dataswamp.org/~incal
- Re: Printing alist pairs to a dedicated buffur, (continued)
- Re: Printing alist pairs to a dedicated buffur, Emanuel Berg, 2024/04/25
- Re: Printing alist pairs to a dedicated buffur, Heime, 2024/04/25
- Re: Printing alist pairs to a dedicated buffur, Emanuel Berg, 2024/04/26
- RE: [External] : Re: Printing alist pairs to a dedicated buffur, Drew Adams, 2024/04/25
- RE: [External] : Re: Printing alist pairs to a dedicated buffur, Heime, 2024/04/25
- Re: [External] : Re: Printing alist pairs to a dedicated buffur, Emanuel Berg, 2024/04/25
- Re: [External] : Re: Printing alist pairs to a dedicated buffur, Emanuel Berg, 2024/04/25
- RE: [External] : Re: Printing alist pairs to a dedicated buffur, Drew Adams, 2024/04/25
- Re: [External] : Re: Printing alist pairs to a dedicated buffur,
Emanuel Berg <=
- RE: [External] : Re: Printing alist pairs to a dedicated buffur, Drew Adams, 2024/04/26
- RE: [External] : Re: Printing alist pairs to a dedicated buffur, Heime, 2024/04/26
- Re: [External] : Re: Printing alist pairs to a dedicated buffur, Yuri Khan, 2024/04/26
- Re: [External] : Re: Printing alist pairs to a dedicated buffur, Heime, 2024/04/27
- Re: [External] : Re: Printing alist pairs to a dedicated buffur, Emanuel Berg, 2024/04/26
- Re: [External] : Re: Printing alist pairs to a dedicated buffur, Emanuel Berg, 2024/04/26