#! /bin/csh -f
# Last edited on 2009-05-01 01:35:39 by stolfilocal
# run emacs19 with a 18-pt bold font, in any environment:

unsetenv EMACSLOADPATH
unsetenv EMACS_EXTRA_PATH
unsetenv XENVIRONMENT
unsetenv ENV

setenv SHELL /bin/bash

# Determine patform type:

setenv HOSTNAME "`/bin/uname -n`"
set arch = "`/bin/uname -m`"
switch ( "/${arch}" )
  case /i686:
    setenv ARCH "i686"
    breaksw
  default
    setenv ARCH "i686"
    /bin/echo "unknown architecture: ${arch}, assuming ${ARCH}"
endsw
unset arch

set os = "`/bin/uname -s`-`/bin/uname -r`"
if ( "/${os}" =~ /Linux* ) then
  setenv OS "Linux-2.2"
else 
  setenv OS "Linux-2.2"
  /bin/echo "unknown operating system ${os}, assuming ${OS}"
endif
unset os

# Check is combination ${ARCH}-${OS} is known:
set pfm = "${ARCH}-${OS}"
if ( ! ( -d ${STOLFIHOME}/lib/${pfm} ) ) then
  setenv ARCH "i686"
  setenv OS "Linux-2.2"
  set pfm = "${ARCH}-${OS}"
  /bin/echo "unknown platform ${pfm}, assuming ${ARCH}-${OS}"
endif
unset pfm

setenv PLATFORM "${ARCH}-${OS}"

# Set paths appropriate to this platform:

set curhome = "${STOLFIHOME}"
setenv HOME ${STOLFIHOME}

source ${STOLFIHOME}/lib/${PLATFORM}/setpaths.csh
source ${STOLFIHOME}/lib/set-emacs-paths.csh

# umask

# inhibit core dumps:

limit coredumpsize 0

# Define aliases and other things that are not inherited:

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

# Define terminal characteristics:

if ($?prompt != 0) then

  source ${STOLFIHOME}/lib/${PLATFORM}/setterm.csh  

endif

setenv HOME ${curhome}
# echo ${STOLFIHOME}
# echo $EMACS_EXTRA_PATH

setenv EMACS_UNIBYTE

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

/usr/bin/emacs \
    -i -geometry =88x48+0+72 \
    --debug-init \
    -q -l ${STOLFIHOME}/elisp-20/dot-emacs.el \
    -name 'EM:'"${USER}@${machine}" \
    -font -adobe-courier-bold-r-normal--18-180-75-75-m-110-iso8859-1 \
    $*

#     -name "${USER}.`getgroup`@`/bin/uname -n`" \
