Quantcast
Channel: Active questions tagged help - Emacs Stack Exchange
Viewing all articles
Browse latest Browse all 40

How to display function docstrings on mouse hover in *Completions* buffer

$
0
0

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.

enter image description here

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.:

enter image description here

Is there an existing way to achieve this functionality, or could it be implemented using existing packages or configurations?


Viewing all articles
Browse latest Browse all 40

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>