bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#30204: 27.0.50; Changing major mode resets non-default invisibility


From: Philipp Stephani
Subject: bug#30204: 27.0.50; Changing major mode resets non-default invisibility spec
Date: Mon, 22 Jan 2018 20:47:25 +0000



Philipp Stephani <p.stephani2@gmail.com> schrieb am Mo., 22. Jan. 2018 um 21:42 Uhr:
Eli Zaretskii <eliz@gnu.org> schrieb am Mo., 22. Jan. 2018 um 16:57 Uhr:
> From: Philipp Stephani <p.stephani2@gmail.com>
> Date: Mon, 22 Jan 2018 10:51:32 +0100
>
> C-x b *foo* RET
> M-: (progn (add-to-invisibility-spec 'bar) (insert (propertize "foo" 'invisible 'foo)))
>
> Now "foo" is visible, as it should be.
>
> M-x fundamental-mode => "foo" becomes invisible, because
> `kill-all-local-variables' has reset `buffer-invisibility-spec' to t.
> This can be confusing for modes that use conditional invisibility
> properties such as markdown-mode.
> Probably `kill-all-local-variables' shouldn't blindly reset
> `buffer-invisibility-spec', or maybe it should remove conditional
> invisibility properties.

Why can't you make buffer-invisibility-spec be a permanent-local
variable in the cases where that is TRT?


Hmm, yes, that sounds like a good idea. Let me try that. 

I don't think this works: The permanent-local property is a global symbol property, but I'd need it to be per-buffer. 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]