Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 61 lines (54 sloc) 2.425 kb
77e270b @technomancy Rearranged ELPA code/docs.
authored
1 ;;; starter-kit-elpa.el --- Install a base set of packages automatically.
5fcb34d @technomancy initial commit
authored
2 ;;
3 ;; Part of the Emacs Starter Kit
77e270b @technomancy Rearranged ELPA code/docs.
authored
4
cd23f0c @technomancy Fix elpa integration.
authored
5 (defvar starter-kit-packages (list 'idle-highlight
76d7bbf @technomancy Set up some ELPA stuff on launch.
authored
6 'ruby-mode
7 'inf-ruby
8 'js2-mode
9 'css-mode
b6f578c @technomancy Add Jabber client.
authored
10 'nxml
928285b @technomancy Gist is in elpa.
authored
11 'gist
3446372 @technomancy Don't end comments in colons; can be interpreted as local vars.
authored
12 ;; To submit
76d7bbf @technomancy Set up some ELPA stuff on launch.
authored
13 ;;; "magit"
f821261 @technomancy Autoload and invoke paredit. Fix ruby-mode RET.
authored
14 ;;; "paredit"
76d7bbf @technomancy Set up some ELPA stuff on launch.
authored
15 ;;; "clojure-mode"
16 ;;; "yaml"
8b83d57 @technomancy Tweak a few variables, change the package list.
authored
17 ;;; "haml"
18 ;;; "sass"
77e270b @technomancy Rearranged ELPA code/docs.
authored
19 ;;; "cheat"
20 ;;; "html-fontify"
21 ;;; "color-theme"
22 ;;; "color-theme-zenburn"
23 ;;; "color-theme-vivid-chalk"
3446372 @technomancy Don't end comments in colons; can be interpreted as local vars.
authored
24 ;; Complicated ones
77e270b @technomancy Rearranged ELPA code/docs.
authored
25 ;;; "nxhtml"
26 ;;; "rinari"
27 ;;; "jabber"
28 ;;; "slime"
29 ;;; "swank-clojure"
76d7bbf @technomancy Set up some ELPA stuff on launch.
authored
30 )
31 "Libraries that should be installed by default.")
32
d17299b @technomancy Only install elpa packages when we're online.
authored
33 ;; Work around a bug in ELPA
34 (ignore-errors (load "elpa/inf-ruby-2.0/inf-ruby-autoloads"))
35
76d7bbf @technomancy Set up some ELPA stuff on launch.
authored
36 (defun starter-kit-elpa-install ()
37 "Install all starter-kit packages that aren't installed."
38 (interactive)
39 (dolist (package starter-kit-packages)
d17299b @technomancy Only install elpa packages when we're online.
authored
40 (unless (or (member package package-activated-list)
41 (functionp package))
b6f578c @technomancy Add Jabber client.
authored
42 (message "Installing %s" (symbol-name package))
76d7bbf @technomancy Set up some ELPA stuff on launch.
authored
43 (package-install package))))
44
d17299b @technomancy Only install elpa packages when we're online.
authored
45 (defun esk-online? ()
c54067d @technomancy We can't rely on network-interfaces-list; it's not defined on w32.
authored
46 "See if we're online.
47
48 Windows does not have the network-interface-list function, so we
49 just have to assume it's online."
5c776d2 @technomancy On OS X (Carbon), network-interfaces-list returns nil.
authored
50 (if (and (functionp 'network-interface-list)
51 (network-interface-list))
c54067d @technomancy We can't rely on network-interfaces-list; it's not defined on w32.
authored
52 (some (lambda (iface) (unless (equal "lo" (car iface))
53 (member 'up (first (last (network-interface-info
54 (car iface)))))))
55 (network-interface-list))
56 t))
d17299b @technomancy Only install elpa packages when we're online.
authored
57
76d7bbf @technomancy Set up some ELPA stuff on launch.
authored
58 ;; On your first run, this should pull in all the base packages.
acfeee4 @technomancy Ignore errors caused by attempted elpa installation.
authored
59 (when (esk-online?) (ignore-errors (starter-kit-elpa-install)))
cd23f0c @technomancy Fix elpa integration.
authored
60
61 (provide 'starter-kit-elpa)
Something went wrong with that request. Please try again.