Erik Hetzner
2014-09-19 17:22:56 UTC
Hi all,
gmail has a feature that reminds you if you forget an attachment. With
this bit of elisp, WL can do the same thing.
(defun egh:wl-draft-check-attachment ()
(save-excursion
(mail-text)
(if (re-search-forward "attach" nil t)
(progn
(mail-text)
(unless (re-search-forward mime-edit-beginning-tag-regexp nil t)
(unless (yes-or-no-p "You used the word `attach' in this mail, but did not include an attachment. Are you sure you want to send? ")
(error "No attachment!")))))))
(add-hook 'wl-draft-send-hook 'egh:wl-check-attachment)
best, Erik
gmail has a feature that reminds you if you forget an attachment. With
this bit of elisp, WL can do the same thing.
(defun egh:wl-draft-check-attachment ()
(save-excursion
(mail-text)
(if (re-search-forward "attach" nil t)
(progn
(mail-text)
(unless (re-search-forward mime-edit-beginning-tag-regexp nil t)
(unless (yes-or-no-p "You used the word `attach' in this mail, but did not include an attachment. Are you sure you want to send? ")
(error "No attachment!")))))))
(add-hook 'wl-draft-send-hook 'egh:wl-check-attachment)
best, Erik
--
Sent from my free software system <http://fsf.org/>.
Sent from my free software system <http://fsf.org/>.