diff --git a/.gitignore b/.gitignore index 939520b..7817322 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ recentf savehist saveplace elpa +el-get semanticdb custom.el url diff --git a/init.el b/init.el index d54ad81..c392560 100644 --- a/init.el +++ b/init.el @@ -61,6 +61,7 @@ by Prelude.") ;; the core stuff (require 'prelude-ui) (require 'prelude-packages) +(require 'prelude-el-get) (require 'prelude-core) (require 'prelude-editor) (require 'prelude-global-keybindings) diff --git a/modules/prelude-el-get.el b/modules/prelude-el-get.el new file mode 100644 index 0000000..a032175 --- /dev/null +++ b/modules/prelude-el-get.el @@ -0,0 +1,58 @@ +(add-to-list 'load-path "~/.emacs.d/el-get/el-get") + +(unless (require 'el-get nil t) + (with-current-buffer + (url-retrieve-synchronously + "https://raw.github.com/dimitri/el-get/master/el-get-install.el") + (end-of-buffer) + (eval-print-last-sexp))) + +(setq el-get-sources + '((:name magit + :after (lambda () + (global-set-key (kbd "C-x g") 'magit-status))) + (:name yasnippet + :website "http://code.google.com/p/yasnippet/" + :description "YASnippet is a template system for Emacs." + :type git + :url "https://github.com/capitaomorte/yasnippet.git" + :features "yasnippet" + :prepare (lambda () + ;; Set up the default snippets directory + ;; + ;; Principle: don't override any user settings + ;; for yas/snippet-dirs, whether those were made + ;; with setq or customize. If the user doesn't + ;; want the default snippets, she shouldn't get + ;; them! + (unless (or (boundp 'yas/snippet-dirs) (get 'yas/snippet-dirs 'customized-value)) + (setq yas/snippet-dirs + (list (concat el-get-dir (file-name-as-directory "yasnippet") "snippets"))))) + + :post-init (lambda () + ;; Trick customize into believing the standard + ;; value includes the default snippets. + ;; yasnippet would probably do this itself, + ;; except that it doesn't include an + ;; installation procedure that sets up the + ;; snippets directory, and thus doesn't know + ;; where those snippets will be installed. See + ;; http://code.google.com/p/yasnippet/issues/detail?id=179 + (put 'yas/snippet-dirs 'standard-value + ;; as cus-edit.el specifies, "a cons-cell + ;; whose car evaluates to the standard + ;; value" + (list (list 'quote + (list (concat el-get-dir (file-name-as-directory "yasnippet") "snippets")))))) + ;; byte-compile load vc-svn and that fails + ;; see https://github.com/dimitri/el-get/issues/200 + :compile nil))) + +(setq prelude-packages + (append + '() + (mapcar 'el-get-source-name el-get-sources))) + +(el-get 'sync prelude-packages) + +(provide 'prelude-el-get) diff --git a/modules/prelude-global-keybindings.el b/modules/prelude-global-keybindings.el index 8113329..824052c 100644 --- a/modules/prelude-global-keybindings.el +++ b/modules/prelude-global-keybindings.el @@ -86,9 +86,6 @@ ;; Should be able to eval-and-replace anywhere. (global-set-key (kbd "C-c e") 'prelude-eval-and-replace) -;; Magit rules! -(global-set-key (kbd "C-x g") 'magit-status) - ;; Activate occur easily inside isearch (define-key isearch-mode-map (kbd "C-o") (lambda () (interactive) @@ -103,12 +100,6 @@ ;; use hippie-expand instead of dabbrev (global-set-key (kbd "M-/") 'hippie-expand) -;; spell check Bulgarian text -(global-set-key (kbd "C-c B") - (lambda()(interactive) - (ispell-change-dictionary "bulgarian") - (flyspell-buffer))) - ;; replace buffer-menu with ibuffer (global-set-key (kbd "C-x C-b") 'ibuffer) @@ -124,9 +115,6 @@ ;; open an ansi-term buffer (global-set-key (kbd "C-x t") 'prelude-visit-term-buffer) -;; toggle input method -(global-set-key (kbd "C-\\") 'prelude-toggle-bulgarian-input-method) - ;; search with google (global-set-key (kbd "C-c g") 'prelude-google) diff --git a/modules/prelude-packages.el b/modules/prelude-packages.el index be5c4e3..511230b 100644 --- a/modules/prelude-packages.el +++ b/modules/prelude-packages.el @@ -44,8 +44,8 @@ ;; TODO find a way to get inf-ruby 2.2.2 into Marmalade (defvar prelude-packages '(auctex clojure-mode coffee-mode deft gist haml-mode - haskell-mode magit markdown-mode paredit projectile - python sass-mode scss-mode yaml-mode yari yasnippet) + haskell-mode markdown-mode paredit projectile + python sass-mode scss-mode yaml-mode yari) "A list of packages to ensure are installed at launch.") (dolist (p prelude-packages)