Fix eshell+persp-mode integration

Would cause a non-descript wrong-number-of-arguments error when trying
to switch workspaces.
This commit is contained in:
Henrik Lissner 2018-07-11 12:42:33 +02:00
parent f540c6c40a
commit 1880fb8a7d
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -75,19 +75,6 @@
(eshell-send-input nil t))))
;;
;; Persp-mode integration
;;
(defun +eshell|switch-workspace ()
(setq +eshell-buffers
(or (persp-parameter 'eshell-buffers)
(make-ring 25))))
(defun +eshell|save-workspace ()
(set-persp-parameter 'eshell-buffers +eshell-buffers))
;;
;; Commands
;;
@ -298,3 +285,14 @@ delete."
if (eq mode 'eshell-mode)
return (select-window win))))))))))
;;;###autoload
(defun +eshell|switch-workspace (type)
(when (eq type 'frame)
(setq +eshell-buffers
(or (persp-parameter 'eshell-buffers)
(make-ring 25)))))
;;;###autoload
(defun +eshell|save-workspace (_workspace target)
(when (framep target)
(set-persp-parameter 'eshell-buffers +eshell-buffers)))