spacemacs/layers/spell-checking/config.el
Fabien Dubosson 456dcb3086 Correct few defaults of spell-checking's layer
- Disable `auto-dictionary-mode` by default. Add a layer's variable to
  enable it. Its behaviour has some impact on user-defined dictionary
  preferences, it has some bugs in daemon mode, and not all languages
  are supported. It's why it better to have it disabled by default.

- Toggle off `auto-dictionary-mode` when spell-checking is toggled off.

- Call `flyspell-buffer` when toggling **on** spell-checking to reveal
  mistakes (probably the wanted behaviour when activating
  spell-checking)

- When `auto-dictionary-mode` is enabled, if a buffer's dictionary is
  manually changed with `SPC S d`, it is restored after toggling
  spell-checking on/off, otherwise `auto-dictionary` will thy to guess
  it again.
2015-11-02 00:29:15 -05:00

24 lines
610 B
EmacsLisp

;;; config.el --- Spell Checking Layer configuration File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 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
;; Command Prefixes
(spacemacs/declare-prefix "S" "spelling")
;; Variables
(defvar spell-checking-enable-by-default t
"Enable spell checking by default.")
(defvar spell-checking-enable-auto-dictionary nil
"Specify if auto-dictionary should be enabled or not.")