Browse files

Merge branch 'master' of

  • Loading branch information...
alandipert committed Apr 30, 2012
2 parents 5250f25 + b3ff940 commit 820f67b3e5159c496070ab85e24455f111faaa93
Showing with 7 additions and 3 deletions.
  1. +7 −3 init.el
10 init.el
@@ -59,9 +59,13 @@
(scss-mode . (lambda ()
(scss-compile-at-save nil)))))
+(defmacro when-not (test &rest body)
+ `(when (not ,test)
+ ,@body))
(defun install-idempotent (name)
"Install package name unless already installed."
- (when (not (package-installed-p name))
+ (when-not (package-installed-p name)
(package-install name)))
(defun pkg-name (pkg)
@@ -77,13 +81,13 @@
(defun config-stuff (pkgs)
"Spin through my pkgs list and run each configuration function."
(dolist (pkg pkgs)
- (when (not (symbolp pkg))
+ (when-not (symbolp pkg)
(funcall (eval (cdr pkg))))))
(defun doit (pkgs)
"Install packages if they haven't been, and run their
configuration lambdas."
- (when (not (package-installed-p (pkg-name (last pkgs))))
+ (when-not (package-installed-p (pkg-name (last pkgs)))
(install-stuff pkgs))
(config-stuff pkgs))

0 comments on commit 820f67b

Please sign in to comment.