Subject: bug#76364: [PATCH] Add python-ts-mode to ffap-alist

From: kobarity <[email-masked]>
Date: Mon, 17 Feb 2025 23:24:13 +0900

FFAP support in python.el does not work in `python-ts-mode'.

1. emacs -Q
2. Open a Python file and enter the following:

import argparse

3. C-c C-p   (Open the Inferior Python buffer)
4. Back to the Python file buffer.
5. C-c C-c   (Send the buffer to Inferior Python)
5. Place the point to "argparse".
6. M-x ffap-bindings
7. C-x C-f

Minibuffer should display something like:

Find file or URL: somewhere/argparse.py

8. C-g   (Cancel opening the file)
9. M-x python-ts-mode
10. C-x C-f

The path to argparse.py is not shown.

This occurs because `python-ts-mode' is not registered in
`ffap-alist'.

Attached is a patch to fix this issue.

--
In GNU Emacs 31.0.50 (build 8, x86_64-pc-linux-gnu, GTK+ Version
 3.24.41, cairo version 1.18.0) of 2025-01-01 built on ubuntu2404
Repository revision: 78bc5949db489b143f7424540d6cc56fc529c9ea
Repository branch: master
System Description: Ubuntu 24.04.2 LTS

Configured using:
 'configure --with-pgtk --with-native-compilation --with-tree-sitter'