Support different languages for mutt spell checking

This commit is contained in:
Bob Mottram 2017-08-04 21:41:40 +01:00
parent 19c99e8d5a
commit cc922b3b56
1 changed files with 56 additions and 2 deletions

View File

@ -34,7 +34,8 @@ IN_DEFAULT_INSTALL=1
SHOW_ON_ABOUT=0
emacs_variables=(USB_MOUNT
MY_USERNAME)
MY_USERNAME
DEFAULT_LANGUAGE)
function logging_on_emacs {
echo -n ''
@ -274,7 +275,60 @@ function install_emacs {
echo "(dolist (hook '(text-mode-hook))" >> /home/$USERNAME/.emacs-mutt
echo ' (add-hook hook (lambda () (flyspell-mode 1))))' >> /home/$USERNAME/.emacs-mutt
echo '(setq-default fill-column 72)' >> /home/$USERNAME/.emacs-mutt
echo '(setq ispell-dictionary "british")' >> /home/$USERNAME/.emacs-mutt
if [[ $DEFAULT_LANGUAGE == 'en_US'* ]]; then
echo '(setq ispell-dictionary "american")' >> /home/$USERNAME/.emacs-mutt
fi
if [[ $DEFAULT_LANGUAGE == 'en_GB'* ]]; then
echo '(setq ispell-dictionary "british")' >> /home/$USERNAME/.emacs-mutt
fi
if [[ $DEFAULT_LANGUAGE == 'fr_FR'* ]]; then
echo '(setq ispell-dictionary "french")' >> /home/$USERNAME/.emacs-mutt
fi
if [[ $DEFAULT_LANGUAGE == 'it_IT'* ]]; then
echo '(setq ispell-dictionary "italian")' >> /home/$USERNAME/.emacs-mutt
fi
if [[ $DEFAULT_LANGUAGE == 'cs_CZ'* ]]; then
echo '(setq ispell-dictionary "czech")' >> /home/$USERNAME/.emacs-mutt
fi
if [[ $DEFAULT_LANGUAGE == 'da_DK'* ]]; then
echo '(setq ispell-dictionary "danish")' >> /home/$USERNAME/.emacs-mutt
fi
if [[ $DEFAULT_LANGUAGE == 'nl_NL'* ]]; then
echo '(setq ispell-dictionary "dutch")' >> /home/$USERNAME/.emacs-mutt
fi
if [[ $DEFAULT_LANGUAGE == 'ru_RU'* ]]; then
echo '(setq ispell-dictionary "russian")' >> /home/$USERNAME/.emacs-mutt
fi
if [[ $DEFAULT_LANGUAGE == 'es_ES'* ]]; then
echo '(setq ispell-dictionary "spanish")' >> /home/$USERNAME/.emacs-mutt
fi
if [[ $DEFAULT_LANGUAGE == 'sv_SE'* ]]; then
echo '(setq ispell-dictionary "swedish")' >> /home/$USERNAME/.emacs-mutt
fi
if [[ $DEFAULT_LANGUAGE == 'no_NO'* ]]; then
echo '(setq ispell-dictionary "norwegian")' >> /home/$USERNAME/.emacs-mutt
fi
if [[ $DEFAULT_LANGUAGE == 'de_DE'* ]]; then
echo '(setq ispell-dictionary "ngerman")' >> /home/$USERNAME/.emacs-mutt
fi
if [[ $DEFAULT_LANGUAGE == 'bg_BG'* ]]; then
echo '(setq ispell-dictionary "bulgarian")' >> /home/$USERNAME/.emacs-mutt
fi
if [[ $DEFAULT_LANGUAGE == 'pl'* ]]; then
echo '(setq ispell-dictionary "polish")' >> /home/$USERNAME/.emacs-mutt
fi
if [[ $DEFAULT_LANGUAGE == 'et_EE'* ]]; then
echo '(setq ispell-dictionary "estonian")' >> /home/$USERNAME/.emacs-mutt
fi
if [[ $DEFAULT_LANGUAGE == 'lt_LT'* ]]; then
echo '(setq ispell-dictionary "lithuanian")' >> /home/$USERNAME/.emacs-mutt
fi
if [[ $DEFAULT_LANGUAGE == 'uk_UA'* ]]; then
echo '(setq ispell-dictionary "ukranian")' >> /home/$USERNAME/.emacs-mutt
fi
if [[ $DEFAULT_LANGUAGE == 'ca_ES'* ]]; then
echo '(setq ispell-dictionary "catalan")' >> /home/$USERNAME/.emacs-mutt
fi
echo '(setq auto-fill-mode 0)' >> /home/$USERNAME/.emacs-mutt
echo "(add-hook 'text-mode-hook 'turn-on-auto-fill)" >> /home/$USERNAME/.emacs-mutt
echo "(setq-default auto-fill-function 'do-auto-fill)" >> /home/$USERNAME/.emacs-mutt