[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sending function arguments to recursive function calls
From: |
Stefan Monnier |
Subject: |
Re: sending function arguments to recursive function calls |
Date: |
Sat, 04 May 2013 21:22:12 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> If I copy this function to *scratch* and evaluate the defun with C-x
> C-e, I expect not to have broken anything. What happens instead is
Reality is that there are 2 Emacs Lisps. One is the dynamically scoped
Elisp, and the other is the lexically scoped Elisp.
They are very similar, but they are two different languages.
When evaluating code (e.g. with C-x C-e), Emacs has to "guess" which
in Elisp this is supposedly written. It does that by checking the value
of `lexical-binding' variable. In face-remap.el, this variable is set
to t, whereas in *scratch* it is set to nil, so by moving the code from
one buffer to the other, you asked Emacs to interpret this code in "the
other Elisp". And this failed because the code you copied relies on
behavior specific to lexical scoping (a lot of Elisp code doesn't care
either way).
Stefan
- Re: sending function arguments to recursive function calls, (continued)
- Message not available
- Re: sending function arguments to recursive function calls, Pascal J. Bourguignon, 2013/05/19
- Re: sending function arguments to recursive function calls, Dmitry Gutov, 2013/05/20
- Message not available
- Re: sending function arguments to recursive function calls, Pascal J. Bourguignon, 2013/05/20
- Re: sending function arguments to recursive function calls, Pascal J. Bourguignon, 2013/05/07
- Message not available
- Re: sending function arguments to recursive function calls, Pascal J. Bourguignon, 2013/05/07
- Re: sending function arguments to recursive function calls, Stefan Monnier, 2013/05/08
Re: sending function arguments to recursive function calls,
Stefan Monnier <=