home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / elisp / modes / math / mathremote.emacs1.2 < prev    next >
Encoding:
Text File  |  1990-03-20  |  872 b   |  49 lines

  1. #! /bin/sh -f
  2. # mathremote.emacs for Mathematica 1.2
  3.  
  4. # machine dependent 
  5. mathdir=/usr/local/Mathematica/V1.2.new
  6.  
  7. # end of machine dependence
  8. machdir=Bin.`/bin/arch`
  9.  
  10. if [ $machdir = Bin.sun3 ]; then
  11.     machdir=$machdir.`$mathdir/Install/foption`
  12. fi
  13.  
  14. PATH=$PATH:$mathdir/$machdir/MathTalk:$mathdir/$machdir/Display:$mathdir/$machdir/Init
  15. export PATH
  16.  
  17. case "$1" in
  18. -crc)
  19.     if tty -s; then
  20.         stty raw -tandem -echo
  21.     fi
  22.     lastproc=leftcrc
  23.     shift
  24.     ;;
  25. *)
  26.     if tty -s; then
  27.         stty -raw tandem cbreak -echo
  28.     fi
  29.     lastproc=rightend
  30.     ;;
  31. esac
  32.  
  33. # should be conditional on something
  34. lastproc="-core emacsfrontend"
  35.  
  36. twoway -e -nowait $mathdir/$machdir/mathexe -remote \
  37.     -pwpath '{"'$mathdir/Install'"}' \
  38.     -run '$Path = Join[
  39.         $Path,
  40.         {
  41.             ".",
  42.             "~",
  43.             "'$mathdir/Packages'",
  44.             "'$mathdir/Install'"
  45.         }
  46.     ]; Get["init.m"]' "$@" \| control \| $lastproc
  47.  
  48. stty -raw tandem -cbreak echo
  49.