Emacs: Get the full function docs / comments with C-c C-d


Currently this gives you the first line comment in the mini buffer. Is it possible to open a side window with the full docs for the function. Does anyone know how to go about doing something like this?



It would be possible (Tern does save the full comment, and you can get it with a docFormat: "full" query option), but it’d require you to implement this option in the Emacs mode.


Here is a command for this

(defun tern-describe ()
   (lambda (data)
     ;; url, doc, type, origin
     (let-alist data
       (with-current-buffer (get-buffer-create "*Tern Describe*")
         (let ((inhibit-read-only t))
           (when .doc
             (insert .doc)
             (fill-region (point-min) (point-max)))
           (when .url
             (and .doc (insert "\n\n"))
             (insert .url))
           (goto-char (point-min))
           (display-buffer (current-buffer))))))
   '((type . "documentation") (docFormat . "full"))