From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#45328: 28.0.50; [PATCH] Compare raw syntax descriptors with equal in `python-indent-region' Date: Sat, 19 Dec 2020 23:03:55 +0000 Message-ID: Reply-To: Andrea Corallo 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="36330"; mail-complaints-to="usenet@ciao.gmane.io" To: 45328@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 20 00:05:19 2020 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 1kqlHr-0009Lz-5J for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Dec 2020 00:05:19 +0100 Original-Received: from localhost ([::1]:44650 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqlHq-0007UI-6J for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Dec 2020 18:05:18 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqlHa-0007Tr-Rh for bug-gnu-emacs@gnu.org; Sat, 19 Dec 2020 18:05:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60064) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kqlHa-0006OR-Ka for bug-gnu-emacs@gnu.org; Sat, 19 Dec 2020 18:05:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kqlHa-0001gS-Ew for bug-gnu-emacs@gnu.org; Sat, 19 Dec 2020 18:05:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Dec 2020 23:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 45328 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.16084190506353 (code B ref -1); Sat, 19 Dec 2020 23:05:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 Dec 2020 23:04:10 +0000 Original-Received: from localhost ([127.0.0.1]:43368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqlGj-0001eP-OL for submit@debbugs.gnu.org; Sat, 19 Dec 2020 18:04:09 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:38324) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqlGf-0001eD-B1 for submit@debbugs.gnu.org; Sat, 19 Dec 2020 18:04:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48824) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqlGf-0007Cy-4v for bug-gnu-emacs@gnu.org; Sat, 19 Dec 2020 18:04:05 -0500 Original-Received: from mab.sdf.org ([205.166.94.33]:37230 helo=ma.sdf.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqlGd-00064K-8a for bug-gnu-emacs@gnu.org; Sat, 19 Dec 2020 18:04:04 -0500 Original-Received: from akrl by ma.sdf.org with local (Exim 4.92) (envelope-from ) id 1kqlGV-0005iF-Q1 for bug-gnu-emacs@gnu.org; Sat, 19 Dec 2020 23:03:55 +0000 Received-SPF: pass client-ip=205.166.94.33; envelope-from=akrl@sdf.org; helo=ma.sdf.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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:196437 Archived-At: --=-=-= Content-Type: text/plain Hi, debugging a native-comp regression on the branch I'm working on I came to this. 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? Regards Andrea --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Compare-raw-syntax-descriptors-with-equal-in-python-.patch >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) -- 2.20.1 --=-=-=--