From 4213899b01d41487a188ca9f5b30f01c9bd861d7 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 1 Jul 2018 01:16:37 +0200 Subject: [PATCH] Refactor out -pcase in +treemacs/toggle --- modules/ui/treemacs/autoload.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/ui/treemacs/autoload.el b/modules/ui/treemacs/autoload.el index ba5814106..cae1d8a17 100644 --- a/modules/ui/treemacs/autoload.el +++ b/modules/ui/treemacs/autoload.el @@ -10,13 +10,13 @@ project to add." (interactive) (require 'treemacs) - (-pcase (treemacs--current-visibility) - ['visible (delete-window (treemacs--is-visible?))] - ['exists (treemacs-select-window)] - ['none + (pcase (treemacs--current-visibility) + (`visible (delete-window (treemacs--is-visible?))) + (`exists (treemacs-select-window)) + (`none (let ((project-root (doom-project-root 'nocache))) (when project-root (unless (treemacs--find-project-for-path project-root) (treemacs-add-project-at (treemacs--canonical-path project-root) (doom-project-name 'nocache)))) - (treemacs--init project-root))])) + (treemacs--init project-root)))))