mrd@sun.soe.clarkson.edu (Mike DeCorte) (09/26/88)
Here is something similar but differnt. There is no elisp code and has certain advantages and disadvantages that you have to think about yourself. The basic features are: resumes a background emacs job if there is one 1) if you are using suntools, brings up emacstool 2) if you are using X, brings up emacs with the -i option (sets up icon) 3) if you are using a windowning system and have a background emacs it calls emacsclient This is for csh only. NOTE: I broke up the lines, putting a \ at the break, you have to rejoin them. set emacs=("emacs -nw" "fg %emacs" "emacs -i" emacsclient emacstool\ emacsclient emacs emacsclient); alias gnu 'set background=("\!*" "" "\!* &" "\!* &" "\!* &" "\!* &" "\!* &"\ "\!* &") ; jobs >! $HOME/.jobs; grep emacs < $HOME/.jobs >& /dev/null;@\ isjob = ! $status; @ whichjob = 1 + $isjob + $?DISPLAY * 2 +\ $?WINDOW_PARENT * 4; eval $emacs[$whichjob] $background[$whichjob]' You shouldn't be worried about speed, the alias although large is quite fast. -- Michael DeCorte // (315)268-2292 // P.O. Box 652, Potsdam, NY 13676 Internet mrd@sun.soe.clarkson.edu // Bitnet mrd@clutx.bitnet ------------------------------------------------------------ Clarkson Archiver Server archiver-server@sun.soe.clarkson.edu archive-server%sun.soe.clarkson.edu@omnigate.bitnet dumb1!dumb2!dumb3!smart!sun.soe.clarkson.edu!archive-server ------------------------------------------------------------