summaryrefslogtreecommitdiffstats
path: root/emacs
diff options
context:
space:
mode:
authorGravatar Tom Willemse2015-12-18 01:55:25 +0100
committerGravatar Tom Willemse2015-12-18 01:55:25 +0100
commit7f35ee8c71d57e9fb68e5ab6518068f724bf1937 (patch)
tree35d3fda327e3bc954eefbf8f9060bc1e795ea54c /emacs
parentea6a2cea544c06521d0fd3467d60763b1ab4d322 (diff)
downloaddotfiles-7f35ee8c71d57e9fb68e5ab6518068f724bf1937.tar.gz
dotfiles-7f35ee8c71d57e9fb68e5ab6518068f724bf1937.zip
Move set-ispell-local-en-dict to git library
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/init.el9
-rw-r--r--emacs/.emacs.d/site-lisp/oni-git.el6
2 files changed, 10 insertions, 5 deletions
diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el
index a4d058a..87182fe 100644
--- a/emacs/.emacs.d/init.el
+++ b/emacs/.emacs.d/init.el
@@ -141,10 +141,6 @@ MODE1 is enabled and vice-versa."
"Set the `disabled' property for each item in FUNCTIONS to nil."
(mapc #'(lambda (f) (put f 'disabled nil)) functions))
-(defun oni:set-ispell-local-en-dict ()
- "Set `ispell-local-dictionary' to en."
- (setq ispell-local-dictionary "en_US"))
-
(defun oni:set-keys-for-dired ()
"Set some keybindings for `dired'."
(local-set-key (kbd "E") #'wdired-change-to-wdired-mode))
@@ -681,7 +677,10 @@ If no direction is given, don't split."
(add-hook 'css-mode-hook #'rainbow-mode)
(add-hook 'diary-display-hook 'diary-fancy-display)
-(add-hook 'git-commit-mode-hook #'oni:set-ispell-local-en-dict)
+
+;; Make sure git commit messages are always checked in english.
+(add-hook 'git-commit-mode-hook 'oni:set-ispell-local-en-dict)
+
(add-hook 'gnus-exit-group-hook 'oni:update-mailcount)
(add-hook 'gnus-exit-gnus-hook 'oni:update-mailcount)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
diff --git a/emacs/.emacs.d/site-lisp/oni-git.el b/emacs/.emacs.d/site-lisp/oni-git.el
index 6435faa..5430ce9 100644
--- a/emacs/.emacs.d/site-lisp/oni-git.el
+++ b/emacs/.emacs.d/site-lisp/oni-git.el
@@ -24,6 +24,7 @@
;;; Code:
+(require 'ispell)
(require 'magit)
;;;###autoload
@@ -56,5 +57,10 @@
default-directory "' request-pull " (when patchp "-p ")
from " " url " " to))))))
+;;;###autoload
+(defun oni:set-ispell-local-en-dict ()
+ "Set `ispell-local-dictionary' to en."
+ (setq ispell-local-dictionary "en_US"))
+
(provide 'oni-git)
;;; oni-git.el ends here