From: Tollef Fog Heen Date: Mon, 18 Aug 2008 14:25:54 +0000 (+0200) Subject: Initial Wanderlust support X-Git-Tag: 0.2~1 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=923d17a207d9e6d71a3c46cf668c2e42673d43c3;p=eweouz Initial Wanderlust support Apply patch from David Bremner to add Wanderlust support and document the changes. --- diff --git a/README b/README index 74f5d03..5fc2968 100644 --- a/README +++ b/README @@ -12,6 +12,12 @@ To use this, put something like: in your .emacs file. +If you use Wanderlust, use + + (add-hook 'gnus-startup-hook 'eweouz-insinuate-wl) + +instead. + - C-tab gets mapped to completing email addresses in sendmail-mode and message mode diff --git a/lisp/eweouz.el b/lisp/eweouz.el index ed9242f..8ae3f87 100644 --- a/lisp/eweouz.el +++ b/lisp/eweouz.el @@ -158,20 +158,32 @@ (call-process eweouz-write-path nil nil nil "--id" "new" "--full-name" name "--emails" email))) -;;;###autoload (defun eweouz-insinuate-gnus () "Call this function to hook EWEOUZ into Gnus." (define-key gnus-summary-mode-map ":" 'eweouz-add-sender)) -;;;###autoload (defun eweouz-insinuate-sendmail () "Call this function to hook EWEOUZ into sendmail (M-x mail)." (define-key mail-mode-map [C-tab] 'eweouz-complete)) -;;;###autoload (defun eweouz-insinuate-message () "Call this function to hook EWEOUZ into message-mode." (define-key message-mode-map [C-tab] 'eweouz-complete)) +(defun eweouz-insinuate-wl () + (define-key wl-draft-mode-map [C-tab] 'eweouz-complete) + (define-key wl-summary-mode-map ":" 'eweouz-add-sender-wl)) + +(defun eweouz-add-sender-wl () + "Add sender of current message" + (interactive) + (save-excursion + (set-buffer wl-message-buffer) + (let* ((from (std11-extract-address-components (std11-field-body "From"))) + (record (list (cons 'email (cadr from)) + (cons 'name (car from))))) + (eweouz-do-add record)))) + (require 'vcard) (provide 'eweouz) +