]> git.cworth.org Git - sup/blobdiff - lib/sup.rb
add buffer search with '/' and 'n', and change index search to '\'
[sup] / lib / sup.rb
index 2eb2998cb75d4ca121ca68de5f00a9b174beffa7..f84fa17a190d29a76fb8f749b8eaf41f2ff72169 100644 (file)
@@ -3,6 +3,7 @@ require 'yaml'
 require 'zlib'
 require 'thread'
 require 'fileutils'
+require 'curses'
 
 class Object
   ## this is for debugging purposes because i keep calling #id on the
@@ -31,7 +32,7 @@ class Module
 end
 
 module Redwood
-  VERSION = "svn"
+  VERSION = "0.2"
 
   BASE_DIR   = ENV["SUP_BASE"] || File.join(ENV["HOME"], ".sup")
   CONFIG_FN  = File.join(BASE_DIR, "config.yaml")
@@ -43,6 +44,7 @@ module Redwood
   SENT_FN    = File.join(BASE_DIR, "sent.mbox")
   LOCK_FN    = File.join(BASE_DIR, "lock")
   SUICIDE_FN = File.join(BASE_DIR, "please-kill-yourself")
+  HOOK_DIR   = File.join(BASE_DIR, "hooks")
 
   YAML_DOMAIN = "masanjin.net"
   YAML_DATE = "2006-10-01"
@@ -111,6 +113,7 @@ module Redwood
     Redwood::UpdateManager.new
     Redwood::PollManager.new
     Redwood::SuicideManager.new Redwood::SUICIDE_FN
+    Redwood::CryptoManager.new
   end
 
   def finish
@@ -193,6 +196,10 @@ else
     :editor => ENV["EDITOR"] || "/usr/bin/vim -f -c 'setlocal spell spelllang=en_us' -c 'set filetype=mail'",
     :thread_by_subject => false,
     :edit_signature => false,
+    :ask_for_cc => true,
+    :ask_for_bcc => false,
+    :confirm_no_attachments => true,
+    :confirm_top_posting => true,
   }
   begin
     FileUtils.mkdir_p Redwood::BASE_DIR
@@ -203,8 +210,16 @@ else
 end
 
 require "sup/util"
+require "sup/hook"
+
+## we have to initialize this guy first, because other classes must
+## reference it in order to register hooks, and they do that at parse
+## time.
+Redwood::HookManager.new Redwood::HOOK_DIR
+
 require "sup/update"
 require "sup/suicide"
+require "sup/message-chunks"
 require "sup/message"
 require "sup/source"
 require "sup/mbox"
@@ -224,6 +239,7 @@ require "sup/contact"
 require "sup/tagger"
 require "sup/draft"
 require "sup/poll"
+require "sup/crypto"
 require "sup/modes/scroll-mode"
 require "sup/modes/text-mode"
 require "sup/modes/line-cursor-mode"