Subject: bug#30484: Use lexical binding

From: David Kastrup <[email-masked]>
Date: Fri, 16 Feb 2018 10:39:34 +0100

Mosè Giordano <[email-masked]> writes:

> We should make sure AUCTeX doesn't fundamentally use dynamic binding,
> in order to later switch to lexical binding.

You have to pick one or the other for the equivalent of closures.

I do think we have a few cases of those that would benefit from lexical
binding.  Should I go over them?

As a first idea:

dak@lola:/usr/local/tmp/auctex$ git grep '`(lambda'
preview.el.in:                `(lambda (process command)
preview.el.in:    `(lambda() (interactive "@")
preview.el.in:     `(lambda() (interactive)
preview.el.in:  `(lambda nil
preview.el.in:     `(lambda() (interactive) (preview-regenerate ,ov)))
preview.el.in:  (add-hook 'desktop-delay-hook `(lambda ()
preview.el.in:            `(lambda(event) (interactive "e")
preview.el.in:            `(lambda(event) (interactive "e")
preview.el.in:              `(lambda(event) (interactive "e")
preview.el.in:              `(lambda(event) (interactive "e")
preview.el.in:        `(lambda (process string)
preview.el.in:            `(lambda (process string)
preview.el.in:     `(lambda () (preview-dump-state ,(current-buffer)))
tex-buf.el:     (file `(lambda (&rest args)
tex.el:        :filter `(lambda (&rest ignored)
toolbar-x.el:                 `(lambda nil (interactive)
toolbar-x.el:    `(lambda nil (interactive) (popup-menu (quote ,keymap)))))

-- 
David Kastrup