]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix filename completion in Python shell (bug#77853)
authorLiu Hui <liuhui1610@gmail.com>
Mon, 21 Apr 2025 04:46:55 +0000 (12:46 +0800)
committerEshel Yaron <me@eshelyaron.com>
Sat, 26 Apr 2025 17:36:39 +0000 (19:36 +0200)
'comint-filename-completion' may complete the filename at
wrong locations.  Users who want proper filename completion
should use specialized completion backends (e.g. Jedi).
* lisp/progmodes/python.el (inferior-python-mode): Remove
'comint-filename-completion' in 'comint-dynamic-complete-functions'.

(cherry picked from commit 46776cae052b9bb106ce322d700abbc7cccc4c77)

lisp/progmodes/python.el

index 813bec2ad8a1bb71fc9f84aa8f50d79d535d8f21..18eddee32f70ca01f14c4095dd7fe77c705422e0 100644 (file)
@@ -3748,6 +3748,8 @@ variable.
   (setq-local compilation-error-regexp-alist
               python-shell-compilation-regexp-alist)
   (setq-local scroll-conservatively 1)
+  (setq-local comint-dynamic-complete-functions
+              '(comint-c-a-p-replace-by-expanded-history))
   (add-hook 'completion-at-point-functions
             #'python-shell-completion-at-point nil 'local)
   (define-key inferior-python-mode-map "\t"