diff options
| author | Luc Teirlinck | 2005-11-27 23:55:30 +0000 |
|---|---|---|
| committer | Luc Teirlinck | 2005-11-27 23:55:30 +0000 |
| commit | 63de21602df3ac75ba3f2399e7547db1a68b790f (patch) | |
| tree | 8df4145af43867f7888b631a58f60c498fd4cb20 | |
| parent | fe0e0a47a5c5fc401ecb58099971168781dace2a (diff) | |
| download | emacs-63de21602df3ac75ba3f2399e7547db1a68b790f.tar.gz emacs-63de21602df3ac75ba3f2399e7547db1a68b790f.zip | |
(Buffer-menu-revert-function): Make the selected window's buffer the
current buffer around the call to `list-buffers-noselect'. This is
necessary to mark that buffer with a `.' in the Buffer Menu when
called from Lisp, for instance by Auto Revert Mode.
| -rw-r--r-- | lisp/buff-menu.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index e48aa9e34b4..bb4bab7dcce 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el | |||
| @@ -210,7 +210,12 @@ Letters do not insert themselves; instead, they are commands. | |||
| 210 | (prop (point-min)) | 210 | (prop (point-min)) |
| 211 | ;; do not make undo records for the reversion. | 211 | ;; do not make undo records for the reversion. |
| 212 | (buffer-undo-list t)) | 212 | (buffer-undo-list t)) |
| 213 | (list-buffers-noselect Buffer-menu-files-only) | 213 | ;; We can be called by Auto Revert Mode with the "*Buffer Menu*" |
| 214 | ;; temporarily the current buffer. Make sure that the | ||
| 215 | ;; interactively current buffer is correctly identified with a `.' | ||
| 216 | ;; by `list-buffers-noselect'. | ||
| 217 | (with-current-buffer (window-buffer) | ||
| 218 | (list-buffers-noselect Buffer-menu-files-only)) | ||
| 214 | (if oline | 219 | (if oline |
| 215 | (while (setq prop (next-single-property-change prop 'buffer)) | 220 | (while (setq prop (next-single-property-change prop 'buffer)) |
| 216 | (when (eq (get-text-property prop 'buffer) oline) | 221 | (when (eq (get-text-property prop 'buffer) oline) |