spacemacs/layers/+checkers/spell-checking/funcs.el
syl20bnr fb27ede558 Bump year in copyright headers
Happy New Year 2017!
2017-01-05 23:08:17 -05:00

25 lines
810 B
EmacsLisp

;;; funcs.el --- Spell Checking Layer functions File for Spacemacs
;;
;; Copyright (c) 2012-2017 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defun spell-checking/add-flyspell-hook (hook)
"Add `flyspell-mode' to the given HOOK, if
`spell-checking-enable-by-default' is true."
(when spell-checking-enable-by-default
(add-hook hook 'flyspell-mode)))
(defun spell-checking/change-dictionary ()
"Change the dictionary. Use the ispell version if
auto-dictionary is not used, use the adict version otherwise."
(interactive)
(if (fboundp 'adict-change-dictionary)
(adict-change-dictionary)
(call-interactively 'ispell-change-dictionary)))