summary refs log tree commit diff stats
path: root/tag-emacs
diff options
context:
space:
mode:
authorAlan Pearce2015-09-03 19:34:36 +0200
committerAlan Pearce2015-09-03 19:34:36 +0200
commitec66ac0081b68df0220ab6f5fc0290b611bf9a6f (patch)
treebe151cc7beb34c876a1b54202d6d57a5a5144983 /tag-emacs
parentbb6744eb3e79fdcd8be16d36d3cd149f6d4db76a (diff)
downloaddotfiles-ec66ac0081b68df0220ab6f5fc0290b611bf9a6f.tar.lz
dotfiles-ec66ac0081b68df0220ab6f5fc0290b611bf9a6f.tar.zst
dotfiles-ec66ac0081b68df0220ab6f5fc0290b611bf9a6f.zip
Emacs: Ensure cask & pallet are required
Diffstat (limited to 'tag-emacs')
-rw-r--r--tag-emacs/emacs.d/init.org24
1 files changed, 13 insertions, 11 deletions
diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org
index 48b7639..9085c4a 100644
--- a/tag-emacs/emacs.d/init.org
+++ b/tag-emacs/emacs.d/init.org
@@ -41,7 +41,8 @@ archives.
 
 For most packages, I use [[https://github.com/cask/cask][cask]]
 #+BEGIN_SRC emacs-lisp
-  (add-to-list 'load-path (expand-file-name "~/.cask"))
+  (eval-and-compile
+    (add-to-list 'load-path (expand-file-name "~/.cask")))
   (require 'cask)
   (cask-initialize)
 #+END_SRC
@@ -71,16 +72,17 @@ cask update
 ** Req-package
 
 #+BEGIN_SRC emacs-lisp
-  (setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
-                           ("marmalade" . "http://marmalade-repo.org/packages/")
-                           ("melpa" . "http://melpa.org/packages/")
-                           ("melpa-stable" . "http://stable.melpa.org/packages/")
-                           ("org" . "http://orgmode.org/elpa/")))
-  (package-initialize)
-  (unless (package-installed-p 'req-package)
-    (package-refresh-contents)
-    (package-install 'req-package))
-  (require 'req-package)
+  (eval-and-compile
+    (setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
+                             ("marmalade" . "http://marmalade-repo.org/packages/")
+                             ("melpa" . "http://melpa.org/packages/")
+                             ("melpa-stable" . "http://stable.melpa.org/packages/")
+                             ("org" . "http://orgmode.org/elpa/")))
+    (package-initialize)
+    (unless (package-installed-p 'req-package)
+      (package-refresh-contents)
+      (package-install 'req-package))
+    (require 'req-package))
   (setq use-package-verbose t)
 #+END_SRC