Skip to content

Instantly share code, notes, and snippets.

@fmnoise
Created November 30, 2017 11:25
Show Gist options
  • Save fmnoise/1d0dc288914883bd1d38ef10b4fe8aff to your computer and use it in GitHub Desktop.
Save fmnoise/1d0dc288914883bd1d38ef10b4fe8aff to your computer and use it in GitHub Desktop.
emacs modular config example
(defun init/packages ()
(setq package-archives
'(("gnu" . "http://elpa.gnu.org/packages/")
("marmalade" . "http://marmalade-repo.org/packages/")
("melpa" . "http://melpa.org/packages/")))
(require 'package)
(package-initialize)
(package-refresh-contents) ;; comment later to
(setq my-packages
'(
;; list packages here
))
(dolist (pkg my-packages)
(unless (package-installed-p pkg)
(package-install pkg))))
(defun init/keybindings ()
;; setup keybindings here
)
(defun init/setup ()
(init/packages)
(init/keybindings)
;; your init calls here
)
(init/setup)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment