[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#45922: 27.1; Better auto-fill for strings in python-mode
From: |
Lars Ingebrigtsen |
Subject: |
bug#45922: 27.1; Better auto-fill for strings in python-mode |
Date: |
Sat, 07 May 2022 17:51:14 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Акимжанчег <zelenaruta@gmail.com> writes:
> Today I was making a program in Python for myself. One of the functions
> required me to pass a long string to it, so I did that. Auto-fill-mode
> got triggered when I pressed the space bar and the string was split from
> this:
> ```
> matrix = self.getprop("Coordinate Transformation Matrix").split(", ")
> ```
> To this:
> ```
> matrix = self.getprop("Coordinate Transformation
> Matrix").split(", ")
> ```
> After that, I saw `SyntaxError: EOL while scanning string literal'.
I can reproduce this in Emacs 29, too.
The Python auto fill basically just calls `do-auto-fill', so I wondered
whether there was something simple to tell that function to not consider
any points where ppss-string-terminator is non-nil as a break point, but
apparently not? (It seems like such an obvious thing to have, so
perhaps there's a good reason we don't have that.)
I've added Stefan to the CCs; perhaps he has some comments.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- bug#45922: 27.1; Better auto-fill for strings in python-mode,
Lars Ingebrigtsen <=