Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use lexical-binding in all source files #815

Closed
kazu-yamamoto opened this issue Aug 18, 2015 · 2 comments
Closed

Use lexical-binding in all source files #815

kazu-yamamoto opened this issue Aug 18, 2015 · 2 comments

Comments

@kazu-yamamoto
Copy link
Contributor

Lexical binding is available since Emacs 24 but can be used in way that is compatible with Emacs 23. Tasks to make this happen:

  1. Add ;;; -*- lexical-binding: t -*- to every *.el file.
  2. Fix all warnings about unused lexical variables (be removing a variable or prepending underscore to its name).
  3. Fix all errors about undefined lexical variables (if any).

Example of current output:

In toplevel form:
haskell-modules.el:51:1:Warning: Unused lexical argument `dontcreate'
haskell-modules.el:51:1:Warning: Unused lexical argument `session'
Wrote /Users/kazu/tmp/haskell-mode/haskell-modules.elc
@gracjan gracjan changed the title Unused variables Remove unused variables or mark them with underscore Aug 18, 2015
@gracjan gracjan changed the title Remove unused variables or mark them with underscore Use lexical-binding in all files Aug 22, 2015
@gracjan gracjan changed the title Use lexical-binding in all files Use lexical-binding in all source files Aug 22, 2015
@deepfire
Copy link
Contributor

What might look like unused lexical binding can actually be a used dynamic binding..

@gracjan
Copy link
Contributor

gracjan commented Aug 22, 2015

If this is the case then unused lexical binding should be converted into a declared and used dynamic binding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants