diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-01-29 12:13:43 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-01-29 12:13:43 -0500 |
commit | cbd6ae1cc7374e9c825642751bfa146c7cc0a5a8 (patch) | |
tree | 4deb4424b115b3215bc696ac467149368b97d79d /.config/bash/rc.d/emacs.sh | |
parent | af7fca016ab0e83c129147f8102dc8ee893571a8 (diff) | |
parent | a19e716cf26fa4a67fe676d0822c96425d528903 (diff) |
Merge branch 'gluglugt60-par'
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 165d71e..bb6454b 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 -e "$*" 2>/dev/null + emacsclient -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 |