From 4d8f6c76cd99854f0af0e48ba9eae6182c715efe Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sat, 26 Jan 2013 18:39:06 +0900 Subject: [PATCH] always popup buffer when my-term --- emacs.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/emacs.el b/emacs.el index 47b2371..ed96500 100644 --- a/emacs.el +++ b/emacs.el @@ -1716,11 +1716,13 @@ if arg given, use that eshell buffer, otherwise make new eshell buffer." (buffer-name my-term)) (pop-to-buffer my-term) (setq my-term - (if (eq system-type 'windows-nt) - (eshell) - (if (require 'multi-term nil t) - (multi-term) - (ansi-term shell-file-name)))))) + (save-window-excursion + (if (eq system-type 'windows-nt) + (eshell) + (if (require 'multi-term nil t) + (multi-term) + (ansi-term shell-file-name))))) + (my-term))) (defun my-delete-frame-or-kill-emacs () "delete frame when opening multiple frame, kill emacs when only one."