branch: externals/autocrypt
commit dd400cbbdfa14e6127f29cf9b562a8948ff3fafd
Author: Philip Kaludercic <[email protected]>
Commit: Philip Kaludercic <[email protected]>

    Prefer mu4e-view-rendered-hook if bound
    
    Thanks to Thierry Volpiatto for notifying me to this change:
    https://lists.sr.ht/~pkal/public-inbox/%3C875ye6bh0r.fsf%40posteo.net%3E
---
 autocrypt-mu4e.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/autocrypt-mu4e.el b/autocrypt-mu4e.el
index cfa4e42f88..38af66fcb9 100644
--- a/autocrypt-mu4e.el
+++ b/autocrypt-mu4e.el
@@ -25,7 +25,10 @@
 ;;;###autocrypt
 (defun autocrypt-mu4e--install ()
   "Install autocrypt hooks for mu4e."
-  (add-hook 'mu4e-view-mode-hook #'autocrypt-process-header nil t)
+  (add-hook (if (boundp 'mu4e-view-rendered-hook)
+                'mu4e-view-rendered-hook
+              'mu4e-view-mode-hook)
+            #'autocrypt-process-header nil t)
   (add-hook 'mu4e-compose-mode-hook #'autocrypt-compose-setup nil t))
 
 (defun autocrypt-mu4e--uninstall ()

Reply via email to