[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFE] python-mode: removing `file` keyword from syntax highlight
From: |
Konstantin Kharlamov |
Subject: |
Re: [RFE] python-mode: removing `file` keyword from syntax highlight |
Date: |
Sat, 25 Jan 2025 11:25:38 +0300 |
User-agent: |
Evolution 3.54.3 |
On Fri, 2025-01-24 at 14:14 -0500, Howard Melman wrote:
> Konstantin Kharlamov <Hi-Angel@yandex.ru> writes:
>
> > > I am also one of those in a position where I still need to
> > > support
> > > Python 2 code.
> > >
> > > However, I know that Python 2 has already been EOL for a long
> > > time
> > > and that very few people still use it. Furthermore, even if some
> > > keywords are not highlighted, it does not mean that we cannot
> > > edit
> > > Python 2 code. So I am not strongly against removing the Python
> > > 2
> > > keywords if many people want to.
> >
> > I see. Okay, what do you think then about adding to the mode
> > initialization a check that would check if the first line of the
> > buffer
> > has word `python2`, and would otherwise assume it is python3 and
> > turn
> > off the python2 keywords highlight?
>
> Why not have a python2-mode that derives from python-mode
> with a few changes in it?
I didn't look at it, but I would presume there may be places where
python3 and python2 keywords are mixed, so just adding an
initialization switch may be simpler. We already have an example of
such mode: diff-mode has detection of whether current diff is produced
by `git` to cover for `--` symbol being a separator rather than a
"deleted line".
- [RFE] python-mode: removing `file` keyword from syntax highlight, Konstantin Kharlamov, 2025/01/22
- Re: [RFE] python-mode: removing `file` keyword from syntax highlight, Konstantin Kharlamov, 2025/01/24
- Re: [RFE] python-mode: removing `file` keyword from syntax highlight, kobarity, 2025/01/24
- Re: [RFE] python-mode: removing `file` keyword from syntax highlight, Kévin Le Gouguec, 2025/01/25
- Re: [RFE] python-mode: removing `file` keyword from syntax highlight, Ship Mints, 2025/01/25
- Re: [RFE] python-mode: removing `file` keyword from syntax highlight, kobarity, 2025/01/25
- Re: [RFE] python-mode: removing `file` keyword from syntax highlight, Konstantin Kharlamov, 2025/01/25
- Re: [RFE] python-mode: removing `file` keyword from syntax highlight, kobarity, 2025/01/27
- [PATCH] Remove Python2 "file" from the list of keywords, Konstantin Kharlamov, 2025/01/29
- Re: [PATCH] Remove Python2 "file" from the list of keywords, kobarity, 2025/01/29
- Re: [PATCH v2] Remove Python2 "file" from the list of keywords, Konstantin Kharlamov, 2025/01/29
- Re: [PATCH v2] Remove Python2 "file" from the list of keywords, Stefan Kangas, 2025/01/29
- Re: [PATCH v2] Remove Python2 "file" from the list of keywords, Konstantin Kharlamov, 2025/01/30