diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-06-10 02:31:25 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-06-10 02:32:33 +0100 |
commit | b138739a63de13ad8918f634f2054badbbacc800 (patch) | |
tree | 8ed3eb654100f0354a8ff63d58b186ddb0ad71c5 /Emacs/.config | |
parent | a882d15a3f458fb561620a5ccdc6ec3f1dea67cf (diff) | |
download | dotfiles-b138739a63de13ad8918f634f2054badbbacc800.tar.gz dotfiles-b138739a63de13ad8918f634f2054badbbacc800.tar.bz2 dotfiles-b138739a63de13ad8918f634f2054badbbacc800.zip |
(Emacs)~Clean buffer list code
Diffstat (limited to 'Emacs/.config')
-rw-r--r-- | Emacs/.config/emacs/config.org | 12 |
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 |