From b33fb8502074df29dc46dea91bac3b2278960778 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Wed, 26 Feb 2020 22:44:49 +0200 Subject: [PATCH] mu4e-org: warn if mu4e is not loaded Fixes #1420. --- mu4e/mu4e-org.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mu4e/mu4e-org.el b/mu4e/mu4e-org.el index ab287221..cb0a80a6 100644 --- a/mu4e/mu4e-org.el +++ b/mu4e/mu4e-org.el @@ -90,6 +90,8 @@ Example usage: (defun mu4e~org-store-link-message () "Store a link to a mu4e message." + (unless (fboundp 'mu4e-message-at-point) + (error "Please load mu4e before mu4e-org")) (let* ((msg (mu4e-message-at-point)) (msgid (or (plist-get msg :message-id) "")) (date (plist-get msg :date)) @@ -114,6 +116,8 @@ It links to the last known query when in `mu4e-headers-mode' with `mu4e-org-link-query-in-headers-mode' set; otherwise it links to a specific message, based on its message-id, so that links stay valid even after moving the message around." + (unless (fboundp 'mu4e-message-at-point) + (error "Please load mu4e before mu4e-org")) (if (and (eq major-mode 'mu4e-headers-mode) mu4e-org-link-query-in-headers-mode) (mu4e~org-store-link-query)