aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
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 7f329f91e4f..f966190ea6d 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -6911,6 +6911,12 @@ argument, restrict the suggestions to imports defining the symbol
6911at point. If there is only one such suggestion, act without 6911at point. If there is only one such suggestion, act without
6912asking. 6912asking.
6913 6913
6914If the buffer does not belong to a project, the import statement is
6915searched under the buffer's default directory. For example, if the file
6916is located directly under the home directory, all files under the home
6917directory will be searched. Please note that this can take a long time
6918and may appear to hang.
6919
6914When calling from Lisp, use a non-nil NAME to restrict the 6920When calling from Lisp, use a non-nil NAME to restrict the
6915suggestions to imports defining NAME." 6921suggestions to imports defining NAME."
6916 (interactive (list (when current-prefix-arg (thing-at-point 'symbol)))) 6922 (interactive (list (when current-prefix-arg (thing-at-point 'symbol))))
@@ -6955,7 +6961,17 @@ asking."
6955 6961
6956;;;###autoload 6962;;;###autoload
6957(defun python-fix-imports () 6963(defun python-fix-imports ()
6958 "Add missing imports and remove unused ones from the current buffer." 6964 "Add missing imports and remove unused ones from the current buffer.
6965
6966If there are missing imports, ask for an import statement using all
6967imports found in the current project as suggestions. If there is only
6968one such suggestion, act without asking.
6969
6970If the buffer does not belong to a project, the import statement is
6971searched under the buffer's default directory. For example, if the file
6972is located directly under the home directory, all files under the home
6973directory will be searched. Please note that this can take a long time
6974and may appear to hang."
6959 (interactive) 6975 (interactive)
6960 (let ((buffer (current-buffer)) 6976 (let ((buffer (current-buffer))
6961 undefined unused add remove) 6977 undefined unused add remove)