diff options
| author | John Paul Wallington | 2005-08-28 06:52:18 +0000 |
|---|---|---|
| committer | John Paul Wallington | 2005-08-28 06:52:18 +0000 |
| commit | f215a1b4dd7d8fa4d13084b288c1b4859b008c7f (patch) | |
| tree | be27976dbbad5e3882103c5fecdbb924dc297837 /lisp | |
| parent | fef741ad68a2e7707278e6ad864979238b9fbe76 (diff) | |
| download | emacs-f215a1b4dd7d8fa4d13084b288c1b4859b008c7f.tar.gz emacs-f215a1b4dd7d8fa4d13084b288c1b4859b008c7f.zip | |
(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.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/ibuf-ext.el | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 65e22bf8d2c..ead4aa28921 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2005-08-28 John Paul Wallington <jpw@gnu.org> | ||
| 2 | |||
| 3 | * ibuf-ext.el (ibuffer-auto-update-changed): Use | ||
| 4 | `frame-or-buffer-changed-p' to check whether we need to update. | ||
| 5 | (ibuffer-auto-mode): Don't advise `get-buffer-create' and | ||
| 6 | `kill-buffer'. Initialise `ibuffer-auto-buffers-changed' | ||
| 7 | as a `frame-or-buffer-changed-p' state vector instead. | ||
| 8 | |||
| 1 | 2005-08-27 Romain Francoise <romain@orebokech.com> | 9 | 2005-08-27 Romain Francoise <romain@orebokech.com> |
| 2 | 10 | ||
| 3 | * textmodes/makeinfo.el (makeinfo-compile): Use | 11 | * textmodes/makeinfo.el (makeinfo-compile): Use |
diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el index da3ca20e5aa..e6fc1d67b8e 100644 --- a/lisp/ibuf-ext.el +++ b/lisp/ibuf-ext.el | |||
| @@ -222,8 +222,7 @@ Currently, this only applies to `ibuffer-saved-filters' and | |||
| 222 | (ibuffer-buf-matches-predicates buf ibuffer-always-show-predicates))))) | 222 | (ibuffer-buf-matches-predicates buf ibuffer-always-show-predicates))))) |
| 223 | 223 | ||
| 224 | (defun ibuffer-auto-update-changed () | 224 | (defun ibuffer-auto-update-changed () |
| 225 | (when ibuffer-auto-buffers-changed | 225 | (when (frame-or-buffer-changed-p 'ibuffer-auto-buffers-changed) |
| 226 | (setq ibuffer-auto-buffers-changed nil) | ||
| 227 | (mapcar #'(lambda (buf) | 226 | (mapcar #'(lambda (buf) |
| 228 | (ignore-errors | 227 | (ignore-errors |
| 229 | (with-current-buffer buf | 228 | (with-current-buffer buf |
| @@ -243,10 +242,7 @@ With numeric ARG, enable auto-update if and only if ARG is positive." | |||
| 243 | (if arg | 242 | (if arg |
| 244 | (plusp arg) | 243 | (plusp arg) |
| 245 | (not ibuffer-auto-mode))) | 244 | (not ibuffer-auto-mode))) |
| 246 | (defadvice get-buffer-create (after ibuffer-notify-create activate) | 245 | (frame-or-buffer-changed-p 'ibuffer-auto-buffers-changed) |
| 247 | (setq ibuffer-auto-buffers-changed t)) | ||
| 248 | (defadvice kill-buffer (after ibuffer-notify-kill activate) | ||
| 249 | (setq ibuffer-auto-buffers-changed t)) | ||
| 250 | (add-hook 'post-command-hook 'ibuffer-auto-update-changed) | 246 | (add-hook 'post-command-hook 'ibuffer-auto-update-changed) |
| 251 | (ibuffer-update-mode-name)) | 247 | (ibuffer-update-mode-name)) |
| 252 | 248 | ||