# HG changeset patch # User Luke Hoersten # Date 1372645101 18000 # Node ID 8beb028f936cfe8d4721d8326eeec80d0d73c743 # Parent f346d7591eac3726f551e25986dcc18fc979ded0 Fixed a bug with the haskell-mode-hook diff -r f346d7591eac -r 8beb028f936c align-with-spaces.el --- a/align-with-spaces.el Thu Jun 27 11:52:53 2013 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ -;; ~/.emacs.d/hoersten-align-with-spaces.el -;; Luke Hoersten - -(global-set-key (kbd "C-c a") 'align-with-spaces) -(defun align-with-spaces (beg end pattern) - "Align selected using only spaces for whitespace." - (interactive "r\nsAlign by: ") - (let ((indent-tabs-mode nil)) - (align-string beg end pattern 1) - (align-entire beg end) - (untabify beg end) - (indent-region beg end) - (whitespace-cleanup-region beg end))) - -(message "Loading align-with-spaces...done") -(provide 'align-with-spaces) diff -r f346d7591eac -r 8beb028f936c init.el --- a/init.el Thu Jun 27 11:52:53 2013 -0500 +++ b/init.el Sun Jun 30 21:18:21 2013 -0500 @@ -33,6 +33,7 @@ (global-font-lock-mode t) ; syntax highlighting (global-set-key (kbd "C-c c") 'compile) ; compile (global-set-key (kbd "C-c r") 'recompile) ; recompile +(global-set-key (kbd "C-c a") 'align-regexp) ; align (subword-mode t) ; move by camelCase words @@ -129,7 +130,6 @@ ;;; requires (require 'c-init) ; c specific elisp -(require 'align-with-spaces) ; use only spaces for alignment (require 'move-line) ; move line up or down (require 'uniquify) ; unique buffer names with dirs (require 'auto-complete-config) @@ -180,12 +180,11 @@ ;;; coding-modes map (mapc (lambda (x) - (add-hook - x - (lambda () - (linum-mode t) - (rainbow-delimiters-mode t) - (auto-complete-mode t)) t)) + (add-hook x + (lambda () + (linum-mode t) + (rainbow-delimiters-mode t) + (auto-complete-mode t)))) '(text-mode-hook c-mode-common-hook python-mode-hook @@ -200,14 +199,14 @@ (add-hook 'haskell-mode-hook (lambda () - (local-set-key (kbd "C-c i") 'haskell-navigate-imports) ; go to imports. prefix to return - (flymake-haskell-multi-load t) + (flymake-haskell-multi-load) (flymake-mode t) (capitalized-words-mode t) (turn-on-haskell-indent) (turn-on-haskell-doc-mode) (turn-on-haskell-decl-scan) - (imenu-add-menubar-index t) + (imenu-add-menubar-index) + (local-set-key (kbd "C-c i") 'haskell-navigate-imports) ; go to imports. prefix to return (setq haskell-font-lock-haddock t haskell-stylish-on-save t