diff options
author | JSDurand <mmemmew@gmail.com> | 2022-01-21 18:21:15 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2022-01-21 18:21:15 +0800 |
commit | e25238bafc9134d95d8343180511555b3a553ffc (patch) | |
tree | 4b627018ec219435d7558f7fba85660b5a25b47b | |
parent | cb3eef4d198a5b38481f1b114e227539240e291c (diff) |
ibuffer: add option to show the clear pass list
* ibuffer.el (durand-reset-clearlist): Add option to show the clear
pass list.
-rw-r--r-- | ibuffer.el | 58 |
1 files changed, 36 insertions, 22 deletions
@@ -99,29 +99,43 @@ automatically.") ;;;###autoload (defun durand-reset-clearlist (&optional arg) "Remove killed buffers from `durand-clear-passlist'. -If ARG is non-nil, reset `durand-clear-passlist' to -`durand-default-clear-passlist'." +If ARG is non-nil and not '(16), reset `durand-clear-passlist' to +`durand-default-clear-passlist'. + +If ARG is '(16), show the current contents of +`durand-clear-passlist'." (interactive "P") - (setq - durand-clear-passlist - (cond - ((null arg) - (delq nil - (mapcar - (lambda (buf) - (cond ((car (member buf durand-default-clear-passlist))) - ((and (stringp buf) - (get-buffer buf) - (buffer-live-p (get-buffer buf))) - buf) - ((and (bufferp buf) (buffer-live-p buf)) - buf))) - durand-clear-passlist))) - (durand-default-clear-passlist))) - (message "%s the clear list!" - (cond - ((null arg) "Removed killed buffers from") - ("Reset")))) + (cond + ((equal arg (cons 16 nil)) + (message "clear list: %s" + (mapconcat + (lambda (e) + (cond + ((bufferp e) (buffer-name e)) + (e))) + durand-clear-passlist + ", "))) + + ((setq + durand-clear-passlist + (cond + ((null arg) + (delq nil + (mapcar + (lambda (buf) + (cond ((car (member buf durand-default-clear-passlist))) + ((and (stringp buf) + (get-buffer buf) + (buffer-live-p (get-buffer buf))) + buf) + ((and (bufferp buf) (buffer-live-p buf)) + buf))) + durand-clear-passlist))) + (durand-default-clear-passlist))) + (message "%s the clear list!" + (cond + ((null arg) "Removed killed buffers from") + ("Reset")))))) (autoload #'durand-member "common.el") |