dot/emacs, el/dot-emacs.el: Add support for the Go programming language.
[profile] / bin / mdw-editor
1 #! /bin/sh
2
3 set -e
4 editor=${MDW_EDITOR-ed}
5 emacsclient=$(
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) editor=emacsclient emacsclient=nil;;
10 mdw-editor,mdw-editor,*);;
11 mdw-editor,*,*) editor=$VISUAL;;
12 *,*,*) editor=$EDITOR;;
13 esac
14 case "$emacsclient" in
15 t) exec emacsclient -nw -a "$editor" "$@";;
16 *) exec $editor "$@";;
17 esac