I would love to simply say

    (add-hook 'message-setup-hook 'mml-secure-message-sign)

and have all mail signed by default. Unfortunately, this hook is called
before gnus inserts reply text (so the <#secure thing is put below
quoted text) and for certain emails even makes my Emacs hang (with 100 %
CPU usage).

So instead, I use this mess to sign all email by default (both for
global shortcut C-x m and for R/F/r/f/a from gnus):


    (defadvice gnus-summary-handle-replysign (before always-sign activate)
      ;; the function itself may override this to encrypt as well.
      (mml-secure-message-sign))
    
    (defun mml-sign-unless-called-by-gnus ()
      (unless (boundp 'article)
        ;; If we're called by gnus, article is bound (yes, this is hacky)
        (mml-secure-message-sign)))
    (add-hook 'message-setup-hook 'mml-sign-unless-called-by-gnus)


Is there a less hacky way?


-- 
Kevin Brubeck Unhammer

Never attribute to malice that which is adequately explained by
incompetence or laziness.

Attachment: pgpXkrGxkfWJ6.pgp
Description: PGP signature

_______________________________________________
info-gnus-english mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/info-gnus-english

Reply via email to