1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-27 02:10:52 -08:00
emacs/test/lisp/progmodes
Stefan Monnier d340dc0a25 python.el: Try and better split the Tramp code
Massage the Python-Tramp code so that the Tramp part and the Python
part are a bit less intertwined.  It's still not quite right, but it's
a bit closer to the point where the Tramp part can be moved to `tramp.el`.

* lisp/progmodes/python.el: Don't require `tramp-sh`.
Do require `subr-x` OTOH.  Remove redundant `:group`s.
(python-shell--calculate-process-environment): New function, that only
return the entries to be added.
(python-shell-calculate-process-environment): Rewrite and declare obsolete.
(python-shell-tramp-refresh-remote-path)
(python-shell-tramp-refresh-process-environment): Silence
compiler warnings.
(python-shell-with-environment): Move the bulk of its code to
a new function `python-shell--with-environment` for easier debugging
and to avoid code duplication.
(python-shell--with-environment): New function.  Split the Tramp case
into its own function.
(python-shell--tramp-with-environment): New function.
(python-eldoc-function-timeout-permanent): Fix doc's first line.

* test/lisp/progmodes/python-tests.el: Adjust accordingly.
(python-shell-calculate-process-environment-1)
(python-shell-calculate-process-environment-2)
(python-shell-calculate-process-environment-3)
(python-shell-calculate-process-environment-4)
(python-shell-calculate-process-environment-5)
(python-shell-calculate-process-environment-6)
(python-shell-calculate-process-environment-7)
(python-shell-calculate-process-environment-8):
Use `python-shell--calculate-process-environment`.
(python--tests-process-env-canonical, python--tests-process-env-eql):
New functions.
(python-shell-with-environment-2, python-shell-with-environment-3):
Use them.
2022-02-04 13:35:38 -05:00
..
cperl-mode-resources ; cperl-mode.el: Detect prototypes in anonymous subroutines 2022-02-02 22:42:05 +01:00
elisp-mode-resources lisp/emacs-lisp/lisp-mode.el: Fix parser state corruption. 2021-11-08 07:38:41 +01:00
flymake-resources Keep and report "foreign" diangnostics in flymake-cc Flymake backend 2021-09-14 12:22:15 +01:00
js-resources
ruby-mode-resources
xref-resources
asm-mode-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
autoconf-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
bat-mode-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
bug-reference-tests.el ; Add 2022 to copyright years. 2022-01-01 07:07:15 -05:00
cc-mode-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
compile-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
cperl-mode-tests.el ; cperl-mode.el: Detect prototypes in anonymous subroutines 2022-02-02 22:42:05 +01:00
elisp-mode-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
etags-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
executable-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
f90-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
flymake-tests.el Factor out function to check for clang in tests 2022-01-31 07:42:50 +01:00
gdb-mi-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
glasses-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
grep-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
js-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
octave-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
opascal-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
pascal-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
perl-mode-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
project-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
ps-mode-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
python-tests.el python.el: Try and better split the Tramp code 2022-02-04 13:35:38 -05:00
ruby-mode-tests.el ruby-toggle-block-space-before-parameters: New user option 2022-01-21 04:59:39 +02:00
scheme-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
sh-script-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
sql-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
subword-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
tcl-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
xref-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00