In Emacs, when I use M-x
followed by typing the beginning of a function name and then press TAB
, I get the *Completions*
buffer showing a list of possible function candidates for completion.
I would like to enhance this process by displaying the function's documentation string (docstring) when I hover over a function name in the *Completions*
buffer using the mouse.
E.g,, if I have this three functions:
(defun my-func-add (a b)"Add two numbers A and B and return the result." (interactive) (+ a b))(defun my-func-subtract (a b)"Subtract B from A and return the result." (interactive) (- a b))(defun my-func-multiply (a b)"Multiply two numbers A and B and return the result." (interactive) (* a b))
I'd like the my-func-add
's docstring to be displayed when I hover over it's function name in the Completions*
buffer using the mouse.
I would prefer the docstring to be displayed in the same way as when I hover over an item in the mode-line
. E.g.:
Is there an existing way to achieve this functionality, or could it be implemented using existing packages or configurations?