Obey lexical-binding in interactive evaluation commands.
[bpt/emacs.git] / lisp / ielm.el
index dc84537..e1f8dc7 100644 (file)
@@ -1,7 +1,7 @@
 ;;; ielm.el --- interaction mode for Emacs Lisp
 
 ;; Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005,
-;;   2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;;   2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 ;; Author: David Smith <maa036@lancaster.ac.uk>
 ;; Maintainer: FSF
@@ -372,7 +372,8 @@ simply inserts a newline."
                                   (*** *3))
                               (kill-buffer (current-buffer))
                               (set-buffer ielm-wbuf)
-                              (setq ielm-result (eval ielm-form))
+                              (setq ielm-result
+                                     (eval ielm-form lexical-binding))
                               (setq ielm-wbuf (current-buffer))
                               (setq
                                ielm-temp-buffer