From 7f35ee8c71d57e9fb68e5ab6518068f724bf1937 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Fri, 18 Dec 2015 01:55:25 +0100 Subject: [PATCH] Move set-ispell-local-en-dict to git library --- emacs/.emacs.d/init.el | 9 ++++----- emacs/.emacs.d/site-lisp/oni-git.el | 6 ++++++ 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