(defun buffer-exists (bufname) (not (eq nil (get-buffer bufname)))) (defun make-shell (name) "Create a shell buffer named NAME." (interactive "sName: ") (if (buffer-exists "*eshell*") (setq eshell-buffer-name name) (message "eshell doesnot exists, use the default name: *eshell*")) (eshell))
Because the eshell buffer is determined by the value of eshell-buffer-name. You
need not to rename the buffer after creating it.
emacs run multiple eshell buffers (more then one eshell),布布扣,bubuko.com
时间: 2024-10-17 02:10:25