- Subject: Re: [jed-users] Re: #!/usr/bin/python3 does not trigger python mode
- From: Tom Culliton <tom.culliton@xxxxxxxxx>
- Date: Wed, 7 Dec 2022 08:34:17 -0500
Maybe look at the modeline_hook in site.sl for clues, something along the
lines of how it handles shell and slang scripts.
You could also add a magic mode comment like "# -*- mode: python -*-" after
your shebang line.
On Wed, Dec 7, 2022 at 8:11 AM Morten Bo Johansen <mbj@xxxxxxxxx> wrote:
> Ulli Horlacher <framstag@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> > I have also files beginning with
> >
> > #!/usr/bin/python3.6
>
> Can't you just change it to #!/usr/bin/python and then reload?
>
> On my system:
>
> ~/ % ls -l /usr/bin/python
> lrwxrwxrwx 1 root root 7 1 nov 15:18 /usr/bin/python -> python3
>
> ~/ % ls -l /usr/bin/python3
> lrwxrwxrwx 1 root root 10 1 nov 15:18 /usr/bin/python3 -> python3.10
>
> If that's not palatable, then maybe something like this?
>
> define no_mode_hook ()
> {
> if (re_fsearch("#!.*python[0-9]"))
> python_mode();
> }
>
>
> Morten
> _______________________________________________
> For list information, visit <http://jedsoft.org/jed/mailinglists.html>.
>
>
[2022 date index]
[2022 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]