summaryrefslogtreecommitdiff
path: root/.bash.d
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2011-05-12 22:49:47 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2011-05-12 22:49:47 -0400
commitf67a03ec2a3a266add0060ea74bfbc203f4f7b7f (patch)
tree1d7ea82855e0428cdbb0c1f6a0041dd8ac9dce4b /.bash.d
parentc9935112c8b66e23d2acd7584fecd8e99a281b14 (diff)
Play with emacs daemon mode
* .bashrc: include .bash.d/* * .bash.d/emacs.sh: adjust emacsclient flags in SELECTED_EDITOR, EDITOR, and VISUAL based on $DISPLAY and $TERM * .emacs: set the font size in a way that plays nice with daemon-mode
Diffstat (limited to '.bash.d')
-rw-r--r--.bash.d/emacs.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/.bash.d/emacs.sh b/.bash.d/emacs.sh
new file mode 100644
index 0000000..b3c5c53
--- /dev/null
+++ b/.bash.d/emacs.sh
@@ -0,0 +1,16 @@
+case "$SELECTED_EDITOR" in
+ emacsclient*)
+ if [ -n "$DISPLAY" ]; then
+ export VISUAL="$SELECTED_EDITOR -c"
+ fi
+ case "$TERM" in
+ eterm*)
+ SELECTED_EDITOR="$SELECTED_EDITOR -n"
+ EDITOR=$SELECTED_EDITOR
+ VISUAL=$SELECTED_EDITOR
+ export SELECTED_EDITOR EDITOR VISUAL
+ :;;
+ esac
+ :;;
+esac
+