diff options
author | Blendoit <blendoit@gmail.com> | 2020-12-09 21:02:49 -0800 |
---|---|---|
committer | Blendoit <blendoit@gmail.com> | 2020-12-09 21:02:49 -0800 |
commit | 4f3594667990a3612be9f316b6942e1dc84efdc8 (patch) | |
tree | fc9e285682c65b4a515d0533f1c0bc0d50e956ce | |
parent | 65df3cdb45e394ed7522f9de20a68cd24f35d734 (diff) |
Sidebar looking juicy :eyes:
-rw-r--r-- | smart-documents.org | 15 |
1 files 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 |