Function: tagref--disable-in-project

tagref--disable-in-project is a natively compiled function defined in tagref.el.

Signature

(tagref--disable-in-project)

Documentation

Disable tagref-mode(var)/tagref-mode(fun) for all buffers in the current project.

Source Code

;; Defined in /nix/store/mnch55hf9yszlb4dvfqhbqf0840v41qh-emacs-packages-deps/share/emacs/site-lisp/tagref.el
(defun tagref--disable-in-project ()
  "Disable `tagref-mode' for all buffers in the current project."
  (when-let ((root (tagref--project-root)))
    (remhash root tagref--enabled-projects)
    ;; Disable in all existing project buffers
    (dolist (buf (buffer-list))
      (with-current-buffer buf
        (when (and (tagref--project-root)
                   (string= (tagref--project-root) root))
          (tagref--disable-in-buffer))))
    ;; Remove hook if no projects are enabled
    (when (zerop (hash-table-count tagref--enabled-projects))
      (remove-hook 'find-file-hook #'tagref--enable-in-buffer))))