dotfiles

config files and scripts at HOME.
git clone git://git.ricketyspace.net/dotfiles.git
Log | Files | Refs

commit 4a79bed308b3490aa42f4507c9f17b820245e2a7
parent dbaf86374b68b94473f38a6f8190bd45d55c24ef
Author: rsiddharth <rsiddharth@ninthfloor.org>
Date:   Mon, 30 May 2016 00:01:29 +0000

.emacs: rewrote package customizations.

using `use-package`.

Diffstat:
.emacs | 116++++++++++++++++++++++++++++++++++++++-----------------------------------------
1 file changed, 56 insertions(+), 60 deletions(-)

diff --git a/.emacs b/.emacs @@ -84,83 +84,79 @@ ;;; update bookmarks file every when a bookmark is added/deleted. (setq bookmark-save-flag 1) -;; melpa config +;; melpa (require 'package) (add-to-list 'package-archives - '("melpa" . "http://melpa.org/packages/") t) + '("melpa" . "http://melpa.org/packages/")) (package-initialize) -(when (not package-archive-contents) - (package-refresh-contents)) +;; use-package +(unless (package-installed-p 'use-package) + (package-refresh-contents) + (package-install 'use-package)) -(defvar elpa-packages '(auto-complete - helm - markdown-mode - magit - web-mode - jinja2-mode - auctex - git-annex - paredit) - "A list of elpa packages to install.") - -(dolist (p elpa-packages) - (when (not (package-installed-p p)) - (package-install p))) +(use-package tex :ensure auctex) +(use-package jinja2-mode :ensure t) +(use-package markdown-mode :ensure t) +(use-package web-mode :ensure t) ;; auto-complete mode. -(require 'auto-complete-config) -(ac-config-default) +(use-package auto-complete + :ensure t + :config + (ac-config-default)) ;; helm -(require 'helm) -(require 'helm-config) - -(helm-mode 1) -(helm-autoresize-mode t) - -(global-set-key (kbd "C-c h") 'helm-command-prefix) -(global-unset-key (kbd "C-x c")) - -(define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action) -(define-key helm-map (kbd "C-i") 'helm-execute-persistent-action) -(define-key helm-map (kbd "C-z") 'helm-select-action) - -(global-set-key (kbd "M-x") 'helm-M-x) -(global-set-key (kbd "M-y") 'helm-show-kill-ring) -(global-set-key (kbd "C-x b") 'helm-mini) -(global-set-key (kbd "C-x C-f") 'helm-find-files) +(use-package helm + :ensure t + :config + (require 'helm-config) + (helm-mode 1) + (helm-autoresize-mode t) + (unbind-key "C-x c") + :bind (("C-c h" . helm-command-prefix) + ("M-x" . helm-M-x) + ("M-y" . helm-show-kill-ring) + ("C-x b" . helm-mini) + ("C-x C-f" . helm-find-files) + :map helm-map + ("[tab]" . helm-execute-persistent-action) + ("C-i". helm-execute-persistent-action) + ("C-z" . helm-select-action))) ;; magit -(global-set-key (kbd "C-x g") 'magit-status) -(global-set-key (kbd "C-x M-g") 'magit-dispatch-popup) +(use-package magit + :ensure t + :bind (("C-x g" . magit-status) + ("C-x M-g" . magit-dispatch-popup))) ;; geiser -(require 'geiser-guile) -(add-to-list 'geiser-guile-load-path "~/v/git/rsd/sicp") -;;; guile load paths -(setq-default guile-load-paths '("~/v/git/rsd/sicp" - "~/v/git/rsd/sandbox/guile")) - -(mapc (lambda (path) (add-to-list 'geiser-guile-load-path path)) - guile-load-paths) +(use-package geiser-guile + :init + (setq-default guile-load-paths '("~/v/git/rsd/sicp" + "~/v/git/rsd/sandbox/guile")) + :config + (setq geiser-active-implementations '(guile)) + (mapc (lambda (path) (add-to-list 'geiser-guile-load-path path)) + guile-load-paths)) ;; paredit -(autoload 'enable-paredit-mode "paredit" - "Turn on pseudo-structural editing of lisp code." - t) - -(setq-default rsd/paredit-modes '(emacs-lisp-mode-hook - lisp-mode-hook - lisp-interaction-mode-hook - scheme-mode-hook)) - -(mapc (lambda (mode) (add-hook mode 'enable-paredit-mode)) - rsd/paredit-modes) +(use-package paredit + :ensure t + :init + (setq-default rsd/paredit-modes '(emacs-lisp-mode-hook + lisp-mode-hook + lisp-interaction-mode-hook + scheme-mode-hook)) + :config + (mapc (lambda (mode) (add-hook mode 'enable-paredit-mode)) + rsd/paredit-modes)) ;; git-annex -(require 'git-annex) -(setq git-annex-commit nil) +(use-package git-annex + :ensure t + :config + (setq git-annex-commit nil)) ;; custom (setq custom-file "~/.emacs.d/custom.el")