summaryrefslogtreecommitdiff
path: root/ibuffer.el
diff options
context:
space:
mode:
Diffstat (limited to 'ibuffer.el')
-rw-r--r--ibuffer.el37
1 files changed, 33 insertions, 4 deletions
diff --git a/ibuffer.el b/ibuffer.el
index 5f7f614..f09aa7b 100644
--- a/ibuffer.el
+++ b/ibuffer.el
@@ -99,11 +99,14 @@ automatically.")
;;;###autoload
(defun durand-reset-clearlist (&optional arg)
"Remove killed buffers from `durand-clear-passlist'.
-If ARG is non-nil and not '(16), reset `durand-clear-passlist' to
-`durand-default-clear-passlist'.
+If ARG is non-nil, not '(64), and not '(16), reset
+`durand-clear-passlist' to `durand-default-clear-passlist'.
If ARG is '(16), show the current contents of
-`durand-clear-passlist'."
+`durand-clear-passlist'.
+
+If ARG is '(64), for each buffer in `durand-clear-passlist', show
+whether it is a live buffer and its name as a list of cons cells."
(interactive "P")
(cond
((equal arg (cons 16 nil))
@@ -115,7 +118,33 @@ If ARG is '(16), show the current contents of
(e)))
durand-clear-passlist
", ")))
-
+ ((equal arg (cons 64 nil))
+ (let ((result (string)))
+ (mapc
+ (lambda (b)
+ (cond
+ ((bufferp b)
+ (setq
+ result
+ (format
+ "%s\n%s: %s"
+ result
+ (buffer-name b)
+ (cond ((buffer-live-p b) "live") ("not live")))))
+ ((stringp b)
+ (setq
+ result
+ (format
+ "%s\n%s: %s"
+ result b
+ (cond ((buffer-live-p (get-buffer b)) "live")
+ ("not live")))))
+ ((setq
+ result
+ (format "%s\n%S: %s" result b "unknown")))))
+ durand-clear-passlist)
+ (with-temp-buffer-window "*durand clear list*" nil nil
+ (princ result))))
((setq
durand-clear-passlist
(cond