From fcd004a4fb12f378fc35a857695347429ec1dfab Mon Sep 17 00:00:00 2001 From: PHO Date: Fri, 27 Mar 2015 17:40:01 +0900 Subject: [PATCH] Auto commit by The Sugar System. --- dot-files/_emacs_el | 5 +++++ dot-files/_zshrc | 13 +++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/dot-files/_emacs_el b/dot-files/_emacs_el index e8508e6..c05e740 100644 --- a/dot-files/_emacs_el +++ b/dot-files/_emacs_el @@ -141,6 +141,11 @@ (color-theme-initialize) (color-theme-subtle-hacker))) +;; multi-term +(autoload 'multi-term "multi-term" + "Create new term buffer. +Will prompt you shell name when you type `C-u' before this command." t) + ;; auto-complete (require-if-present 'auto-complete-config) (if (featurep 'auto-complete-config) diff --git a/dot-files/_zshrc b/dot-files/_zshrc index d800cc4..45ac9af 100644 --- a/dot-files/_zshrc +++ b/dot-files/_zshrc @@ -60,6 +60,10 @@ function _we_are_in_ssh_session () { [[ -n "$SSH_CONNECTION" ]] } +function _we_are_in_emacs () { + [[ -n "$INSIDE_EMACS" ]] +} + _prompt_base='%B[%n@%m] %{%(?.$fg[green].$fg[red])%}%#%{$reset_color%}%b ' if ( _we_are_in_gnu_screen ); then # GNU Screen has a capability to set its window title by "ESC k @@ -280,16 +284,17 @@ autoload -U compinit compinit # End of lines added by compinstall -if ( _we_are_in_gnu_screen ); then +if _we_are_in_gnu_screen; then # When we are in a GNU Screen session... - if ( _we_are_in_ssh_session ); then + if _we_are_in_ssh_session; then # Propagate remote session's bells to the local one. screen -X vbell off fi else - if [ -e ".motd" ]; then - cat ".motd" + if _we_are_in_emacs; then + # Without this, Emacs' term mode has trouble with backspaces. + export TERM=vt100 fi # Run "fortune" if we aren't in a GNU Screen session. -- 2.40.0