#! /bin/bash

# run emacs19 with a 18-pt bold font, in any environment:

export EMACS_EXTRA_PATH=
export XENVIRONMENT=
export ENV=

export SHELL=/bin/bash

export LC_ALL="C"
export LC_CTYPE="iso_8859_1"

# Assume that we are on an intel-compatible Linux:
if [[ ( -z "${PLATFORM}" ) || ( -z "${STOLFIHOME}" ) ]]; then
  export HOSTNAME="`/bin/uname -n`"
  export ARCH="i686"
  export OS="Linux-2.2"
  export PLATFORM="${ARCH}-${OS}"
  export STOLFIHOME="${HOME}"
  export TEXINPUTS=".:${STOLFIHOME}/tex/inputs:"

  export PATH="${STOLFIHOME}/bin/${PLATFORM}:${STOLFIHOME}/bin:${PATH}"
  export PATH=".:tools:../tools:../../tools../../../tools:${PATH}"
fi

source ${STOLFIHOME}/lib/${PLATFORM}/setpaths.sh
source ${STOLFIHOME}/lib/set_emacs_paths_vostro.sh

# Check is combination ${ARCH}-${OS} is known:
if [[ ! ( -d ${STOLFIHOME}/lib/${PLATFORM} ) ]]; then
  /bin/echo "warning --- no ${STOLFIHOME}/lib/${PLATFORM}"
fi

# Set paths appropriate to this platform:

# umask
umask 022

# inhibit core dumps:

ulimit -c 0

# Define aliases and other things that are not inherited:

source ${STOLFIHOME}/lib/${PLATFORM}/setaliases.sh  

# echo ${STOLFIHOME}
# echo $EMACS_EXTRA_PATH
# setenv EMACS_UNIBYTE

machine=`/bin/uname -n | /bin/sed -e 's:[.].*::'`

# Try getting the dead keys to work:
export XMODIFIERS=emacs

/usr/bin/emacs \
    -i -geometry =88x48+0+72 \
    --debug-init \
    -q -l ${STOLFIHOME}/elisp/dot-emacs.el \
    -name 'EM:'"${USER}@${machine}" \
    -font '-ibm-Courier-bold-normal-normal-*-22-*-*-*-m-0-iso10646-1' \
    $*

#     -name "${USER}.`getgroup`@`/bin/uname -n`" \
#     -font '-adobe-courier-bold-r-normal--20-140-100-100-m-110-iso10646-1'
