 
 (defun tern-get-type ()
   (interactive)
-  (tern-run-query (lambda (data) (message (or (cdr (assq 'type data)) "Not found")))
+  (tern-run-query (lambda (data) (tern-message (or (cdr (assq 'type data)) "Not found")))
                   "type"
                   (point)))
 

(require 'json)
(require 'url)
(require 'url-http)

(defun tern-req (port doc c)
  (declare (special url-mime-charset-string url-request-method url-request-data url-show-status))

                      (let ((url (cdr (assq 'url data))) (doc (cdr (assq 'doc data))))
                        (cond (doc
                               (setf tern-last-docs-url url)
                               (tern-message doc))
                              (url
                               (browse-url url))
                              (t (tern-message "Not found")))))
                    "documentation"
                    (point))))

