From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: emacs-29 4a8891a462: * etc/NEWS: Mention incompatible changes in 'outline-minor-mode-cycle-map'. Date: Mon, 16 Jan 2023 20:02:34 +0100 Message-ID: <87zgaicng5.fsf@gmail.com> References: <167346587385.21119.11842722402918987249@vcs2.savannah.gnu.org> <20230111193754.33EF3C00A7F@vcs2.savannah.gnu.org> <87fscaeg5s.fsf@gmail.com> <83lem24kia.fsf@gnu.org> <878ri2ed4h.fsf@gmail.com> <83bkmy4dru.fsf@gnu.org> <874jsqe6tk.fsf@gmail.com> <86h6wq2x5d.fsf@mail.linkov.net> <837cxm49q1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22747"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Juri Linkov , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jan 16 20:03:29 2023 Return-path: Envelope-to: ged-emacs-devel@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 1pHUlV-0005f4-DM for ged-emacs-devel@m.gmane-mx.org; Mon, 16 Jan 2023 20:03:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHUkj-0005Ui-HZ; Mon, 16 Jan 2023 14:02:41 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHUkh-0005Tu-Vq for emacs-devel@gnu.org; Mon, 16 Jan 2023 14:02:40 -0500 Original-Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pHUkg-00059S-7e; Mon, 16 Jan 2023 14:02:39 -0500 Original-Received: by mail-wm1-x32f.google.com with SMTP id h12-20020a05600c314c00b003da50afcb33so4334037wmo.4; Mon, 16 Jan 2023 11:02:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=LAFlSAtdA4dyJpVOlI3XAemUbBdqcqvPbuUq3yujObc=; b=KAvIbnByIzEjXoPBQQhoyVhVjTBoftfPibIo968ll8Fr+95uMEv0F6sp9G/TzPISby RNeEiw1JyI93McsLke/KzkkBmrL/xgMbu9gbSbuAXdlaWWVSWETkRtz1kpthfNitwwSI yg3UsoM1j4FW7nVdHdLd6q2gObuEWprhRLMR1a9t8z6OC8I1cmw/9aCrjRB7HUdrjHO/ aQYjeM/USTnZ2de6ulLyN4WAnl7Lp3voqTplXIhgMf4KlgA5Px+npGoYaJYKA+kXbRsm lmYD3fKtKrhgdKCHQdRYilPz6fsYmpVJd0DA9Qi3oTLUusYpZO3nj5PbdaFIsLrGiXOo bV3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LAFlSAtdA4dyJpVOlI3XAemUbBdqcqvPbuUq3yujObc=; b=rR8lHcfufCYt4vzg03LlcWVIZgMO7l2zGnNkLoNcm5vuYWTQhL1yY0Uw/UQUX9S5Fz eKKyXMqDQU21GYvXrZDvTTvedvybU0SoCtUI6lw+l08cN62euudGkncW1VNQgDp0xdrO iUIHeSsffo0hiKsqWIIRNl1A7XzsiNk/LNqTWiLErBL4bo8p+pAp6xpRlO27xWfxitxC acKy0k0cPBS6yvjS+3Ow+Bp7BbtGr+8p/4XQROBSM7OZesaZ4tzWV005i8j9ZJlmkZ4Y Xr4kCFwVw99VvTVRIkNKct5/h03coBtB2P01EVjGC/pBsx5NsNsZd129JJxObZmxF2D0 y8WQ== X-Gm-Message-State: AFqh2kr9qbEhUsUvIM7izME5JLzI+r0zQ0WptyDFIgFpqSTqJC7F3WQQ x4w3+kBrff4Km14xQ+7JpVh9/OOfsTI= X-Google-Smtp-Source: AMrXdXtHxUmQKv+BBipCdF2PHoqnssayAISGZjpw76fMVTVmBcmdhBgWOs4RdOPYNEoP3xPNn3h+RA== X-Received: by 2002:a05:600c:3ba5:b0:3da:ff66:e3cc with SMTP id n37-20020a05600c3ba500b003daff66e3ccmr481014wms.21.1673895755679; Mon, 16 Jan 2023 11:02:35 -0800 (PST) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id x8-20020a05600c2d0800b003dafcd9b750sm3135250wmf.43.2023.01.16.11.02.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 11:02:35 -0800 (PST) In-Reply-To: <837cxm49q1.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 16 Jan 2023 20:26:14 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=rpluim@gmail.com; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:302467 Archived-At: >>>>> On Mon, 16 Jan 2023 20:26:14 +0200, Eli Zaretskii said: >> From: Juri Linkov >> Cc: Eli Zaretskii , emacs-devel@gnu.org >> Date: Mon, 16 Jan 2023 19:43:10 +0200 >>=20 >> > Eli> Ah, okay. Fine with me if Juri (or someone else) doesn't= object. >> > >> > >> (and what I really want to do is add 'n' and 'p' into that = map, which >> > >> improves the speed at which I can proofread NEWS.) >> > >> > Eli> On master or emacs-29? >> > >> > On master. I=CA=BCm assuming adding bindings would not fall under = 'bug >> > fixes only'. >>=20 >> But maybe Eli will agree to install it on emacs-29? Eli> Maybe. Robert didn't really explain what are his plans in that Eli> regard. Here=CA=BCs the complete patch (minus doc changes). I was thinking putting the outline.el bits in emacs-29, to make it easier for everybody to change the bindings, and then changing the bindings in news-mode in master. Or we could just stick the whole thing in master. Robert --=20 diff --git c/lisp/outline.el i/lisp/outline.el index 91f6040687b..6fb9281f61e 100644 --- c/lisp/outline.el +++ i/lisp/outline.el @@ -1766,6 +1766,20 @@ outline-cycle-buffer ;;; Button/margin indicators =20 +(defvar-keymap outline-button-icon-map + "" #'outline-cycle + ;; Need to override the global binding + ;; `mouse-appearance-menu' with : + "S-" #'ignore + "S-" #'outline-cycle-buffer) + +(defvar-keymap outline-overlay-button-map + "RET" #'outline-cycle) + +(defvar-keymap outline-inserted-button-map + :parent (make-composed-keymap outline-button-icon-map + outline-overlay-button-map)) + (defun outline--create-button-icons () (pcase outline-minor-mode-use-buttons ('in-margins @@ -1798,12 +1812,7 @@ outline--create-button-icons (propertize (icon-string icon-name) 'mouse-face 'default 'follow-link 'mouse-face - 'keymap (define-keymap - "" #'outline-cycle - ;; Need to override the global binding - ;; `mouse-appearance-menu' with : - "S-" #'ignore - "S-" #'outline-cycle-buffer))) + 'keymap outline-button-icon-map)) (list 'outline-open (if outline--use-rtl 'outline-close-rtl 'outline-close)))))) =20 @@ -1829,19 +1838,13 @@ outline--insert-button (overlay-put o 'face (plist-get icon 'face)) (overlay-put o 'follow-link 'mouse-face) (overlay-put o 'mouse-face 'highlight) - (overlay-put o 'keymap (define-keymap - "RET" #'outline-cycle - "" #'outline-cycle - ;; Need to override the global binding - ;; `mouse-appearance-menu' with : - "S-" #'ignore - "S-" #'outline-cycle-buffer))) + (overlay-put o 'keymap outline-inserted-button-map)) ('in-margins (overlay-put o 'before-string icon) - (overlay-put o 'keymap (define-keymap "RET" #'outline-cycle))) + (overlay-put o 'keymap outline-overlay-button-map)) (_ (overlay-put o 'before-string icon) - (overlay-put o 'keymap (define-keymap "RET" #'outline-cycle))))= )))) + (overlay-put o 'keymap outline-overlay-button-map))))))) =20 (defun outline--fix-up-all-buttons (&optional from to) (when outline-minor-mode-use-buttons diff --git c/lisp/textmodes/emacs-news-mode.el i/lisp/textmodes/emacs-news-= mode.el index b844955e1be..31410176181 100644 --- c/lisp/textmodes/emacs-news-mode.el +++ i/lisp/textmodes/emacs-news-mode.el @@ -60,6 +60,11 @@ emacs-news-mode-map "C-x C-q" #'emacs-news-view-mode " " #'emacs-news-open-line) =20 +(defvar-keymap emacs-news-heading-map + :parent outline-overlay-button-map + "n" #'outline-next-visible-heading + "p" #'outline-previous-visible-heading) + (defvar emacs-news-view-mode-map ;; This is defined this way instead of inheriting because we're ;; deriving the mode from `special-mode' and want the keys from there. @@ -75,7 +80,8 @@ emacs-news--mode-common (setq-local font-lock-defaults '(emacs-news-mode-font-lock-keywords t)) (setq-local outline-minor-mode-cycle t outline-minor-mode-highlight 'append - outline-minor-mode-use-buttons 'in-margins) + outline-minor-mode-use-buttons 'in-margins + outline-overlay-button-map emacs-news-heading-map) (outline-minor-mode) (setq-local imenu-generic-expression outline-imenu-generic-expression) (emacs-etc--hide-local-variables))