1

In Common Lisp this sort of thing works fine

(let ((x 7))
  (defun g (y) (* y x)))

(g 16)

In elisp this errors saying x is not defined as if the lexical closure did not happen. This is something I have not encountered in other lisps. What is happening with this?

Drew
  • 29,895
  • 7
  • 74
  • 104
Samantha Atkins
  • 658
  • 4
  • 12

1 Answers1

3

Ah, I see. It works after

(setq lexical-binding t)
Samantha Atkins
  • 658
  • 4
  • 12