+editor/emacs/aliases.zsh

This commit is contained in:
Henrik Lissner 2016-11-15 15:51:25 +01:00
parent 218bfd11ac
commit 48ec78999d

View file

@ -0,0 +1,16 @@
if is-callable emacs; then
if [[ "$OSTYPE" == darwin* ]]; then
alias emacs='emacs -nw'
e() { # Emacs version of v
if pgrep Emacs 2>&1 >/dev/null; then
emacsclient -n $@
else
/Applications/Emacs.app/Contents/MacOS/Emacs $@ &
fi
}
else
alias e='emacsclient -n'
fi
ediff() { e --eval "(ediff-files \"$1\" \"$2\")"; }
fi