summaryrefslogtreecommitdiff
path: root/smart-documents.org
diff options
context:
space:
mode:
Diffstat (limited to 'smart-documents.org')
-rw-r--r--smart-documents.org15
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
Copyright 2019--2024 Marius PETER