summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ibuffer.el58
1 files changed, 36 insertions, 22 deletions
diff --git a/ibuffer.el b/ibuffer.el
index 150d248..42c1480 100644
--- a/ibuffer.el
+++ b/ibuffer.el
@@ -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")