Variable: etags-regen-mode-hook
etags-regen-mode-hook is a customizable variable defined in
etags-regen.el.gz.
Value
nil
Documentation
Hook run after entering or leaving etags-regen-mode(var)/etags-regen-mode(fun).
No problems result if this variable is not bound.
add-hook automatically binds it. (This is true for all hook variables.)
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/etags-regen.el.gz
;;;###autoload
(define-minor-mode etags-regen-mode
"Minor mode to automatically generate and update tags tables.
This minor mode generates the tags table automatically based on
the current project configuration, and later updates it as you
edit the files and save the changes.
If you select a tags table manually (for example, using
\\[visit-tags-table]), then this mode will be effectively
disabled for the entire session. Use \\[tags-reset-tags-tables]
to countermand the effect of a previous \\[visit-tags-table]."
:global t
(if etags-regen-mode
(progn
(advice-add 'etags--xref-backend :before
#'etags-regen--maybe-generate)
(advice-add 'tags-completion-at-point-function :before
#'etags-regen--maybe-generate))
(advice-remove 'etags--xref-backend #'etags-regen--maybe-generate)
(advice-remove 'tags-completion-at-point-function #'etags-regen--maybe-generate)
(etags-regen--tags-cleanup)))