emacs-devel
[Top][All Lists]
Advanced

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

Re: general lazy list facility for Emacs Lisp?


From: Stefan Monnier
Subject: Re: general lazy list facility for Emacs Lisp?
Date: Wed, 23 Mar 2011 17:51:05 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> (let ((x 1))
>   (defun lex-test (y)
>     (+ x y)))

Note that the byte-compiler won't like the above.  You'll want either

  (let ((x 1))
    (defalias 'lex-test (lambda (y) (+ x y))))

or

  (defalias 'lex-test (let ((x 1)) (lambda (y) (+ x y))))

or something like that.
  
>> and will report issues if I find one in my daily use.
> Found one!  C-h k lexical-binding RET errors.

Hmm... works here.

> I've reported it, but the confirmation mail has not yet arrived.

I'll wait for the precise report, then.

>> I guess, that there are many packages that won't work with
>> lexical-binding set to t, right?

Indeed.  Tho check the Elisp manual for hints about how to convert
(it's usually pretty easy).

> Seems to be a false assumption.  At least org and Gnus are running fine.

I think you're misunderstanding your test, because I doubt either of
Gnus or Org would work with lexical-binding without any
additional modification.
lexical-binding is a variable that applies to a file/buffer.  E.g. it
affects the compiler but not the compiled code.


        Stefan



reply via email to

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