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

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

bug#51974: 29.0.50; [PATCH] Fix deactivation of outline-minor-mode-cycle


From: Juri Linkov
Subject: bug#51974: 29.0.50; [PATCH] Fix deactivation of outline-minor-mode-cycle-map bindings
Date: Sun, 21 Nov 2021 19:55:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

>> This has a small disadvantage: deactivating outline-minor-mode will
>> remove all 'keymap' text properties from the whole buffer, even if they
>> are added by other minor or major modes or whatever.
>
> Yes, that's not good, either.  Alternatively, it could remove all the
> `keymap' entries where the keymap is the outline keymap.  (This would
> break if the keymap is redefined, but...)
>
>> With 'char-property-alias-alist', we can create a sort of namespacing
>> to ensure that outline-minor-mode messes only with its own text
>> properties.
>
> Yup.  Hm.  Well, perhaps it is the best solution here.  It's just pretty
> unusual to use char-property-alias-alist for something like this.  I
> guess other minor modes use overlays, which makes it easier to identify
> what things belong to the minor mode?  (Text properties have a vaguer
> identity.)

Looks like the best solution.

Also outline-minor-mode-highlight-buffer that is a non-font-lock-based
counterpart of outline-font-lock-keywords needs an opposite function
to unhighlight the non-font-lock buffer by removing only faces and keymaps
that outline-minor-mode-highlight-buffer added to the buffer.
But this should be easier to do since it uses overlays.





reply via email to

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