 (require 'ctags-update)
 
 ;; Auto update
-(setq ctags-update-delay-seconds (* 60 60)) ;; every 1 hour
+(setq ctags-update-delay-seconds (* 30 60)) ;; every 1/2 hour
 (autoload 'turn-on-ctags-auto-update-mode "ctags-update" "turn on `ctags-auto-update-mode'." t)
 (add-hook 'verilog-mode-hook    'turn-on-ctags-auto-update-mode)
 (add-hook 'emacs-lisp-mode-hook 'turn-on-ctags-auto-update-mode)

;; Don't warn when TAGS files are large
(setq large-file-warning-threshold nil)


(defun build-ctags ()
  (interactive)
  (message "building .emacs.d tags")
  (shell-command (concat "ctags -Re -f " user-emacs-directory "/TAGS " user-emacs-directory "/"))
  (when (boundp 'setup-sos-loaded)
    (message "building project tags")
    (shell-command (concat "ctags -Re -f " project-root "TAGS " project-root)))
  (update-ctags)
  (message "tags built successfully"))

;; Source: https://www.gnu.org/software/emacs/manual/html_node/emacs/Select-Tags-Table.html#Select-Tags-Table
;; You cannot set both tags-file-name (that's what visit-tags-table does) and
;; tags-table-list
(defun update-ctags ()
  (interactive)
  (setq tags-file-name 'nil)
  ;; List all directories from which you want to read the TAGS files
  (if (boundp 'setup-sos-loaded)
      (setq tags-table-list
            `("~/.emacs.d"
              ,project-root))
    (setq tags-table-list
          `("~/.emacs.d")))
  (message "Updated tags-table-list."))


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; Time-stamp: <2014-03-09 04:57:01 kmodi>

;; ctags, etags

