branch: externals/autocrypt
commit 94bfdd049ff0aa3999205e04678f0ebca8cf92a1
Author: Philip K <[email protected]>
Commit: Philip K <[email protected]>

    Fix autocrypt-gnus
---
 autocrypt-gnus.el | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/autocrypt-gnus.el b/autocrypt-gnus.el
index 44e157c6f1..149a113828 100644
--- a/autocrypt-gnus.el
+++ b/autocrypt-gnus.el
@@ -25,11 +25,15 @@
 (require 'gnus)
 
 ;;;###autoload
-(cl-defmethod autocrypt-mode-hooks ((_mode (derived-mode message-mode)))
+(cl-defmethod autocrypt-load-system ((_mode (derived-mode gnus-mode)))
+  "Load this module."
+  (require 'autocrypt-gnus))
+
+(cl-defmethod autocrypt-mode-hooks ((_mode (derived-mode gnus-mode)))
   "Return the hook to install autocrypt."
-  '(gnus-view-mode-hook))
+  '(gnus-article-prepare-hook))
 
-(cl-defmethod autocrypt-get-header ((_mode (derived-mode message-mode))
+(cl-defmethod autocrypt-get-header ((_mode (derived-mode gnus-mode))
                                     header)
   "Return the value for HEADER."
   (gnus-fetch-original-field header))

Reply via email to