emacs/eshell: fix wrong-type-arg: stringp errors

Fix old usage of projectile API.
This commit is contained in:
Henrik Lissner 2018-10-01 12:06:08 -04:00
parent e85aaabed9
commit 868a0ab9b9
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -83,7 +83,8 @@
(interactive "P") (interactive "P")
(when (eq major-mode 'eshell-mode) (when (eq major-mode 'eshell-mode)
(user-error "Already in an eshell buffer")) (user-error "Already in an eshell buffer"))
(let* ((default-directory (if arg default-directory (doom-project-root))) (let* ((default-directory (or (if arg default-directory (doom-project-root))
default-directory))
(buf (+eshell--unused-buffer))) (buf (+eshell--unused-buffer)))
(with-current-buffer (switch-to-buffer buf) (with-current-buffer (switch-to-buffer buf)
(if (eq major-mode 'eshell-mode) (if (eq major-mode 'eshell-mode)
@ -96,7 +97,8 @@
(defun +eshell/open-popup (arg &optional command) (defun +eshell/open-popup (arg &optional command)
"Open eshell in a popup window." "Open eshell in a popup window."
(interactive "P") (interactive "P")
(let* ((default-directory (if arg default-directory (doom-project-root))) (let* ((default-directory (or (if arg default-directory (doom-project-root))
default-directory))
(buf (+eshell--unused-buffer))) (buf (+eshell--unused-buffer)))
(with-current-buffer (pop-to-buffer buf) (with-current-buffer (pop-to-buffer buf)
(if (eq major-mode 'eshell-mode) (if (eq major-mode 'eshell-mode)
@ -110,7 +112,8 @@
"Open eshell in a separate workspace. Requires the (:feature workspaces) "Open eshell in a separate workspace. Requires the (:feature workspaces)
module to be loaded." module to be loaded."
(interactive "P") (interactive "P")
(let ((default-directory (if arg default-directory (doom-project-root))) (let ((default-directory (or (if arg default-directory (doom-project-root))
default-directory))
(buf (+eshell--unused-buffer 'new))) (buf (+eshell--unused-buffer 'new)))
(set-frame-parameter nil 'saved-wconf (current-window-configuration)) (set-frame-parameter nil 'saved-wconf (current-window-configuration))
(delete-other-windows) (delete-other-windows)