Subject: bug#15070: 24.3.50.1; eval-buffer ignores the buffer local value of lexical-binding.

From: E Sabof <[email-masked]>
Date: Sun, 11 Aug 2013 14:16:11 +0100

In emacs -Q:

    M-: (setq lexical-binding t)

paste the following:

    (funcall
     (let ((a 5))
       (lambda ()
         a)))

M-x eval-buffer
The error (void-variable a) will be thrown.

The snippet will be evaluated correctly, only if one inserts

    ;; -*- lexical-binding:t -*-

on the first line