diff options
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 18 |
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 | |||
| 6911 | at point. If there is only one such suggestion, act without | 6911 | at point. If there is only one such suggestion, act without |
| 6912 | asking. | 6912 | asking. |
| 6913 | 6913 | ||
| 6914 | If the buffer does not belong to a project, the import statement is | ||
| 6915 | searched under the buffer's default directory. For example, if the file | ||
| 6916 | is located directly under the home directory, all files under the home | ||
| 6917 | directory will be searched. Please note that this can take a long time | ||
| 6918 | and may appear to hang. | ||
| 6919 | |||
| 6914 | When calling from Lisp, use a non-nil NAME to restrict the | 6920 | When calling from Lisp, use a non-nil NAME to restrict the |
| 6915 | suggestions to imports defining NAME." | 6921 | suggestions 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 | |||
| 6966 | If there are missing imports, ask for an import statement using all | ||
| 6967 | imports found in the current project as suggestions. If there is only | ||
| 6968 | one such suggestion, act without asking. | ||
| 6969 | |||
| 6970 | If the buffer does not belong to a project, the import statement is | ||
| 6971 | searched under the buffer's default directory. For example, if the file | ||
| 6972 | is located directly under the home directory, all files under the home | ||
| 6973 | directory will be searched. Please note that this can take a long time | ||
| 6974 | and 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) |