From mboxrd@z Thu Jan 1 00:00:00 1970 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Mon, 14 Jan 2008 12:24:27 +0000 Subject: [sup-talk] [PATCH] Added quoteline hook. This allows you to specify how the text above the quoted email should look (Normally 'Excerpts froms...') Message-ID: <1200313448-sup-3169@tomsk> --- lib/sup/modes/reply-mode.rb | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/lib/sup/modes/reply-mode.rb b/lib/sup/modes/reply-mode.rb index 04018e3..59ffa66 100644 --- a/lib/sup/modes/reply-mode.rb +++ b/lib/sup/modes/reply-mode.rb @@ -9,6 +9,14 @@ class ReplyMode < EditMessageMode :list => "Mailing list", :user => "Customized" } + + HookManager.register "quoteline", < #{l}" } + quoteline = HookManager.run("quoteline", :message => m) || default_quoteline(m) + lines = [quoteline] + m.quotable_body_lines.map { |l| "> #{l}" } lines.pop while lines.last =~ /^\s*$/ lines end + def default_quoteline m + "Excerpts from #{@m.from.name}'s message of #{@m.date}:" + end + def handle_new_text new_header, new_body old_header = @headers[@type_selector.val] if new_header.size != old_header.size || old_header.any? { |k, v| new_header[k] != v } -- 1.5.3.7