Function: tagref-mode
tagref-mode is an interactive and natively compiled function defined
in tagref.el.
Signature
(tagref-mode &optional ARG)
Documentation
Toggle tagref-mode(var)/tagref-mode(fun) for the current project.
When enabled, provides project-wide:
- Font-lock highlighting for [tag:...] and [ref:...] directives
- Completion for [ref:] and [tag:] directives
- Xref integration for M-. (xref-find-definitions) navigation to tag definitions
- tagref-check command for validation
- tagref-list-tags command for browsing tags
This mode is project-aware: enabling it activates tagref features for all buffers in the current project.
This is a minor mode. If called interactively, toggle the Tagref mode
mode. If the prefix argument is positive, enable the mode, and if it is
zero or negative, disable the mode.
If called from Lisp, toggle the mode if ARG is toggle. Enable the
mode if ARG is nil, omitted, or is a positive number. Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
evaluate the variable tagref-mode(var)/tagref-mode(fun).
The mode's hook is called both when the mode is enabled and when it is disabled.
Key Bindings
This command is not in any keymaps.
Source Code
;; Defined in /nix/store/mnch55hf9yszlb4dvfqhbqf0840v41qh-emacs-packages-deps/share/emacs/site-lisp/tagref.el
;;;###autoload
(define-minor-mode tagref-mode
"Toggle `tagref-mode' for the current project.
When enabled, provides project-wide:
- Font-lock highlighting for [tag:...] and [ref:...] directives
- Completion for [ref:] and [tag:] directives
- Xref integration for \\[xref-find-definitions] navigation to tag definitions
- `tagref-check' command for validation
- `tagref-list-tags' command for browsing tags
This mode is project-aware: enabling it activates tagref features
for all buffers in the current project."
:lighter " Tagref"
:group 'tagref
(if tagref-mode
(if (tagref--project-root)
(tagref--enable-in-project)
(setq tagref-mode nil)
(user-error "Not in a project; tagref-mode requires project.el"))
(tagref--disable-in-project)))