mkhaw@teknowledge-vaxc.ARPA (Mike Khaw) (12/10/87)
how about this: - in ~/.cshrc or ~/.login source ~/.emacsalias - in ~/.aliasemacs alias %emacs 'unalias %emacs; emacs \!:*; source ~/.emacsalias' So %emacs will start emacs the first time, but once an emacs is started, %emacs foregrounds a ^Z'ed emacs until you ^X^C from emacs, when the original alias is restored. It only costs the source'ing of a very short file. Mike Khaw -- internet: mkhaw@teknowledge-vaxc.arpa usenet: {uunet|sun|ucbvax|decwrl|uw-beaver}!mkhaw%teknowledge-vaxc.arpa USnail: Teknowledge Inc, 1850 Embarcadero Rd, POB 10119, Palo Alto, CA 94303
mrd@SUN.MCS.CLARKSON.EDU ("Michael R. DeCorte") (12/11/87)
Here is another slightly improved version of the gnu alias that I wrote. It calls sed only once. alias gnu 'eval `ps | egrep "([ ][e]macs|[ ][C]OMMAND)" | sed -e "s/.*emacs.*/fg %emacs/" -e "s/.*COMMAND.*/emacs/" | tail -1`' Michael DeCorte mrd@clutx.clarkson.edu mrd@clutx.bitnet