This is part of the Emacs Starter Kit.
Things that don’t fit anywhere else, and which aren’t quite universal
enough to live in starter-kit-misc.org
.
Determine whether required packages are installed. If not, use ELPA to install them. Other dependencies are provided by Emacs 24.
(dolist (package '(yaml-mode js2-mode))
(unless (package-installed-p package)
(package-install package)))
(when window-system
(tooltip-mode -1)
(tool-bar-mode -1))
You really don’t need this; trust me.
(menu-bar-mode -1)
Nxhtml is a large package of utilities for web development and for embedding multiple major modes in a single buffer.
Nxhtml is not installed in this version of the starter-kit by default, for information on installing nxhtml see EmacsWiki-Nxhtml.
Set this to whatever browser you use e.g…
;; (setq browse-url-browser-function 'browse-url-firefox) ;; (setq browse-url-browser-function 'browse-default-macosx-browser) ;; (setq browse-url-browser-function 'browse-default-windows-browser) ;; (setq browse-url-browser-function 'browse-default-kde) ;; (setq browse-url-browser-function 'browse-default-epiphany) ;; (setq browse-url-browser-function 'browse-default-w3m) ;; (setq browse-url-browser-function 'browse-url-generic ;; browse-url-generic-program "~/src/conkeror/conkeror")
(add-to-list 'auto-mode-alist '("COMMIT_EDITMSG$" . diff-mode))
(add-to-list 'auto-mode-alist '("\\.css$" . css-mode))
(require 'yaml-mode)
(add-to-list 'auto-mode-alist '("\\.ya?ml$" . yaml-mode))
(add-to-list 'auto-mode-alist '("\\.rb$" . ruby-mode))
(add-to-list 'auto-mode-alist '("Rakefile$" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.js\\(on\\)?$" . js2-mode))
;; (add-to-list 'auto-mode-alist '("\\.xml$" . nxml-mode))