.emacs-autogen.sh
author Oleksandr Gavenko <gavenkoa@gmail.com>
Tue, 04 Jan 2011 23:55:13 +0200
changeset 575 d2730823e23f
parent 574 dfd8ec51803a
child 579 b71e74cfe817
permissions -rwxr-xr-x
Fix default dictionary names.

#!/bin/sh

if [ -z "$1" ]; then
  echo "Where config file?"
  exit 1
fi

cfg=$1

if command -v ispell; then
  echo >>$cfg
  echo "(setq-default ispell-program-name \"ispell\")" >>$cfg
  if [ -e /etc/debian_version ]; then
    echo "(setq-default ispell-local-dictionary \"british\")" >>$cfg
  else
    echo "(setq-default ispell-local-dictionary \"default\")" >>$cfg
  fi
elif command -v aspell; then
  echo >>$cfg
  echo "(setq-default ispell-program-name \"aspell\")" >>$cfg
  echo "(setq-default ispell-local-dictionary \"english\")" >>$cfg
fi