From 48ec78999dfc5b74a54c959397a429cdb7fa118e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 15 Nov 2016 15:51:25 +0100 Subject: [PATCH] +editor/emacs/aliases.zsh --- editor/emacs/aliases.zsh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/editor/emacs/aliases.zsh b/editor/emacs/aliases.zsh index e69de29b..f49442b4 100644 --- a/editor/emacs/aliases.zsh +++ b/editor/emacs/aliases.zsh @@ -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