From de5ec6dcadb0d0d2e95df19cb1d4eb4bad3c2dc9 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Wed, 19 Nov 2014 23:15:16 -0800 Subject: [PATCH] Bump .emacs.d. Make e run slightly different commands based on whether or not arguments were passed. --- dotfiles/emacs.d | 2 +- dotfiles/lib/shellrc/emacs.sh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) 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 "$@"' }