mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-15 19:31:29 -07:00
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)
This commit is contained in:
parent
896399d7fb
commit
71d7ea23db
1 changed files with 5 additions and 10 deletions
|
|
@ -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)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue