From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs 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 Organization: LINKOV.NET Message-ID: <86v90lo0kg.fsf@mail.linkov.net> References: <87lf1ke5iy.fsf@miha-pc> <87h7c7qhxv.fsf@gnus.org> <87ilwnds17.fsf@miha-pc> <874k86orjx.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1447"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: 51974@debbugs.gnu.org, miha@kamnitnik.top To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 21 18:57:13 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mor5U-0000BI-50 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 21 Nov 2021 18:57:12 +0100 Original-Received: from localhost ([::1]:48722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mor5S-0004KM-5g for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 21 Nov 2021 12:57:10 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35260) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mor5K-0004Jx-DR for bug-gnu-emacs@gnu.org; Sun, 21 Nov 2021 12:57:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34417) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mor5K-00062I-4p for bug-gnu-emacs@gnu.org; Sun, 21 Nov 2021 12:57:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mor5K-0002Fn-2Y for bug-gnu-emacs@gnu.org; Sun, 21 Nov 2021 12:57:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 Nov 2021 17:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51974 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 51974-submit@debbugs.gnu.org id=B51974.16375173958624 (code B ref 51974); Sun, 21 Nov 2021 17:57:02 +0000 Original-Received: (at 51974) by debbugs.gnu.org; 21 Nov 2021 17:56:35 +0000 Original-Received: from localhost ([127.0.0.1]:45963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mor4t-0002F2-DE for submit@debbugs.gnu.org; Sun, 21 Nov 2021 12:56:35 -0500 Original-Received: from relay5-d.mail.gandi.net ([217.70.183.197]:51681) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mor4r-0002Ek-QB for 51974@debbugs.gnu.org; Sun, 21 Nov 2021 12:56:34 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 05C451C0003; Sun, 21 Nov 2021 17:56:25 +0000 (UTC) In-Reply-To: <874k86orjx.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 21 Nov 2021 09:12:50 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:220578 Archived-At: >> 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.