* lisp/buff-menu.el (Buffer-menu-mode): Remove
revert-buffer-restore-functions with handling of
outline-minor-mode and move it to outline-minor-mode.
* lisp/outline.el (outline-minor-mode):
Add revert-buffer-restore-functions to call
outline-minor-mode-highlight-buffer after reverting the buffer
with outline-minor-mode and outline-minor-mode-highlight
where font-lock can't be used to update highlighting.
(cherry picked from commit
fe79a6ff507670a2ab79fca060c2727fcd0a4dae)
["Quit" quit-window
:help "Remove the buffer menu from the display"]))
-(declare-function outline-minor-mode-highlight-buffer "outline" ())
-
(define-derived-mode Buffer-menu-mode tabulated-list-mode "Buffer Menu"
"Major mode for Buffer Menu buffers.
The Buffer Menu is invoked by the commands \\[list-buffers],
:interactive nil
(setq-local buffer-stale-function
(lambda (&optional _noconfirm) 'fast))
- (add-hook 'tabulated-list-revert-hook 'list-buffers--refresh nil t)
- (add-hook 'revert-buffer-restore-functions
- (lambda ()
- (when (bound-and-true-p outline-minor-mode)
- (lambda ()
- (outline-minor-mode-highlight-buffer))))
- nil t))
+ (add-hook 'tabulated-list-revert-hook 'list-buffers--refresh nil t))
(defun buffer-menu--display-help ()
(message "%s"
(add-hook 'change-major-mode-hook
(lambda () (outline-minor-mode -1))
nil t)
+ (add-hook 'revert-buffer-restore-functions
+ (lambda ()
+ (when (and outline-minor-mode outline-minor-mode-highlight
+ (not (and global-font-lock-mode
+ (font-lock-specified-p major-mode))))
+ (lambda ()
+ (outline-minor-mode-highlight-buffer))))
+ nil t)
(setq-local line-move-ignore-invisible t)
;; Cause use of ellipses for invisible text.
(add-to-invisibility-spec '(outline . t))