diff options
| author | James Cherti | 2025-03-19 11:56:11 -0400 |
|---|---|---|
| committer | Eli Zaretskii | 2025-03-22 13:55:09 +0200 |
| commit | 1aebb026112016fb38ff458bd50c80be0f139538 (patch) | |
| tree | ff5409e135f6e9b1bbafdf714b33ba1ae242a91c | |
| parent | 20687ab61715889cb0670c9351983154e6620c1b (diff) | |
| download | emacs-1aebb026112016fb38ff458bd50c80be0f139538.tar.gz emacs-1aebb026112016fb38ff458bd50c80be0f139538.zip | |
ElDoc: Add more commands using 'eldoc-add-command-completions'
Add more commands to 'eldoc-add-command-completions' to fix
disappearing ElDoc help in the minibuffer for the following
cases:
- All modes: Added "comment-indent-new-line".
- All modes: Added "delete-char" for handling when the user presses delete.
- Python mode: Added "python-indent-dedent-line-backspace" for handling
when the user presses backspace.
* lisp/emacs-lisp/eldoc.el (eldoc-remove-command-completions):
* lisp/progmodes/python.el (python-base-mode): Add more commands
to 'eldoc-add-command-completions'.
Copyright-paperwork-exempt: yes
| -rw-r--r-- | lisp/emacs-lisp/eldoc.el | 2 | ||||
| -rw-r--r-- | lisp/progmodes/python.el | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index 966158024dd..85fb6c780e2 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el | |||
| @@ -994,7 +994,7 @@ the docstrings eventually produced, using | |||
| 994 | 994 | ||
| 995 | ;; Prime the command list. | 995 | ;; Prime the command list. |
| 996 | (eldoc-add-command-completions | 996 | (eldoc-add-command-completions |
| 997 | "back-to-indentation" | 997 | "comment-indent-new-line" "delete-char" "back-to-indentation" |
| 998 | "backward-" "beginning-of-" "delete-other-windows" "delete-window" | 998 | "backward-" "beginning-of-" "delete-other-windows" "delete-window" |
| 999 | "down-list" "end-of-" "exchange-point-and-mark" "forward-" "goto-" | 999 | "down-list" "end-of-" "exchange-point-and-mark" "forward-" "goto-" |
| 1000 | "handle-select-window" "indent-for-tab-command" "left-" "mark-page" | 1000 | "handle-select-window" "indent-for-tab-command" "left-" "mark-page" |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 741b94e187b..b6db6097d9f 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -7147,6 +7147,7 @@ implementations: `python-mode' and `python-ts-mode'." | |||
| 7147 | (add-hook 'eldoc-documentation-functions #'python-eldoc-function nil t) | 7147 | (add-hook 'eldoc-documentation-functions #'python-eldoc-function nil t) |
| 7148 | (add-function :before-until (local 'eldoc-documentation-function) | 7148 | (add-function :before-until (local 'eldoc-documentation-function) |
| 7149 | #'python-eldoc-function)))) | 7149 | #'python-eldoc-function)))) |
| 7150 | (eldoc-add-command-completions "python-indent-dedent-line-backspace") | ||
| 7150 | 7151 | ||
| 7151 | ;; TODO: Use tree-sitter to figure out the block in `python-ts-mode'. | 7152 | ;; TODO: Use tree-sitter to figure out the block in `python-ts-mode'. |
| 7152 | (dolist (mode '(python-mode python-ts-mode)) | 7153 | (dolist (mode '(python-mode python-ts-mode)) |