"Return buffer with docstring of CANDIDATE if it is available."
(let ((doc (company-with-candidate-inserted candidate (rope-get-doc))))
(when doc
- (with-current-buffer (company-doc-buffer)
- (insert doc)
- (current-buffer)))))
+ (company-doc-buffer doc))))
(defun company-ropemacs-location (candidate)
"Return location of CANDIDATE in cons form (FILE . LINE) if it is available."
(defun company-semantic-doc-buffer (tag)
(let ((doc (semantic-documentation-for-tag tag)))
(when doc
- (with-current-buffer (company-doc-buffer)
- (insert (funcall semantic-idle-summary-function tag nil t)
- "\n"
- doc)
- (current-buffer)))))
+ (company-doc-buffer
+ (concat (funcall semantic-idle-summary-function tag nil t)
+ "\n"
+ doc)))))
(defsubst company-semantic-completions (prefix)
(ignore-errors
(cons selected (company-call-backend 'meta selected))))
(cdr company-last-metadata)))
-(defun company-doc-buffer (&optional _string)
- (with-current-buffer (get-buffer-create "*Company meta-data*")
+(defun company-doc-buffer (&optional string)
+ (with-current-buffer (get-buffer-create "*company-documentation*")
(erase-buffer)
+ (when string
+ (save-excursion
+ (insert string)))
(current-buffer)))
(defvar company--electric-commands