From: Tollef Fog Heen Date: Mon, 1 Sep 2008 11:47:10 +0000 (+0200) Subject: Simplify lisp code a bit X-Git-Tag: 0.2^2~2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7be1278d45c0965a3380dd76e58f864d85d7034c;p=eweouz Simplify lisp code a bit --- diff --git a/lisp/eweouz.el b/lisp/eweouz.el index ed9242f..8f196bc 100644 --- a/lisp/eweouz.el +++ b/lisp/eweouz.el @@ -143,18 +143,15 @@ (defun eweouz-add-sender () "Add sender of current message" (interactive) - (save-excursion (set-buffer gnus-article-buffer) - (let* ((from (mail-header-parse-address (gnus-fetch-field "From"))) - (record (list (cons 'email (car from)) - (cons 'name (cdr from))))) - (eweouz-do-add record)))) + (eweouz-do-add (mail-header-parse-address (gnus-fetch-field "From"))))) (defun eweouz-do-add (record) (interactive) - (let* ((name (cdr (assoc 'name record))) - (email (cdr (assoc 'email record)))) + (let* ((name (car record)) + (email (cdr record))) + (message (format "%s" record)) (call-process eweouz-write-path nil nil nil "--id" "new" "--full-name" name "--emails" email)))