diff options
author | Luke Shumaker <shumakl@purdue.edu> | 2015-02-06 15:17:51 -0500 |
---|---|---|
committer | Luke Shumaker <shumakl@purdue.edu> | 2015-02-06 15:17:51 -0500 |
commit | dab097d5000c4697761b6985cb3512f7bce0147f (patch) | |
tree | 7b81b7826a1e23822955560f0f73dc09cda6c8e8 /.config/bash/rc.d/emacs.sh | |
parent | f50b49ef26f5c692bda1f3f13cd38f9f4f395300 (diff) | |
parent | a6f973687fb4a1a4558f74f7da595b6902a5dce0 (diff) |
Merge remote-tracking branch 'origin/master' into purdue-cs/master
Conflicts:
.config/X11/clientrc
.config/bash/rc.d/emacs.sh
.config/cron/make-config
.config/emacs/custom.el
.config/emacs/init.el
.config/git/config
.config/login.sh
.config/selected_editor
.local/bin/config-path
Diffstat (limited to '.config/bash/rc.d/emacs.sh')
-rw-r--r-- | .config/bash/rc.d/emacs.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/.config/bash/rc.d/emacs.sh b/.config/bash/rc.d/emacs.sh index b402932..354c8f3 100644 --- a/.config/bash/rc.d/emacs.sh +++ b/.config/bash/rc.d/emacs.sh @@ -5,12 +5,13 @@ if [[ $TERM == eterm* ]]; then EDITOR=$SELECTED_EDITOR VISUAL=$SELECTED_EDITOR export SELECTED_EDITOR EDITOR VISUAL + export PAGER=cat ## Primatives for interacting with Emacs ############################### # _emacs_run LISP _emacs_run() { - emacsclient -f "$HOME/.emacs.d/server-$HOSTNAME/server" -e "$*" 2>/dev/null + emacsclient -f "$HOME/.emacs.d/server-$HOSTNAME/server" -a false -e "$*" 2>/dev/null } # _emacs_quote UNQUOTED_STRING _emacs_quote() { @@ -85,6 +86,7 @@ if [[ $TERM == eterm* ]]; then # Set the shell's X11 display (emacs -> shell) _emacs_set_shell_DISPLAY() { export DISPLAY=$(_emacs_unquote "$(_emacs_run "(cdr (assoc 'display (frame-parameters)))")") + [[ $DISPLAY != nil ]] || unset DISPLAY } ## Do those things ##################################################### @@ -94,5 +96,7 @@ if [[ $TERM == eterm* ]]; then _emacs_set_remote_dir _emacs_set_shell_DISPLAY } - PROMPT_COMMAND=_emacs_PROMPT_COMMAND + if _emacs_run '()' >/dev/null; then + PROMPT_COMMAND=_emacs_PROMPT_COMMAND + fi fi |