.emacs-autogen.sh
author Oleksandr Gavenko <gavenkoa@gmail.com>
Tue, 04 Jan 2011 23:51:10 +0200
changeset 574 dfd8ec51803a
parent 504 dc4a9f76fdbf
child 575 d2730823e23f
permissions -rwxr-xr-x
Prefer ispell instead aspell. Use 'command -v' instead 'which' utility for portability.

#!/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
  echo "(setq-default ispell-local-dictionary \"english\")" >>$cfg
elif command -v aspell; then
  echo >>$cfg
  echo "(setq-default ispell-program-name \"aspell\")" >>$cfg
  echo "(setq-default ispell-local-dictionary \"default\")" >>$cfg
fi