From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 45328@debbugs.gnu.org
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 [thread overview]
Message-ID: <xjf8s9twg84.fsf@sdf.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 363 bytes --]
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Compare-raw-syntax-descriptors-with-equal-in-python-.patch --]
[-- Type: text/x-diff, Size: 1061 bytes --]
From 9163724fcd8eea5c9e2908ecb38d90406669a8d3 Mon Sep 17 00:00:00 2001
From: Andrea Corallo <akrl@sdf.org>
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
next reply other threads:[~2020-12-19 23:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-19 23:03 Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-03-20 2:51 ` bug#45328: 28.0.50; [PATCH] Compare raw syntax descriptors with equal in `python-indent-region' Stefan Kangas
2021-03-21 21:19 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-17 15:06 ` Lars Ingebrigtsen
2022-05-09 13:54 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xjf8s9twg84.fsf@sdf.org \
--to=bug-gnu-emacs@gnu.org \
--cc=45328@debbugs.gnu.org \
--cc=akrl@sdf.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).