From c8cdb9442b2ac2b78ec41710a8d08d02577771eb Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sat, 31 Aug 2013 21:19:02 +0900 Subject: [PATCH] add function my-auto-install-package --- emacs.el | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/emacs.el b/emacs.el index fea0bc9..9cfd63a 100644 --- a/emacs.el +++ b/emacs.el @@ -79,12 +79,21 @@ otherwise the path where the library installed." t) (add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/")) - ;; (package-initialize) + (package-initialize) ;; (package-refresh-contents) ) -;; http://qiita.com/items/5f1cd86e2522fd3384a0 -;; http://blog.64p.org/entry/2013/05/01/233306 +(defun my-auto-install-package () + "Install packages semi-automatically." + (interactive) + (mapc (lambda (pkg) + (or (package-installed-p pkg) + (locate-library (symbol-name pkg)) + (package-install pkg))) + '( + markdown-mode + ;; ack + ))) ;; (lazy-load-eval 'sudoku)