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 @@ ;; Maintainer: emacs-devel@gnu.org ;; URL: https://github.com/fgallina/python.el ;; Version: 0.30 -;; Package-Requires: ((emacs "29.1") (compat "29.1.1.0") (seq "2.23") (project "0.1") (flymake "1.0")) +;; Package-Requires: ((emacs "29.1") (compat "29.1.1.0")) ;; Created: Jul 2010 ;; Keywords: languages @@ -257,7 +257,7 @@ (require 'treesit) (require 'pcase) (require 'compat) -(require 'project nil 'noerror) +(require 'project) (require 'seq) (declare-function treesit-parser-create "treesit.c") @@ -3374,11 +3374,8 @@ name respectively the current project name." (pcase dedicated ('nil python-shell-buffer-name) ('project - (if-let* ((proj (and (featurep 'project) - (project-current)))) - (format "%s[%s]" python-shell-buffer-name (file-name-nondirectory - (directory-file-name - (project-root proj)))) + (if-let* ((proj (project-current))) + (format "%s[%s]" python-shell-buffer-name (project-name proj)) python-shell-buffer-name)) (_ (format "%s[%s]" python-shell-buffer-name (buffer-name))))) @@ -3887,7 +3884,6 @@ process buffer for a list of commands.)" python-shell-dedicated t))) (let* ((project (and (eq 'project dedicated) - (featurep 'project) (project-current t))) (default-directory (if project (project-root project) @@ -7056,8 +7052,7 @@ for key in sorted(result): (defun python--import-sources () "List files containing Python imports that may be useful in the current buffer." - (if-let* (((featurep 'project)) ;For compatibility with Emacs < 26 - (proj (project-current))) + (if-let* ((proj (project-current))) (seq-filter (lambda (s) (string-match-p "\\.py[iwx]?\\'" s)) (project-files proj)) (list default-directory)))