Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
9 votes
3 answers
528 views

Lambda in `defun` Captures the Lexical Environment, But in `let` It Doesn't

My example is simplified: (defvar wtf 10) (defun f (wtf) (lambda () (cl-incf wtf))) (setq f (f 20)) (setq g (let ((wtf 30)) (lambda () (cl-incf wtf)))) (list (funcall f) ...
shynur's user avatar
  • 5,890
4 votes
1 answer
80 views

why is a let binding is ignored in compiled function?

I have this function which works perfectly in an uncompiled function. It should let-bind the variable bibtex-completion-bibliography to the result of (org-ref-find-bibliography). (defun org-ref-...
John Kitchin's user avatar
  • 12.1k