unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* lexical-binding defined by the caller not the called?
@ 2013-04-28 11:26 Nic Ferrier
  2013-04-28 11:53 ` Pascal J. Bourguignon
  0 siblings, 1 reply; 7+ messages in thread
From: Nic Ferrier @ 2013-04-28 11:26 UTC (permalink / raw)
  To: emacs-devel

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-05-04 20:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-28 11:26 lexical-binding defined by the caller not the called? Nic Ferrier
2013-04-28 11:53 ` Pascal J. Bourguignon
2013-04-28 13:59   ` Nic Ferrier
2013-04-28 14:10     ` Pascal J. Bourguignon
2013-04-28 17:50       ` Nic Ferrier
2013-04-28 19:40         ` Pascal J. Bourguignon
2013-05-04 20:01         ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).