Merge branch 'master' of github.com:bbatsov/emacs-prelude

This commit is contained in:
Bozhidar Batsov 2012-01-26 19:32:32 +02:00
commit 116dadbac3
6 changed files with 35 additions and 11 deletions

View file

@ -351,5 +351,12 @@ there's a region, all lines that region covers will be duplicated."
(set-window-start w2 s1)))
(other-window 1))
(defun prelude-kill-other-buffers ()
"Kill all buffers but the current one. Doesn't mess with special buffers."
(interactive)
(dolist (buffer (buffer-list))
(unless (or (eql buffer (current-buffer)) (not (buffer-file-name buffer)))
(kill-buffer buffer))))
(provide 'prelude-core)
;;; prelude-core.el ends here

View file

@ -1,4 +1,5 @@
(add-to-list 'load-path "~/.emacs.d/el-get/el-get")
(add-to-list 'load-path (concat prelude-dir "el-get/el-get"))
(setq el-get-dir (concat prelude-dir "el-get/"))
(unless (require 'el-get nil t)
(with-current-buffer

View file

@ -45,7 +45,8 @@
(defun prelude-emacs-lisp-mode-hook ()
(prelude-lisp-coding-hook)
(turn-on-eldoc-mode)
(prelude-remove-elc-on-save))
(prelude-remove-elc-on-save)
(rainbow-mode +1))
(add-hook 'emacs-lisp-mode-hook 'prelude-emacs-lisp-mode-hook)

View file

@ -115,6 +115,9 @@
;; open an ansi-term buffer
(global-set-key (kbd "C-x t") 'prelude-visit-term-buffer)
;; kill other buffers
(global-set-key (kbd "C-c k o") 'prelude-kill-other-buffers)
;; search with google
(global-set-key (kbd "C-c g") 'prelude-google)

View file

@ -38,17 +38,24 @@
'("marmalade" . "http://marmalade-repo.org/packages/") t)
(package-initialize)
;; check for new packages (package versions)
(message "%s" "Emacs Prelude is now refreshing its package database...")
(package-refresh-contents)
(message "%s" " done.")
(defvar prelude-packages
'(auctex clojure-mode coffee-mode deft gist groovy-mode haml-mode
'(auctex clojure-mode coffee-mode deft full-ack gist groovy-mode haml-mode
haskell-mode inf-ruby markdown-mode paredit projectile
python sass-mode scss-mode solarized-theme yaml-mode yari zenburn-theme)
python sass-mode rainbow-mode scss-mode solarized-theme
yaml-mode yari zenburn-theme)
"A list of packages to ensure are installed at launch.")
(defun prelude-packages-installled-p ()
(loop for p in prelude-packages
when (package-installed-p p) do (return nil)
finally (return t)))
(unless prelude-packages-installed-p
;; check for new packages (package versions)
(message "%s" "Emacs Prelude is now refreshing its package database...")
(package-refresh-contents)
(message "%s" " done."))
(dolist (p prelude-packages)
(when (not (package-installed-p p))
(package-install p)))

View file

@ -71,9 +71,14 @@
(require 'haml-mode)
(require 'scss-mode)
(defun prelude-scss-mode-hook ()
;; indent like in Ruby
(defun prelude-css-mode-hook ()
(setq css-indent-offset 2)
(rainbow-mode +1))
(add-hook 'css-mode-hook 'prelude-css-mode-hook)
(defun prelude-scss-mode-hook ()
(prelude-css-mode-hook)
;; turn off annoying auto-compile on save
(setq scss-compile-at-save nil))