From ba2e7836ab5813a1895718ecefb2961b90a30017 Mon Sep 17 00:00:00 2001 From: Yiming Chen Date: Sat, 30 Nov 2019 22:00:24 +0800 Subject: [PATCH] email/mu4e: add featurep check for workspaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - if module workspaces is not used, an error would be raised when calling =mu4e `=mu4e: Symbol’s function definition is void: +workspace-switch` - if module workspaces is not used, an error would be raised when quiting mu4e `=mu4e: Symbol’s function definition is void: +workspace/delete` --- modules/email/mu4e/autoload/email.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/email/mu4e/autoload/email.el b/modules/email/mu4e/autoload/email.el index 1fb11cf76..d8ed1d87d 100644 --- a/modules/email/mu4e/autoload/email.el +++ b/modules/email/mu4e/autoload/email.el @@ -52,7 +52,8 @@ default/fallback account." "Start email client." (interactive) (require 'mu4e) - (+workspace-switch +mu4e-workspace-name t) + (if (featurep :ui 'workspaces) + (+workspace-switch +mu4e-workspace-name t)) (mu4e~start 'mu4e~main-view) ;; (save-selected-window ;; (prolusion-mail-show)) @@ -74,5 +75,6 @@ default/fallback account." (defun +mu4e-kill-mu4e-h () ;; (prolusion-mail-hide) - (when (+workspace-exists-p +mu4e-workspace-name) + (when (and (featurep :ui 'workspaces) + (+workspace-exists-p +mu4e-workspace-name)) (+workspace/delete +mu4e-workspace-name)))