changeset 65180:6705c5e7dee2

(ibuffer-auto-update-changed): Use `frame-or-buffer-changed-p' to check whether we need to update. (ibuffer-auto-mode): Don't advise `get-buffer-create' and `kill-buffer'. Initialise `ibuffer-auto-buffers-changed' as a `frame-or-buffer-changed-p' state vector instead.
author John Paul Wallington <jpw@pobox.com>
date Sun, 28 Aug 2005 06:50:29 +0000
parents a308f717214a
children 3687b140eb96
files lisp/ibuf-ext.el
diffstat 1 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ibuf-ext.el	Sat Aug 27 22:01:23 2005 +0000
+++ b/lisp/ibuf-ext.el	Sun Aug 28 06:50:29 2005 +0000
@@ -222,8 +222,7 @@
 	 (ibuffer-buf-matches-predicates buf ibuffer-always-show-predicates)))))
 
 (defun ibuffer-auto-update-changed ()
-  (when ibuffer-auto-buffers-changed
-    (setq ibuffer-auto-buffers-changed nil)
+  (when (frame-or-buffer-changed-p 'ibuffer-auto-buffers-changed)
     (mapcar #'(lambda (buf)
 		(ignore-errors
 		  (with-current-buffer buf
@@ -243,10 +242,7 @@
        (if arg
 	   (plusp arg)
 	 (not ibuffer-auto-mode)))
-  (defadvice get-buffer-create (after ibuffer-notify-create activate)
-    (setq ibuffer-auto-buffers-changed t))
-  (defadvice kill-buffer (after ibuffer-notify-kill activate)
-    (setq ibuffer-auto-buffers-changed t))
+  (frame-or-buffer-changed-p 'ibuffer-auto-buffers-changed)
   (add-hook 'post-command-hook 'ibuffer-auto-update-changed)
   (ibuffer-update-mode-name))