From 4f3594667990a3612be9f316b6942e1dc84efdc8 Mon Sep 17 00:00:00 2001 From: Blendoit Date: Wed, 9 Dec 2020 21:02:49 -0800 Subject: Sidebar looking juicy :eyes: --- smart-documents.org | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/smart-documents.org b/smart-documents.org index 2a4e6e5..37cec4f 100644 --- a/smart-documents.org +++ b/smart-documents.org @@ -926,15 +926,18 @@ We replace the standard welcome screen with our own. Get inspiration from ~ibuffer-sidebar~ and create a better sidebar. #+BEGIN_SRC emacs-lisp :tangle yes -(defvar sd-sidebar nil "Becomes true if sd-sidebar is visible.") + (defvar sd-sidebar nil "Becomes true if sd-sidebar is visible.") (defun sd-sidebar () (interactive) -(if (eq sd-sidebar t)) - (split-window-right) - (dired ".") - (dired-hide-details-mode) - (setq sd-sidebar t)) + (if (eq sd-sidebar t) + (progn + (delete-window) + (setq sd-sidebar nil)) + (split-window-right) + (dired ".") + (dired-hide-details-mode) + (setq sd-sidebar t))) #+END_SRC *** Better parentheses -- cgit v1.2.3