sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 21e34247462f5a0ca69dc2de46eceb21e5f1fb58
parent 149dd204b27c4f23a9103f50cd62bd85c740dfe8
Author: William Morgan <wmorgan-sup@masanjin.net>
Date:   Fri,  6 Jun 2008 12:16:11 -0700

allow signature hook to return :none for no signature

Diffstat:
M lib/sup/modes/edit-message-mode.rb | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git 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", <<EOS
@@ -417,6 +417,8 @@ private
 
     ## first run the hook
     hook_sig = HookManager.run "signature", :header => @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