emacs-devel
[Top][All Lists]
Advanced

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

lexical-binding defined by the caller not the called?


From: Nic Ferrier
Subject: lexical-binding defined by the caller not the called?
Date: Sun, 28 Apr 2013 12:26:30 +0100

Imagine this is a file:

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

(defun my-cool-fun ()
  lexical-binding)

(ert-deftest my-cool-fun ()
  (should (my-cool-fun)))

(ert 'my-cool-fun)

;;; End


eval-buffer that and it fails. Why does it fail? it appears that
lexical-binding is defined by the caller of a function, not the called
function (and the file defining ert is not lexical-binding: t). 

I thought it was the other way around.

Am I seeing some bug or is this the correct behaviour?


Nic Ferrier



reply via email to

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