aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorEli Zaretskii2025-03-09 07:33:13 -0400
committerEli Zaretskii2025-03-09 07:33:13 -0400
commitbcfa9692f05ccc61c6816da249ea540c3fee297a (patch)
tree84bf51dbdb9fadef52191ea1c58379360a51fc47 /lisp/progmodes/python.el
parent6fb68f4310d808827b83da053fbc112b316b7757 (diff)
parentaf8017b23f6d94266dd05dcd084c8d7656393db8 (diff)
downloademacs-bcfa9692f05ccc61c6816da249ea540c3fee297a.tar.gz
emacs-bcfa9692f05ccc61c6816da249ea540c3fee297a.zip
Merge from origin/emacs-30
af8017b23f6 Explicitly document read-string return value cf03c2b6093 Improve docstrings of python.el import management 01bcc6961a6 ; Improve doc strings of Speedbar bd9c76ab175 Avoid warnings about 'image-scaling-factor' in builds --w...
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el18
1 files changed, 17 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index d55ce1f7fb1..fa9dd636f1d 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -6941,6 +6941,12 @@ argument, restrict the suggestions to imports defining the symbol
6941at point. If there is only one such suggestion, act without 6941at point. If there is only one such suggestion, act without
6942asking. 6942asking.
6943 6943
6944If the buffer does not belong to a project, the import statement is
6945searched under the buffer's default directory. For example, if the file
6946is located directly under the home directory, all files under the home
6947directory will be searched. Please note that this can take a long time
6948and may appear to hang.
6949
6944When calling from Lisp, use a non-nil NAME to restrict the 6950When calling from Lisp, use a non-nil NAME to restrict the
6945suggestions to imports defining NAME." 6951suggestions to imports defining NAME."
6946 (interactive (list (when current-prefix-arg (thing-at-point 'symbol)))) 6952 (interactive (list (when current-prefix-arg (thing-at-point 'symbol))))
@@ -6985,7 +6991,17 @@ asking."
6985 6991
6986;;;###autoload 6992;;;###autoload
6987(defun python-fix-imports () 6993(defun python-fix-imports ()
6988 "Add missing imports and remove unused ones from the current buffer." 6994 "Add missing imports and remove unused ones from the current buffer.
6995
6996If there are missing imports, ask for an import statement using all
6997imports found in the current project as suggestions. If there is only
6998one such suggestion, act without asking.
6999
7000If the buffer does not belong to a project, the import statement is
7001searched under the buffer's default directory. For example, if the file
7002is located directly under the home directory, all files under the home
7003directory will be searched. Please note that this can take a long time
7004and may appear to hang."
6989 (interactive) 7005 (interactive)
6990 (let ((buffer (current-buffer)) 7006 (let ((buffer (current-buffer))
6991 undefined unused add remove) 7007 undefined unused add remove)