mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-24 06:20:43 -08:00
Merge from origin/emacs-30
af8017b23fExplicitly document read-string return valuecf03c2b609Improve docstrings of python.el import management01bcc6961a; Improve doc strings of Speedbarbd9c76ab17Avoid warnings about 'image-scaling-factor' in builds --w...
This commit is contained in:
commit
bcfa9692f0
4 changed files with 80 additions and 55 deletions
|
|
@ -6941,6 +6941,12 @@ argument, restrict the suggestions to imports defining the symbol
|
|||
at point. If there is only one such suggestion, act without
|
||||
asking.
|
||||
|
||||
If the buffer does not belong to a project, the import statement is
|
||||
searched under the buffer's default directory. For example, if the file
|
||||
is located directly under the home directory, all files under the home
|
||||
directory will be searched. Please note that this can take a long time
|
||||
and may appear to hang.
|
||||
|
||||
When calling from Lisp, use a non-nil NAME to restrict the
|
||||
suggestions to imports defining NAME."
|
||||
(interactive (list (when current-prefix-arg (thing-at-point 'symbol))))
|
||||
|
|
@ -6985,7 +6991,17 @@ asking."
|
|||
|
||||
;;;###autoload
|
||||
(defun python-fix-imports ()
|
||||
"Add missing imports and remove unused ones from the current buffer."
|
||||
"Add missing imports and remove unused ones from the current buffer.
|
||||
|
||||
If there are missing imports, ask for an import statement using all
|
||||
imports found in the current project as suggestions. If there is only
|
||||
one such suggestion, act without asking.
|
||||
|
||||
If the buffer does not belong to a project, the import statement is
|
||||
searched under the buffer's default directory. For example, if the file
|
||||
is located directly under the home directory, all files under the home
|
||||
directory will be searched. Please note that this can take a long time
|
||||
and may appear to hang."
|
||||
(interactive)
|
||||
(let ((buffer (current-buffer))
|
||||
undefined unused add remove)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue