Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Repetitive code block in vm-do-reply?

0 views
Skip to first unread message

blueman

unread,
Dec 21, 2007, 10:30:55 AM12/21/07
to
I was just looking at the code for vm-do-reply and though my elisp is
a bit rusty, it seems like the following two code blocks repeat the
same functionality:

(cond ((add-to-list 'to
(let ((reply-to
(vm-get-header-contents (car mp) "Reply-To:"
", ")))
(if (vm-ignored-reply-to reply-to)
nil
reply-to ))))
((add-to-list 'to (vm-get-header-contents (car mp) "From:"
", ")))
;; bad, but better than nothing for some
((add-to-list 'to (vm-grok-From_-author (car mp))))
(t (error "No From: or Reply-To: header in message")))


(cond ((setq tmp (vm-get-header-contents (car mp) "Reply-To:" ", "))
(if (not (vm-ignored-reply-to tmp))
(add-to-list 'to tmp)))
((setq tmp (vm-get-header-contents (car mp) "From:" ", "))
(add-to-list 'to tmp))
;; bad, but better than nothing for some
((setq tmp (vm-grok-From_-author (car mp)))
(add-to-list 'to tmp))
(t (error "No From: or Reply-To: header in message")))


More generally, the code is a bit messy with its use of non-intuitive
named temp variables and overall structure and formatting. But I'm sure
that no one (including myself) has either the time and/or expertise to
fix it :)

0 new messages