aboutsummaryrefslogtreecommitdiff
path: root/Emacs/.config/emacs
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2024-06-10 02:31:25 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2024-06-10 02:32:33 +0100
commitb138739a63de13ad8918f634f2054badbbacc800 (patch)
tree8ed3eb654100f0354a8ff63d58b186ddb0ad71c5 /Emacs/.config/emacs
parenta882d15a3f458fb561620a5ccdc6ec3f1dea67cf (diff)
downloaddotfiles-b138739a63de13ad8918f634f2054badbbacc800.tar.gz
dotfiles-b138739a63de13ad8918f634f2054badbbacc800.tar.bz2
dotfiles-b138739a63de13ad8918f634f2054badbbacc800.zip
(Emacs)~Clean buffer list code
Diffstat (limited to 'Emacs/.config/emacs')
-rw-r--r--Emacs/.config/emacs/config.org12
1 files changed, 6 insertions, 6 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org
index 4e0d4be..54d37d3 100644
--- a/Emacs/.config/emacs/config.org
+++ b/Emacs/.config/emacs/config.org
@@ -181,13 +181,13 @@ any buffers in ~+oreo/keep-buffer~ and kills the rest.
"*Warnings*" "*eshell*")
"List of buffer names to preserve.")
-(defun +oreo/clean-buffer-list ()
+(defun +oreo/clean-buffers ()
"Kill all buffers except any with names in +oreo/keep-buffers."
(interactive)
- (mapcar #'(lambda (buf)
- (if (not (member (buffer-name buf) +oreo/keep-buffers))
- (kill-buffer buf)))
- (buffer-list)))
+ (mapcar #'kill-buffer
+ (cl-remove-if
+ #'(lambda (buf) (member (buffer-name buf) +oreo/keep-buffers))
+ (buffer-list))))
#+end_src
* Aesthetics
General look and feel of Emacs (mostly disabling stuff I don't like).
@@ -508,7 +508,7 @@ Some bindings that I couldn't fit elsewhere easily.
"K" #'kill-buffer
"j" #'next-buffer
"k" #'previous-buffer
- "D" '(+oreo/clean-buffer-list :which-key "Kill most buffers"))
+ "D" '(+oreo/clean-buffers :which-key "Kill most buffers"))
(quit-leader
"q" #'save-buffers-kill-terminal