diff --git a/anki-editor.el b/anki-editor.el index 9a3cfca..87de52a 100644 --- a/anki-editor.el +++ b/anki-editor.el @@ -982,7 +982,10 @@ Return a list of cons of (FIELD-NAME . FIELD-CONTENT)." "A minor mode for making Anki cards with Org." :lighter " anki-editor" :keymap (make-sparse-keymap) - (if anki-editor-mode (anki-editor-setup-minor-mode) + (unless (equal major-mode 'org-mode) + (user-error "anki-editor only works in org-mode buffers")) + (if anki-editor-mode + (anki-editor-setup-minor-mode) (anki-editor-teardown-minor-mode))) (defun anki-editor-setup-minor-mode ()