guidoschmidt / circadian.el

Theme-switching for Emacs based on daytime
https://guidoschmidt.github.io/circadian.el
MIT License
175 stars 8 forks source link

Improve code #4

Closed guidoschmidt closed 7 years ago

guidoschmidt commented 7 years ago

Three minor things:

  1. Use -*- lexical-binding: t; -*-.

  2. The functions first, fourth, third, second, and remove-if all belong to the deprecated cl package. You should add a cl- prefix to each and require cl-lib. Currently your package will only work if the user had already loaded cl for some reason.

  3. Change mapcar to mapc in circadian-setup.

The last two issues are caught trivially with the byte compiler. You can do a spot check like so:

emacs -Q -batch -f batch-byte-compile circadian.el

Thanks to skeeto via reddit for these proposals.

guidoschmidt commented 7 years ago