diff options
| author | Eli Zaretskii | 2025-03-09 07:33:13 -0400 |
|---|---|---|
| committer | Eli Zaretskii | 2025-03-09 07:33:13 -0400 |
| commit | bcfa9692f05ccc61c6816da249ea540c3fee297a (patch) | |
| tree | 84bf51dbdb9fadef52191ea1c58379360a51fc47 /lisp/progmodes/python.el | |
| parent | 6fb68f4310d808827b83da053fbc112b316b7757 (diff) | |
| parent | af8017b23f6d94266dd05dcd084c8d7656393db8 (diff) | |
| download | emacs-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.el | 18 |
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 | |||
| 6941 | at point. If there is only one such suggestion, act without | 6941 | at point. If there is only one such suggestion, act without |
| 6942 | asking. | 6942 | asking. |
| 6943 | 6943 | ||
| 6944 | If the buffer does not belong to a project, the import statement is | ||
| 6945 | searched under the buffer's default directory. For example, if the file | ||
| 6946 | is located directly under the home directory, all files under the home | ||
| 6947 | directory will be searched. Please note that this can take a long time | ||
| 6948 | and may appear to hang. | ||
| 6949 | |||
| 6944 | When calling from Lisp, use a non-nil NAME to restrict the | 6950 | When calling from Lisp, use a non-nil NAME to restrict the |
| 6945 | suggestions to imports defining NAME." | 6951 | suggestions 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 | |||
| 6996 | If there are missing imports, ask for an import statement using all | ||
| 6997 | imports found in the current project as suggestions. If there is only | ||
| 6998 | one such suggestion, act without asking. | ||
| 6999 | |||
| 7000 | If the buffer does not belong to a project, the import statement is | ||
| 7001 | searched under the buffer's default directory. For example, if the file | ||
| 7002 | is located directly under the home directory, all files under the home | ||
| 7003 | directory will be searched. Please note that this can take a long time | ||
| 7004 | and 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) |