sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit d639106dad97f0b3322e94e5ba3fee5b40f68fed
parent e46eb6be10617eb75cbc426de82f9f7e49d921bc
Author: Grant Hollingworth <grant@antiflux.org>
Date:   Thu, 17 Jan 2008 12:49:21 -0500

renamed "quoteline" hook to "attribution"

Diffstat:
M lib/sup/modes/reply-mode.rb | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/lib/sup/modes/reply-mode.rb b/lib/sup/modes/reply-mode.rb
@@ -10,10 +10,11 @@ class ReplyMode < EditMessageMode
     :user => "Customized"
   }
 
-  HookManager.register "quoteline", <<EOS
-Generates a quote line "On 1/4/2007, Joe Bloggs wrote:".
+  HookManager.register "attribution", <<EOS
+Generates an attribution ("Excerpts from Joe Bloggs's message of Fri Jan 11 09:54:32 -0500 2008:").
 Variables:
-      message: A message object representing the message being replied to
+  message: a message object representing the message being replied to
+    (useful values include message.from.name and message.date)
 Return value:
   A string containing the text of the quote line (can be multi-line)
 EOS
@@ -123,13 +124,13 @@ protected
   end
 
   def reply_body_lines m
-    quoteline = HookManager.run("quoteline", :message => m) || default_quoteline(m)
-    lines = quoteline.split("\n") + m.quotable_body_lines.map { |l| "> #{l}" }
+    attribution = HookManager.run("attribution", :message => m) || default_attribution(m)
+    lines = attribution.split("\n") + m.quotable_body_lines.map { |l| "> #{l}" }
     lines.pop while lines.last =~ /^\s*$/
     lines
   end
 
-  def default_quoteline m
+  def default_attribution m
     "Excerpts from #{@m.from.name}'s message of #{@m.date}:"
   end