(fix): autoloaded commands load org-roam-mode (#712)

Users should not have to explicitly enable the minor mode before using
autoloaded commands.
This commit is contained in:
N V
2020-05-28 00:25:19 -04:00
committed by GitHub
parent 2e220f511e
commit 5ee38f2d89
6 changed files with 21 additions and 0 deletions

View File

@ -53,8 +53,10 @@
(declare-function org-roam--org-roam-file-p "org-roam")
(declare-function org-roam--parse-tags "org-roam")
(declare-function org-roam--parse-alias "org-roam")
(declare-function org-roam-mode "org-roam")
(defvar org-roam-verbose)
(defvar org-roam-mode)
(cl-defstruct (org-roam-doctor-checker (:copier nil))
(name 'missing-checker-name)
@ -280,6 +282,7 @@ CHECKER is a org-roam-doctor checker instance."
"Perform a check on the current buffer to ensure cleanliness.
If CHECKALL, run the check for all Org-roam files."
(interactive "P")
(unless org-roam-mode (org-roam-mode))
(let ((files (if checkall
(org-roam--list-all-files)
(unless (org-roam--org-roam-file-p)