From 7feef4988c0b59bd79a923e467d5e5f473d86cbb Mon Sep 17 00:00:00 2001 From: louie Date: Fri, 6 Jul 2018 21:42:24 +0800 Subject: [PATCH] Modify hook locally. --- anki-editor.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/anki-editor.el b/anki-editor.el index 66a7b35..d3a74cf 100644 --- a/anki-editor.el +++ b/anki-editor.el @@ -520,13 +520,13 @@ Do nothing when JUST-ALIGN is non-nil." (defun anki-editor-setup-minor-mode () "Set up this minor mode." - (add-hook 'org-property-allowed-value-functions #'anki-editor--get-allowed-values-for-property) + (add-hook 'org-property-allowed-value-functions #'anki-editor--get-allowed-values-for-property nil t) (advice-add 'org-set-tags :before #'anki-editor--before-set-tags) (advice-add 'org-html-link :around #'anki-editor--ox-html-link)) (defun anki-editor-teardown-minor-mode () "Tear down this minor mode." - (remove-hook 'org-property-allowed-value-functions #'anki-editor--get-allowed-values-for-property) + (remove-hook 'org-property-allowed-value-functions #'anki-editor--get-allowed-values-for-property t) (advice-remove 'org-set-tags #'anki-editor--before-set-tags) (when (advice-member-p 'anki-editor--get-buffer-tags #'org-get-buffer-tags) (advice-remove 'org-get-buffer-tags #'anki-editor--get-buffer-tags))