[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#51809: 29.0.50; [PATCH] Support for outline default state in Diff bu
From: |
Juri Linkov |
Subject: |
bug#51809: 29.0.50; [PATCH] Support for outline default state in Diff buffers |
Date: |
Tue, 11 Jan 2022 19:46:05 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) |
>> (...) Also xref works nicely, although I don't know why it requires
>> `outline-apply-default-state' after enabling `outline-minor-mode':
>
> It's a mistake to rely on `hack-local-variables-hook' to call
> `outline-apply-default-state' when Outline minor mode is enabled since
> `hack-local-variables-hook' is run after processing a file's local
> variable specs.
There is also such a case possible where the file begins with a prop-line:
# -*- mode: outline-minor; -*-
and ends with the Local Variables section, e.g.:
# outline-default-state: 2
`hack-local-variables-hook' can handle such case in `outline-minor-mode'.
> I'll send an updated patch after some time using this.
Now you can take in use a new hook added in bug#52855 that allows
applying the default state after vc-diff finishes:
(add-hook 'vc-diff-finish-functions 'outline-apply-default-state)
- bug#51809: 29.0.50; [PATCH] Support for outline default state in Diff buffers,
Juri Linkov <=