4 editor
=${MDW_EDITOR-ed}
6 emacsclient
--eval '(>= emacs-major-version 23)' 2>/dev
/null ||
:)
7 [ -t
0 -a
-t
1 ] || TERM
=dumb
8 case "$EDITOR,$VISUAL,$TERM" in
9 mdw-editor
,mdw-editor
,dumb | \
10 mdw-editor
,mdw-editor
,emacs | \
11 mdw-editor
,mdw-editor
,eterm
*)
12 editor
=emacsclient emacsclient
=nil
;;
13 mdw-editor
,mdw-editor
,*);;
14 mdw-editor
,*,*) editor
=$VISUAL;;
15 *,*,*) editor
=$EDITOR;;
17 case "$emacsclient" in
18 t
) exec emacsclient
-nw
-a
"$editor" "$@";;
19 *) exec $editor "$@";;