el/dot-emacs.el: In hideshow mode, hide the initial comment.
[profile] / bin / mdw-editor
CommitLineData
e04c4857
MW
1#! /bin/sh
2
3set -e
4editor=${MDW_EDITOR-ed}
e2fd2096 5emacsclient=t
8ec7231c 6[ -t 0 -a -t 1 ] || TERM=dumb
e04c4857 7case "$EDITOR,$VISUAL,$TERM" in
e2fd2096 8 mdw-editor,mdw-editor,dumb) editor=emacsclient emacsclient=nil;;
e04c4857 9 mdw-editor,mdw-editor,*);;
e04c4857 10 mdw-editor,*,*) editor=$VISUAL;;
9db17a65 11 *,*,*) editor=$EDITOR;;
e04c4857 12esac
e2fd2096
MW
13case "$emacsclient" in
14 t) exec emacsclient -nw -a "$editor" "$@";;
15 nil) exec $editor "$@";;
16esac