From d8f5954e4c4d3d141bf0030ab42e598bd2d16ffc Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 17 May 2013 01:05:53 +0900 Subject: [PATCH] my-term always use eshell --- emacs.el | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/emacs.el b/emacs.el index 70ec8be..60b1e57 100644 --- a/emacs.el +++ b/emacs.el @@ -1737,12 +1737,23 @@ if arg given, use that eshell buffer, otherwise make new eshell buffer." (pop-to-buffer my-term) (setq my-term (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))) + (funcall my-term-function) + )) + (and my-term + (my-term)))) + +(defvar my-term-function nil + "Function to create terminal buffer.") + +;; (setq my-term-function +;; (lambda () +;; (if (eq system-type 'windows-nt) +;; (eshell) +;; (if (require 'multi-term nil t) +;; (multi-term) +;; (ansi-term shell-file-name))))) + +(setq my-term-function 'eshell) (defun my-delete-frame-or-kill-emacs () "delete frame when opening multiple frame, kill emacs when only one."