               (const :tag "After a `ycmd-mode' was enabled." mode-enabled))
   :safe #'listp)
 
+(defcustom ycmd-default-tags-file-name "tags"
+  "The default tags file name."
+  :group 'ycmd
+  :type 'string)
+
 (defcustom ycmd-force-semantic-completion nil
   "Whether to use always semantic completion."
   :group 'ycmd

  (and (listp obj) (-all? #'stringp obj)))

(defun ycmd--locate-default-tags-file (buffer)
  "Look up directory hierarchy for first found tags file for BUFFER."
  (let* ((directory (locate-dominating-file
                     (file-name-directory (buffer-file-name buffer))
                     (lambda (path)
                       (directory-files path t "^\\(TAGS\\|tags\\)"))))
         (tags-file (and directory
                         (or (and (file-exists-p (expand-file-name "TAGS" directory))
                                  (expand-file-name "TAGS" directory))
                             (and (file-exists-p (expand-file-name "tags" directory))
                                  (expand-file-name "tags" directory))))))
    tags-file))

(defun ycmd--get-tag-files (buffer)


`auto'
    Look up directory hierarchy for first found tags file with
    `ycmd-default-tags-file-name'.

string
    A tags file name.
