GNU bug report logs - #51809
29.0.50; [PATCH] Support for outline default state in Diff buffers

Previous Next

Package: emacs;

Reported by: Matthias Meulien <orontee <at> gmail.com>

Date: Sat, 13 Nov 2021 13:10:02 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 29.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #95 received at 51809 <at> debbugs.gnu.org (full text, mbox):

From: Matthias Meulien <orontee <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: 51809 <at> debbugs.gnu.org
Subject: Re: bug#51809: 29.0.50; [PATCH] Support for outline default state
 in Diff buffers
Date: Tue, 28 Dec 2021 23:28:31 +0100
Juri Linkov <juri <at> linkov.net> writes:

> (...)  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.

An explicit call to `outline-apply-default-state' in the implementation
of outline-minor-mode fix the problem:

diff --git a/lisp/outline.el b/lisp/outline.el
index 1a878dee04..65956b9dae 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -439,8 +439,7 @@ outline-minor-mode
         (setq-local line-move-ignore-invisible t)
 	;; Cause use of ellipses for invisible text.
 	(add-to-invisibility-spec '(outline . t))
-        (add-hook 'hack-local-variables-hook
-                  #'outline-apply-default-state nil t))
+        (outline-apply-default-state))
     (when (or outline-minor-mode-cycle outline-minor-mode-highlight)
       (if font-lock-fontified
           (font-lock-remove-keywords nil outline-font-lock-keywords))

I'll send an updated patch after some time using this.
-- 
Matthias




This bug report was last modified 3 years and 91 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.