News for hackers. Stuff that matters.
Re:GNU Emacs 24.1 released by carterschonwald on Sunday June 10, 2012 @10:06AM (#4091077)
Woah, emacs lisp now has lexical scoping
Re:GNU Emacs 24.1 released by conanite on Sunday June 10, 2012 @10:40AM (#4091159)
Yes, this is pretty radical. More info from the manual:

http://www.gnu.org/software/emacs/manual/html_node/elisp/Usi...

from http://www.gnu.org/software/emacs/manual/html_node/elisp/Lex... -

Such code is also much more friendly to concurrency, which we want to add to Emacs in the near future.

Exciting times ahead ...

Re:GNU Emacs 24.1 released by ams6110 on Sunday June 10, 2012 @10:57AM (#4091203)
Indeed, will be nice when something blocking in one window doesn't lock up the whole emacs process.
Re:GNU Emacs 24.1 released by unhammer on Monday June 11, 2012 @04:15AM (#4093648)
YES! E.g. try running emacs on $host and run bbdb; go to some other machine and ssh ~/.bbdb $host:~/.bbdb; then ssh $host emacsclient. Now it's unresponsive until you walk over on your feet to $host and answer the revert-or-not question :(
Re:GNU Emacs 24.1 released by Derbasti on Sunday June 10, 2012 @02:46PM (#4091806)
Yes, ohhh, yes, I want that!
Re:GNU Emacs 24.1 released by intranation on Sunday June 10, 2012 @10:31AM (#4091136)
It's opt-in, otherwise most packages would break.

To enable it per-file use a file-local variable:

  ;;; -*- lexical-binding: t -*-
Re:GNU Emacs 24.1 released by perlgeek on Sunday June 10, 2012 @04:01PM (#4092023)
How ironic. Wouldn't it make much sense to enable it per lexical scope?

Or as Perl did it (18 years ago) with a new keyword, so that you can use both dynamic and lexical variables in the same file? Best of both worlds.

Re:GNU Emacs 24.1 released by onedognight on Sunday June 10, 2012 @11:08PM (#4093042)
You can use both in the same file; you just need to declare the dynamic ones using defvar, etc. If you turn lexical-binding on blindly, the compiler will usually tell you which variables you need to mark as dynamic.
Re:GNU Emacs 24.1 released by unhammer on Monday June 11, 2012 @04:16AM (#4093653)
(eval form t) enables lexical scoping for form. http://yoo2080.wordpress.com/2011/12/31/lexical-scoping-and-... is highly recommended reading btw.
Re:GNU Emacs 24.1 released by rcthompson on Monday June 11, 2012 @11:25PM (#4098550)
It has to be this way to remain backward-compatible. Similar to the issues Perl is going through with things like enabling strict by default (you have to request at least a certain version, I think 5.12), and distinguishing a Perl 6 file from Perl 5 one.
Re:GNU Emacs 24.1 released by m00natic on Sunday June 10, 2012 @05:17PM (#4092241)
Well, there has been lexical-let in the cl package for quite a while.