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

Fix byte compiler warnings #18

merged 6 commits into from Aug 30, 2013


None yet
2 participants

Wilfred commented Aug 30, 2013

No functionality changes, just fixing byte compiler warnings.


This comment has been minimized.


kans commented Aug 30, 2013

This looks great! We really don't know how to write idiomatic elisp. We'll also put you up on our credits page.

kans added a commit that referenced this pull request Aug 30, 2013

Merge pull request #18 from Wilfred/master
Fix byte compiler warnings

@kans kans merged commit dd8ffde into Floobits:master Aug 30, 2013


This comment has been minimized.


Wilfred commented Sep 2, 2013

Glad to help. I was just kicking the tires on floobits and thought I'd contribute as I was passing through.

FWIW, be careful writing functions like this:

(defun foobar (x)
  (setq y (+ x 1))

This is leaking a variable, it's equivalent to the JavaScript:

function foobar(x) {
    y = x + 1;
    return y;

You can introduce local bindings with let:

(defun foobar (x)
  (let ((y (+ x 1)))

These issues are easy to spot with the byte-compiler, or you can even install flycheck and it will check your code as you type.

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