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 14:57:03 +0100 Message-ID: <87fscaeg5s.fsf@gmail.com> References: <167346587385.21119.11842722402918987249@vcs2.savannah.gnu.org> <20230111193754.33EF3C00A7F@vcs2.savannah.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="15500"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Juri Linkov To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jan 16 14:57:47 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 1pHPzf-0003lY-G6 for ged-emacs-devel@m.gmane-mx.org; Mon, 16 Jan 2023 14:57:47 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHPzD-0002Ss-GS; Mon, 16 Jan 2023 08:57:19 -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 1pHPz4-0002M0-EQ for emacs-devel@gnu.org; Mon, 16 Jan 2023 08:57:12 -0500 Original-Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pHPz2-0007HK-2F for emacs-devel@gnu.org; Mon, 16 Jan 2023 08:57:10 -0500 Original-Received: by mail-wm1-x32e.google.com with SMTP id c4-20020a1c3504000000b003d9e2f72093so18837047wma.1 for ; Mon, 16 Jan 2023 05:57:05 -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 :gmane-reply-to-list:references:in-reply-to:subject:cc:to:from:from :to:cc:subject:date:message-id:reply-to; bh=nBhVx0S0a/ayf51jgr5bmw2XQj/jsVQ4zelHsoH0R2c=; b=WhZoFXAAWMpkbtNuQRO4qqdtwDjyx+XIylJixCW9dSKQkwJJiku9Af5A6XXPDG4WNi WtS+BOr+Dykd9Z38oFEh4Qntb+jJZtlDdZ+K1W1kDaUPPQwqRj61GEa1dt7UnVOzFMFa VBTkEP3+GtLJA1rVESC2bXlU8dL2jji8kcqQGX58yoTnuD7YoiKEWfAfrayHDrropyWn bgKi8TQKtVCuleHmCB6jzvL5qVscs+oEZC5obzE3fHTKI74WcQ6suT5jWU4CCJkn+5U0 inuLBOdTbLig8aLFJFkaZSD0SidS3+whWkkcjyj6VY90nseLzc3OTEmzI7liM9jf/0VF Y2Dg== 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 :gmane-reply-to-list:references:in-reply-to:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nBhVx0S0a/ayf51jgr5bmw2XQj/jsVQ4zelHsoH0R2c=; b=ZQ2i6Gjnc69yb2yeXJ+dF4qk0z24FnFnTKCwoi4+X/0mxaA6gmZUQpK3Cf+QYJQD+Z LxPZ+N+qVJxVNjtILDdiNqVSlGRYJ/qL0RKtHV9I1boNwy54pK2vn/wNWktEoGzZrH7q WVPmggfS22OuqB/TPIjckb/r64C4cjft6lBNH1lHUncKDsC4FIUpfd0+8hRLWZCVWjvS 9u6ePX0uJ34/YV8K+XyiEAhaL6sRQjp4XNKKswgWIxXzEuUuzCcV9L5s6GzZN00fBs3K g94wurAS35B3LvufzY78Su13DBuu078qx2ILwZ3zoZiQeDqBlaawXgDONyhFxVGmrvBD mL0g== X-Gm-Message-State: AFqh2kpJyGYWurcdy+6X2egc2IeKGi5g77EjcEfdgdCMizESPfEQOPxp L5g6Knifj3aynjNnaaJKbrVL8pSEink= X-Google-Smtp-Source: AMrXdXtamOfpPXmsB/xGvFeg78INpFmmLqtujksOxIisrDh1JGCsNFn8ZiUIofUN+HR312Fsr9GgdQ== X-Received: by 2002:a05:600c:4349:b0:3da:f665:5b6b with SMTP id r9-20020a05600c434900b003daf6655b6bmr5374279wme.25.1673877424494; Mon, 16 Jan 2023 05:57:04 -0800 (PST) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id e18-20020a05600c4e5200b003d9876aa04asm40225622wmq.41.2023.01.16.05.57.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 05:57:03 -0800 (PST) In-Reply-To: <20230111193754.33EF3C00A7F@vcs2.savannah.gnu.org> (Juri Linkov's message of "Wed, 11 Jan 2023 14:37:54 -0500 (EST)") Gmane-Reply-To-List: yes Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=rpluim@gmail.com; helo=mail-wm1-x32e.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:302453 Archived-At: >>>>> On Wed, 11 Jan 2023 14:37:54 -0500 (EST), Juri Linkov said: Juri> branch: emacs-29 Juri> commit 4a8891a462e41e81a5232810b67d9d85f79bc515 Juri> Author: Juri Linkov Juri> Commit: Juri Linkov Juri> * etc/NEWS: Mention incompatible changes in 'outline-minor-mo= de-cycle-map'. =20=20=20=20 Juri> * lisp/outline.el (outline-minor-mode-cycle--bind): Juri> Add docstring (bug#60426). Juri> (outline-minor-mode-cycle--bind): Default 'map' to Juri> 'outline-minor-mode-cycle-map'. Juri> (outline-minor-mode-cycle-map): Improve docstring. Juri> (outline-minor-mode): Move margin-cycling keys to Juri> 'outline-minor-mode-cycle-map'. Juri> --- Juri/Eli, any objection to putting something like the following in emacs-29? That would make it easier to add heading-specific bindings in NEWS mode, which I=CA=BCd do in master. It also avoids creating a separate keymap for each heading. Robert --=20 diff --git c/lisp/outline.el i/lisp/outline.el index 91f6040687b..65d0d4db261 100644 --- c/lisp/outline.el +++ i/lisp/outline.el @@ -1766,6 +1766,13 @@ 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) + (defun outline--create-button-icons () (pcase outline-minor-mode-use-buttons ('in-margins @@ -1798,15 +1805,21 @@ 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 +(defvar-keymap outline-inserted-button-map + "RET" #'outline-cycle + "" #'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) + (defun outline--insert-button (type) (with-silent-modifications (save-excursion @@ -1829,19 +1842,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