 (defvar ectags--xref-count 0)
 
 (defun ectags--xref-make (tag)
+  "Return a xref object from the TAG."
   (setq ectags--xref-count (1+ ectags--xref-count))
   (xref-make (concat
               "<" (number-to-string ectags--xref-count) "> "

found, see the `etags-no-select-for-one-match' variable to decide what
to do."
  (interactive)
  (let ((tag-to-find
         (or (find-tag-default)
             (completing-read "Tag to find: " ectags--obarray))))
    (ectags-find tag-to-find)))

;;;###autoload
(defun ectags-search-tag ()
  "Do a find tag with `completing-read'.  Usefull with `ivy' or \
another completion system for narrowing down by substring."
  (interactive)
  (ectags-find (completing-read "Tag to find: " ectags--obarray)))

(defun counsel-ectags-function (input)
  (if (not ectags--file-name)
      (ectags-visit-tags-table "tags"))

  (if (< (length input) 3)
      (counsel-more-chars 3)

      (goto-char s-pos))))

(defun ectags-quit-buffer ()
  "Quit ectags buffer deleting it's window."
  (kill-buffer)
  (delete-window))

(defun ectags-by-tag-number (first-digit)
  "Go to the tag by the number in the tag select buffer.
FIRST-DIGIT is the first digit of the number.  If there are less than
ten matches will jump directly.  Otherwise it will ask for a complete
number."
  (let ((tag-num (progn
                   (if (> (length ectags--matches) 9)
                       (read-from-minibuffer "Tag number: " first-digit)
