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 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)