The `emacs' type is there precisely because it isn't `dumb', which will
make `git' apply colouring. But I think that `M-x ansi-term' is actually
better so I doubt that this will get much use.
It's important to recognize the `term' and `ansi-term' terminals because
trying to start `emacsclient -nw' in them makes Emacs deadlock. Besides,
plain `emacsclient' is almost certainly more convenient.
emacsclient=t
[ -t 0 -a -t 1 ] || TERM=dumb
case "$EDITOR,$VISUAL,$TERM" in
emacsclient=t
[ -t 0 -a -t 1 ] || TERM=dumb
case "$EDITOR,$VISUAL,$TERM" in
- mdw-editor,mdw-editor,dumb) editor=emacsclient emacsclient=nil;;
+ mdw-editor,mdw-editor,dumb | \
+ mdw-editor,mdw-editor,emacs | \
+ mdw-editor,mdw-editor,eterm*)
+ editor=emacsclient emacsclient=nil;;
mdw-editor,mdw-editor,*);;
mdw-editor,*,*) editor=$VISUAL;;
*,*,*) editor=$EDITOR;;
mdw-editor,mdw-editor,*);;
mdw-editor,*,*) editor=$VISUAL;;
*,*,*) editor=$EDITOR;;
pager=${MDW_PAGER-less}
[ -t 1 ] || TERM=dumb
case "$PAGER,$TERM" in
pager=${MDW_PAGER-less}
[ -t 1 ] || TERM=dumb
case "$PAGER,$TERM" in
- mdw-pager,dumb) pager=cat;;
+ mdw-pager,dumb | \
+ mdw-pager,emacs | \
+ mdw-pager,eterm*)
+ pager=cat;;
mdw-pager,*);;
*,*) pager=$PAGER;;
esac
mdw-pager,*);;
*,*) pager=$PAGER;;
esac