How to display a pop-up document document, as in autocomplete?

When programming in emacs, such as Lisp, the autocomplete mode will pop up as well as with a document hint in a few seconds.

My question is how to display the tooltip of the document directly, it is convenient to check the document, but in a different buffer.

thanks.

+4
source share
1 answer

Bind the following function to a shortcut. Keep in mind that for work you will need both autocomplete and a pop-up window (complete with autocomplete in old versions and separate in new ones).

(defun popup-documentation-at-point () (interactive) (let* ((position (point)) (string-under-cursor (buffer-substring-no-properties (progn (skip-syntax-backward "w_") (point)) (progn (skip-syntax-forward "w_") (point))))) (goto-char position) (popup-tip (ac-symbol-documentation (intern string-under-cursor))))) 
0
source

All Articles