]> code.delx.au - gnu-emacs-elpa/commitdiff
company-doc-buffer: Use the arg; rename the buffer
authorDmitry Gutov <dgutov@yandex.ru>
Sun, 26 May 2013 02:59:04 +0000 (06:59 +0400)
committerDmitry Gutov <dgutov@yandex.ru>
Sun, 26 May 2013 02:59:04 +0000 (06:59 +0400)
company-ropemacs.el
company-semantic.el
company.el

index 73bb33d3383dbe729abcd73c3abf1e5fcf2fab0d..0ba26e68b2a8f8ee6b0ca3801c3c7fc564bc59db 100644 (file)
@@ -43,9 +43,7 @@
   "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."
index 92cd178e3985861244e6d99147f67579e6263513..796cc9ec08aab217182ccf12502a7972d343791e 100644 (file)
 (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
index ec6834b95bd58fde2895b5a43cdef7ca9facae6c..9a916c70759bd8f35d1f7716fbd83405a292852d 100644 (file)
@@ -1458,9 +1458,12 @@ To show the number next to the candidates in some back-ends, enable
             (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