Browse Source

my-term always use eshell

pull/1/head
10sr 11 years ago
parent
commit
d8f5954e4c
1 changed files with 17 additions and 6 deletions
  1. +17
    -6
      emacs.el

+ 17
- 6
emacs.el View File

@@ -1737,12 +1737,23 @@ if arg given, use that eshell buffer, otherwise make new eshell buffer."
(pop-to-buffer my-term) (pop-to-buffer my-term)
(setq my-term (setq my-term
(save-window-excursion (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 () (defun my-delete-frame-or-kill-emacs ()
"delete frame when opening multiple frame, kill emacs when only one." "delete frame when opening multiple frame, kill emacs when only one."


Loading…
Cancel
Save