emacs-devel
[Top][All Lists]
Advanced

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

RE: Can't M-x compile-defun `edebug' because dynamic variables are false


From: Drew Adams
Subject: RE: Can't M-x compile-defun `edebug' because dynamic variables are falsely taken as lexical.
Date: Thu, 13 Feb 2020 12:43:29 -0800 (PST)

> > Can we please fix the doc, to make things clear?
> 
> I added:
> 
>   Note that since this is a function, it can only return
>   non-@code{nil} for variables which are permanently special, but not
>   for those that are only special in the current lexical scope.

Thanks very much for working on this.

But I'm afraid I don't know what a permanent versus
temporary special variable is.  And I haven't found
anything in the doc that has helped me with that.

I looked in Elisp nodes `Using Lexical Binding',
where `special-variable-p' is documented, and
`Defining Variables', where `defvar' is doc'd.
"special" variable seems to be defined as a term
in each of those nodes, BTW.  (I also looked in
node `Variable Scoping'.)

Node `Defining Variables' seems to say that using
`defvar' is enough to make a variable "always"
dynamic:

  The variable is marked as "special", meaning
  that it should always be dynamically bound
                 ^^^^^^
  (*note Variable Scoping::).

Is "always" something different from "permanent"?

Sorry, but I really don't understand what is meant
by what you wrote.  I also don't understand the
implication, "since this is a function".
              ^^^^^
But maybe that's because I don't understand
"permanently special" and "only special in the
current lexical scope".

AFAIK, in Common Lisp a variable is either special
or it's not.  If it is then its binding by `let'
is dynamic, and if it's not then its let-binding
is lexical. (No?)



reply via email to

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