emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Add ob-sclang.el for sclang Org-mode babel support in contrib/


From: Bastien Guerry
Subject: Re: [O] Add ob-sclang.el for sclang Org-mode babel support in contrib/
Date: Sun, 18 Jun 2017 23:32:03 +0200
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/26.0 (gnu/linux)

Hi Nicolas,

Nicolas Goaziou <address@hidden> writes:

> There is absolutely no drawback in using lexical binding. Since Emacs
> 24.1, it _is_ the default for Elisp: every Elisp file created activates
> it, the other binding being for compatibility with older libraries.

Maybe I miss something: when I create a file with C-x C-f whatever.el RET
it does not use a template or does not get created with lexical binding on.

What are you referring to when you say "every Elisp file created activates it"?

> Please, pretty please, don't suggest it is different.

Quoting the Emacs Lisp manual:

  This is the ‘GNU Emacs Lisp Reference Manual’ corresponding to Emacs
  version 26.0.50.

  ...

  Scoping Rules for Variable Bindings

  * Dynamic Binding::         The default for binding local variables in Emacs.
  * Dynamic Binding Tips::    Avoiding problems with dynamic binding.
  * Lexical Binding::         A different type of local variable binding.

  ...

  12.10.1 Dynamic Binding
  -----------------------
  
  By default, the local variable bindings made by Emacs are dynamic
  bindings.  When a variable is dynamically bound, its current binding at
  any point in the execution of the Lisp program is simply the most
  recently-created dynamic local binding for that symbol, or the global
  binding if there is no such local binding.

To me the manual clearly says dynamic binding is the default, and
that's why using lexical binding requires additional info in the file.

Whether lexical binding is a good default or not is another question,
and whether lexical-binding:t makes sense in a file with no binding
yet another, third one.

-- 
 Bastien



reply via email to

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