diff options
| author | kobarity | 2026-02-19 23:48:25 +0900 |
|---|---|---|
| committer | Juri Linkov | 2026-02-19 19:36:52 +0200 |
| commit | 71d7ea23dbccd93888021ba0dfc3a392ef36f624 (patch) | |
| tree | 8b89256daced6961ac36536ac8097b24913b0b6c /lisp/progmodes/python.el | |
| parent | 896399d7fbe9edab59199ab8788adb3f464535b4 (diff) | |
| download | emacs-71d7ea23dbccd93888021ba0dfc3a392ef36f624.tar.gz emacs-71d7ea23dbccd93888021ba0dfc3a392ef36f624.zip | |
Remove (featurep 'project) guards in python.el
* lisp/progmodes/python.el: Since they are included in emacs 29.1,
remove the Package-Requires for seq, project, and flymake.
(require 'project): Remove 'noerror argument.
(python-shell-get-process-name): Remove (featurep 'project).
Use 'project-name'.
(run-python)
(python--import-sources): Remove (featurep 'project). (Bug#80405)
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 942b072e23a..c544c845dff 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Maintainer: emacs-devel@gnu.org | 6 | ;; Maintainer: emacs-devel@gnu.org |
| 7 | ;; URL: https://github.com/fgallina/python.el | 7 | ;; URL: https://github.com/fgallina/python.el |
| 8 | ;; Version: 0.30 | 8 | ;; Version: 0.30 |
| 9 | ;; Package-Requires: ((emacs "29.1") (compat "29.1.1.0") (seq "2.23") (project "0.1") (flymake "1.0")) | 9 | ;; Package-Requires: ((emacs "29.1") (compat "29.1.1.0")) |
| 10 | ;; Created: Jul 2010 | 10 | ;; Created: Jul 2010 |
| 11 | ;; Keywords: languages | 11 | ;; Keywords: languages |
| 12 | 12 | ||
| @@ -257,7 +257,7 @@ | |||
| 257 | (require 'treesit) | 257 | (require 'treesit) |
| 258 | (require 'pcase) | 258 | (require 'pcase) |
| 259 | (require 'compat) | 259 | (require 'compat) |
| 260 | (require 'project nil 'noerror) | 260 | (require 'project) |
| 261 | (require 'seq) | 261 | (require 'seq) |
| 262 | 262 | ||
| 263 | (declare-function treesit-parser-create "treesit.c") | 263 | (declare-function treesit-parser-create "treesit.c") |
| @@ -3374,11 +3374,8 @@ name respectively the current project name." | |||
| 3374 | (pcase dedicated | 3374 | (pcase dedicated |
| 3375 | ('nil python-shell-buffer-name) | 3375 | ('nil python-shell-buffer-name) |
| 3376 | ('project | 3376 | ('project |
| 3377 | (if-let* ((proj (and (featurep 'project) | 3377 | (if-let* ((proj (project-current))) |
| 3378 | (project-current)))) | 3378 | (format "%s[%s]" python-shell-buffer-name (project-name proj)) |
| 3379 | (format "%s[%s]" python-shell-buffer-name (file-name-nondirectory | ||
| 3380 | (directory-file-name | ||
| 3381 | (project-root proj)))) | ||
| 3382 | python-shell-buffer-name)) | 3379 | python-shell-buffer-name)) |
| 3383 | (_ (format "%s[%s]" python-shell-buffer-name (buffer-name))))) | 3380 | (_ (format "%s[%s]" python-shell-buffer-name (buffer-name))))) |
| 3384 | 3381 | ||
| @@ -3887,7 +3884,6 @@ process buffer for a list of commands.)" | |||
| 3887 | python-shell-dedicated | 3884 | python-shell-dedicated |
| 3888 | t))) | 3885 | t))) |
| 3889 | (let* ((project (and (eq 'project dedicated) | 3886 | (let* ((project (and (eq 'project dedicated) |
| 3890 | (featurep 'project) | ||
| 3891 | (project-current t))) | 3887 | (project-current t))) |
| 3892 | (default-directory (if project | 3888 | (default-directory (if project |
| 3893 | (project-root project) | 3889 | (project-root project) |
| @@ -7056,8 +7052,7 @@ for key in sorted(result): | |||
| 7056 | 7052 | ||
| 7057 | (defun python--import-sources () | 7053 | (defun python--import-sources () |
| 7058 | "List files containing Python imports that may be useful in the current buffer." | 7054 | "List files containing Python imports that may be useful in the current buffer." |
| 7059 | (if-let* (((featurep 'project)) ;For compatibility with Emacs < 26 | 7055 | (if-let* ((proj (project-current))) |
| 7060 | (proj (project-current))) | ||
| 7061 | (seq-filter (lambda (s) (string-match-p "\\.py[iwx]?\\'" s)) | 7056 | (seq-filter (lambda (s) (string-match-p "\\.py[iwx]?\\'" s)) |
| 7062 | (project-files proj)) | 7057 | (project-files proj)) |
| 7063 | (list default-directory))) | 7058 | (list default-directory))) |