The beginning of my ~/.emacs.d/init.el
file looks like this:
;; MELPA
(require 'package)
(setq package-enable-at-startup nil)
(setq package-check-signature nil)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(add-to-list 'package-archives '("elpy" . "https://jorgenschaefer.github.io/packages/"))
;; boostrap 'use-package'
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(use-package windmove
;; move cursor between windows
:demand
:bind
(("C-<left>" . windmove-left)
("C-<right>" . windmove-right)
("C-<up>" . windmove-up)
("C-<down>" . windmove-down)))
... more stuff ...
I am trying to byte compile my init.el
file. I execute the following in the terminal, sinde the ~/.emacs.d/
directory:
$ emacs --batch --eval '(byte-compile-file "init.el")'
The output is:
In toplevel form:
init.el:59:1:Warning: ‘("C-<left>" . windmove-left)’ is a malformed function
init.el:59:14:Warning: reference to free variable ‘windmove’
init.el:62:3:Error: Wrong type argument: sequencep, windmove-right
Basically, the very first key binding definition fails... and there is also some sort of warning about a free variable. How do I properly byte-compile the init.el
file - even for the above very simple example (imagine there's nothing else to the init.el
file)?