 
 (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)))
 

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


                    (with-current-buffer (find-file-noselect (expand-file-name (cdr (assq 'name file)) tern-project-dir))
                      (setf tern-buffer-is-dirty nil))))
                (funcall f data))
               ((not (eq mode :silent)) (tern-message "Request failed: %s" (cdr err))))))
     doc)))

(defun tern-send-buffer-to-server ()
