diff --git a/dotfiles/emacs.d b/dotfiles/emacs.d index 2ca32d97..b274677e 160000 --- a/dotfiles/emacs.d +++ b/dotfiles/emacs.d @@ -1 +1 @@ -Subproject commit 2ca32d970c859d8d133958db101ce0d7c6b7bfea +Subproject commit b274677eef4716f3043da174f2c619c45382f5b2 diff --git a/dotfiles/lib/shellrc/emacs.sh b/dotfiles/lib/shellrc/emacs.sh index 51923380..839810d0 100644 --- a/dotfiles/lib/shellrc/emacs.sh +++ b/dotfiles/lib/shellrc/emacs.sh @@ -1,10 +1,13 @@ -alias e='emacs_open -n ' alias emacs='_emacs -c -n ' is_osx && alias emacs='cocoa_emacs' alias terminal_emacs='_emacs -t' export GLOBAL_EMACS="" is_ssh && emacs="terminal_emacs" +function e { + [ ! -z "$*" ] && emacs || emacs_open -n "$@" +} + function cocoa_emacs { reattach-to-user-namespace zsh -c 'source ~/.zshrc && _emacs -c -n "$@"' }