Fix read-only errors when reopening eshell buffers

Caused because eshell would try to insert the banner into the eshell
prompt.
This commit is contained in:
Henrik Lissner 2018-06-28 14:25:03 +02:00
parent b0f59ff5bd
commit f7a4b639e7
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -85,7 +85,9 @@
(let* ((default-directory (if arg default-directory (doom-project-root)))
(buf (+eshell--unused-buffer)))
(with-current-buffer (switch-to-buffer buf)
(eshell-mode)
(if (eq major-mode 'eshell-mode)
(run-hooks 'eshell-mode-hook)
(eshell-mode))
(if command (+eshell-run-command command buf)))
buf))
@ -96,7 +98,9 @@
(let* ((default-directory (if arg default-directory (doom-project-root)))
(buf (+eshell--unused-buffer)))
(with-current-buffer (pop-to-buffer buf)
(eshell-mode)
(if (eq major-mode 'eshell-mode)
(run-hooks 'eshell-mode-hook)
(eshell-mode))
(if command (+eshell-run-command command buf)))
buf))