I guess you would have to check the process tree (via ps -ef) and see
whether emacs is somwhere the parent of your current shell.
For example (on HP-UX, needs adjustment for your shell):
ps -ef | grep `ps -ef | grep $$ | grep ksh | grep -v grep | awk '{ print
$3 }' ` >out
cat out | grep -v /ksh | grep -v grep | grep /emacs
if [[ $? = 0 ]] then
echo "We are emacs"
fi
-- Robert
"Dan Jacobson" <jid...@jidanni.org> wrote in message
news:8765nc2...@jidanni.org...
Puff Addison