This commit is contained in:
Ivan Malison 2014-11-19 23:23:11 -08:00
parent de5ec6dcad
commit 1451d039c2

View File

@ -1,11 +1,10 @@
alias emacs='_emacs -c -n ' alias emacs='_emacs -c -n '
is_osx && alias emacs='cocoa_emacs' is_osx && alias emacs='cocoa_emacs'
alias terminal_emacs='_emacs -t' alias terminal_emacs='_emacs -t'
export GLOBAL_EMACS=""
is_ssh && emacs="terminal_emacs" is_ssh && emacs="terminal_emacs"
function e { function e {
[ ! -z "$*" ] && emacs || emacs_open -n "$@" [ -z "$*" ] && emacs || emacs_open -n "$@"
} }
function cocoa_emacs { function cocoa_emacs {
@ -22,8 +21,8 @@ function _emacs {
} }
function _emacs_server_file { function _emacs_server_file {
local server_name="$GLOBAL_EMACS" local server_name="global"
[ -z $GLOBAL_EMACS ] && server_name="$(_current_dot_directory)" [ ! -z ${PER_DIRECTORY_EMACS+y} ] && server_name="$(_current_dot_directory)"
echo $server_name echo $server_name
} }