From: William Morgan Date: Fri, 6 Jun 2008 19:16:11 +0000 (-0700) Subject: allow signature hook to return :none for no signature X-Git-Url: https://git.notmuchmail.org/git?a=commitdiff_plain;h=21e34247462f5a0ca69dc2de46eceb21e5f1fb58;p=sup allow signature hook to return :none for no signature --- diff --git a/lib/sup/modes/edit-message-mode.rb b/lib/sup/modes/edit-message-mode.rb index b63a00b..cc6e7af 100644 --- a/lib/sup/modes/edit-message-mode.rb +++ b/lib/sup/modes/edit-message-mode.rb @@ -23,7 +23,7 @@ Variables: from_email: the email part of the From: line, or nil if empty Return value: A string (multi-line ok) containing the text of the signature, or nil to - use the default signature. + use the default signature, or :none for no signature. EOS HookManager.register "before-edit", < @header, :from_email => from_email + + return [] if hook_sig == :none return ["", "-- "] + hook_sig.split("\n") if hook_sig ## no hook, do default signature generation based on config.yaml