From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#45328: 28.0.50; [PATCH] Compare raw syntax descriptors with equal in `python-indent-region' Date: Fri, 19 Mar 2021 21:51:39 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16932"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 45328@debbugs.gnu.org To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 20 03:52:17 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 1lNRio-0004Gf-VT for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 20 Mar 2021 03:52:14 +0100 Original-Received: from localhost ([::1]:41620 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNRio-0005q6-0K for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 19 Mar 2021 22:52:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59788) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNRic-0005pP-G8 for bug-gnu-emacs@gnu.org; Fri, 19 Mar 2021 22:52:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39726) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lNRic-0001vD-9U for bug-gnu-emacs@gnu.org; Fri, 19 Mar 2021 22:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lNRic-000172-7l for bug-gnu-emacs@gnu.org; Fri, 19 Mar 2021 22:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 Mar 2021 02:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45328 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 45328-submit@debbugs.gnu.org id=B45328.16162087094235 (code B ref 45328); Sat, 20 Mar 2021 02:52:02 +0000 Original-Received: (at 45328) by debbugs.gnu.org; 20 Mar 2021 02:51:49 +0000 Original-Received: from localhost ([127.0.0.1]:51268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNRiO-00016F-Mg for submit@debbugs.gnu.org; Fri, 19 Mar 2021 22:51:48 -0400 Original-Received: from mail-pf1-f176.google.com ([209.85.210.176]:34509) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNRiM-00015z-3b for 45328@debbugs.gnu.org; Fri, 19 Mar 2021 22:51:46 -0400 Original-Received: by mail-pf1-f176.google.com with SMTP id y5so7154076pfn.1 for <45328@debbugs.gnu.org>; Fri, 19 Mar 2021 19:51:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=VbstGTZh+lG+QXT/HhSGl9aYNI3QjVfGlHkxPT35HKc=; b=Ykaqcr7gSimgJ+eOBPSyWdBjS4qtaVa2AkpxAcXm+XtlowkbZb/b6IKS0azx64a5b5 nQzetRQEU2vMMBbCaW6DB1TXlN5wTBAwLH+aVwRiBrDr0WvG8aaSHsfDxaNBpP9/gYL1 esntaLi4w3t5lM+hx30bUOFQvltmkr9vteZbzoGarRp1fUsR2bS53uSBk6dSyecH2tSS 10F+NuCDyEhBzBSt6xzHNDdx0dUPDJMBgqxwXokKPkMwQY98W1b5cVX7KE3seZm1gaac kwxIydW54UxPJcJNW5GPdoyFHmNFlZr85yiAExCXU4lzo28ZFCzOFylh37CI4CTle9cN Qhmw== X-Gm-Message-State: AOAM531N/iqv4jCl0xJTn15PpggVQa9qA1yPbk8xdxZordrFLpjuPwtl LNaktM1xNz/o1+KnQKXNOgwcfMLXb2BzYrp46vU= X-Google-Smtp-Source: ABdhPJwYuXBKbwR530yfZzDrheOojMkEagShND2aOO9jItbmSxdnGmIIDNMCOx2u5TCBl08AebwM4FrT3534d2a+j0s= X-Received: by 2002:aa7:828f:0:b029:200:6e27:8c8f with SMTP id s15-20020aa7828f0000b02902006e278c8fmr11923926pfm.44.1616208700290; Fri, 19 Mar 2021 19:51:40 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 19 Mar 2021 21:51:39 -0500 In-Reply-To: (Andrea Corallo's message of "Sat, 19 Dec 2020 23:03:55 +0000") 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:202718 Archived-At: Andrea Corallo writes: > In `python-indent-region' we are comparing raw syntax descriptors using > `eq' but I think we should use `equal' (as we do underneath in > `python-fill-string'). > > I'm quite convinced the fix is correct but; should this go also in 27 > where the code is the same? That was in December, and there were no followups. We are one week away from Emacs 27.2, so I don't think we want this on emacs-27 right now. If you think the fix is correct, I don't see why we couldn't push it there after Emacs 27.2 is released. Should we perhaps start by getting the fix pushed to master? >>>From 9163724fcd8eea5c9e2908ecb38d90406669a8d3 Mon Sep 17 00:00:00 2001 > From: Andrea Corallo > Date: Sat, 19 Dec 2020 23:51:36 +0100 > Subject: [PATCH] * Compare raw syntax descriptors with equal in > `python-indent-region'. > > * lisp/progmodes/python.el (python-indent-region): Compare raw > syntax descriptors with equal. > --- > lisp/progmodes/python.el | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el > index d75944a702..dc2efdfcf7 100644 > --- a/lisp/progmodes/python.el > +++ b/lisp/progmodes/python.el > @@ -1259,7 +1259,7 @@ Called from a program, START and END specify the region to indent." > ;; Don't mess with strings, unless it's the > ;; enclosing set of quotes or a docstring. > (or (not (python-syntax-context 'string)) > - (eq > + (equal > (syntax-after > (+ (1- (point)) > (current-indentation)