el/dot-emacs.el: Various bits of minor face hacking.
[profile] / bin / mdw-editor
... / ...
CommitLineData
1#! /bin/sh
2
3set -e
4editor=${MDW_EDITOR-ed}
5emacsclient=t
6[ -t 0 -a -t 1 ] || TERM=dumb
7case "$EDITOR,$VISUAL,$TERM" in
8 mdw-editor,mdw-editor,dumb) editor=emacsclient emacsclient=nil;;
9 mdw-editor,mdw-editor,*);;
10 mdw-editor,*,*) editor=$VISUAL;;
11 *,*,*) editor=$EDITOR;;
12esac
13case "$emacsclient" in
14 t) exec emacsclient -nw -a "$editor" "$@";;
15 nil) exec $editor "$@";;
16esac