From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Newsgroups: gmane.emacs.bugs Subject: bug#51807: [PATCH] Fix customization group of python-forward-sexp-function Date: Sat, 13 Nov 2021 10:54:18 +0100 Message-ID: <87fss08jp1.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23989"; mail-complaints-to="usenet@ciao.gmane.io" To: 51807@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 13 11:01:43 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 1mlpqw-00061P-Jv for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Nov 2021 11:01:42 +0100 Original-Received: from localhost ([::1]:51788 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mlpqv-0003xd-Gk for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Nov 2021 05:01:41 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56854) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mlpqI-0003GN-CK for bug-gnu-emacs@gnu.org; Sat, 13 Nov 2021 05:01:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35008) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mlpqI-0002b2-33 for bug-gnu-emacs@gnu.org; Sat, 13 Nov 2021 05:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mlpqI-00015d-0o for bug-gnu-emacs@gnu.org; Sat, 13 Nov 2021 05:01:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Nov 2021 10:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51807 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16367976574169 (code B ref -1); Sat, 13 Nov 2021 10:01:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Nov 2021 10:00:57 +0000 Original-Received: from localhost ([127.0.0.1]:46554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mlpqC-00015B-Vf for submit@debbugs.gnu.org; Sat, 13 Nov 2021 05:00:57 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:52216) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mlpq9-000150-SI for submit@debbugs.gnu.org; Sat, 13 Nov 2021 05:00:56 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56796) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mlpq9-000330-Lw for bug-gnu-emacs@gnu.org; Sat, 13 Nov 2021 05:00:53 -0500 Original-Received: from [2a00:1450:4864:20::12b] (port=37491 helo=mail-lf1-x12b.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mlpq7-0002Yq-O4 for bug-gnu-emacs@gnu.org; Sat, 13 Nov 2021 05:00:53 -0500 Original-Received: by mail-lf1-x12b.google.com with SMTP id c32so28751853lfv.4 for ; Sat, 13 Nov 2021 02:00:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version; bh=/PNlBqrfbxfwqdn1zx1k494z0r40kefLtQPXiQYI1m8=; b=TSdMktOJ/1Dx3TaOGrtW21hbw5S9xCTJm0MuBwMZqmH7yWslHatqDMDBwFcGH2rYww yv/Zv6ZYLjrl0AB387hbFgKz7WH41l7dbWh14QKf1Lp6MOKJEMgpZnpIHGjpVNEE3WPO jWps3wU2S/ScBeohy2nAimprwbSrUweg0botxhLwpPDvMieQfk0pdFWNlKeSzN62Ef/d qs60K1/+rb0ucFGpbyr5IZ887grnQfQPc9zgT1m8Nsj+naT9UvXZFXIbFenoD6Wb71Ua UrV3pO8Cqz1WMiy1rDdWughxrkZVZcqCMZhLWS2ISTkbb6ncqJRGi9MBxTjknSTQKI/M xxYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=/PNlBqrfbxfwqdn1zx1k494z0r40kefLtQPXiQYI1m8=; b=1Afj98WCzjl3Qy18aE1We7oLCcWwW+tjWTXinig8RbCIeiCMyMZhQi1fUE1PnB94u6 G/2RNuviB5DpFR7Q4qrj9AppxRigoJ+G4YGkkJDMFpAOiFnmm083/WyChOvKwQdLwpQs PxB7BROM0oulkPtNBgEUJTQdydJj4mwrAWKNytl967XV5P9WQF1mMLlm0w/DwMV+MB4C du3Q3/awjSmSde/wGYKfQv29DXcd7dyK5qc6ArkRCaxP8ZqqFEufgBsEIOv8rR20rHpP 3INZtWa12sApAIhlaxXsFoL/flViQXV+6znxstGU3x8ojwJDNYg5BvAM9T5Jym9xu97u DCfw== X-Gm-Message-State: AOAM533tBfo0W6NQDzgNLBJJ1LE3pGR1Jha897C/BvfqG5GJtCzpA8IP X1L5ln52yVqsTZAYlwxbVJIRSmEYpyU= X-Google-Smtp-Source: ABdhPJx0m2nFLRWgsyHUJ50m8aDm9YlYcELsQFXIEkhyS324cNXTXV+Kwr4JKX7QfWfdDhozzQ5C+w== X-Received: by 2002:a5d:68d2:: with SMTP id p18mr26970060wrw.21.1636797259840; Sat, 13 Nov 2021 01:54:19 -0800 (PST) Original-Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id k37sm8828423wms.21.2021.11.13.01.54.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Nov 2021 01:54:19 -0800 (PST) X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::12b (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::12b; envelope-from=kevin.legouguec@gmail.com; helo=mail-lf1-x12b.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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:219803 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Tags: patch Version: 28.0.60 python-forward-sexp-function was introduced in 2021-07-31 "Add new user option python-forward-sexp-function" (2dcb0f8f52); due to where it was inserted in python.el, it is currently sorted in the python-flymake customization group, which AFAICT is not what we want. Here are the "design considerations" that went into this patch: 1. Should the defcustom be moved? I'm leaning toward yes; as things stand it was lost in the middle of unrelated flymake code. IMO the places that make the most sense are either (1) the ";;; Navigation" subsection or (2) closer to the definition of python-mode, where the option is actually used. Of course, it could also be left in its current position, and have an explicit :group clause. Which leads to=E2=80=A6 2. Should the defcustom have an explicit :group clause? I'm leaning toward no: (1) it's not needed if we move it to an earlier subsection, (2) M-s o defcustom\|:group shows that a bunch of options use implicit groups already, (3) AFAICT the repo history shows a clear trend toward removing "redundant" :group clauses. Thanks for your time. In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, c= airo version 1.16.0) of 2021-10-30 built on amdahl30 Repository revision: c30f95078c0735447c0bf293f2e6f573bc7057a3 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12013000 System Description: openSUSE Tumbleweed Configured using: 'configure --with-cairo --with-gconf' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Fix-customization-group-of-python-forward-sexp-funct.patch >From b36c7934ee42b97429d5651b74a5f7e35ed61440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= Date: Sat, 13 Nov 2021 10:26:59 +0100 Subject: [PATCH] Fix customization group of python-forward-sexp-function * lisp/progmodes/python.el (python-forward-sexp-function): Move from the "Flymake integration" subsection to the "Navigation" subsection, so that the option is sorted into the 'python' group rather than the 'python-flymake' group. --- lisp/progmodes/python.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index f1c3e75bb7..16b5176be8 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1427,6 +1427,13 @@ python-mark-defun ;;; Navigation +(defcustom python-forward-sexp-function #'python-nav-forward-sexp + "Function to use when navigating between expressions." + :version "28.1" + :type '(choice (const :tag "Python blocks" python-nav-forward-sexp) + (const :tag "CC-mode like" nil) + function)) + (defvar python-nav-beginning-of-defun-regexp (python-rx line-start (* space) defun (+ space) (group symbol-name)) "Regexp matching class or function definition. @@ -5569,13 +5576,6 @@ python-flymake-msg-alist :type '(alist :key-type (regexp) :value-type (symbol))) -(defcustom python-forward-sexp-function #'python-nav-forward-sexp - "Function to use when navigating between expressions." - :version "28.1" - :type '(choice (const :tag "Python blocks" python-nav-forward-sexp) - (const :tag "CC-mode like" nil) - function)) - (defvar-local python--flymake-proc nil) (defun python--flymake-parse-output (source proc report-fn) -- 2.33.1 --=-=-=--