# HG changeset patch # User Richard M. Stallman # Date 797792739 0 # Node ID fd0a461e9c72768011936f2dd17a3f9f3b811508 # Parent c53961dfba506c1f0bb843f76e81b6a6ce042e68 (reporter-mailer): Replace mail with reporter-mail. (reporter-mail): New function. (reporter-submit-bug-report): Don't check return value of the reporter-mailer function. diff -r c53961dfba50 -r fd0a461e9c72 lisp/mail/reporter.el --- a/lisp/mail/reporter.el Thu Apr 13 17:04:57 1995 +0000 +++ b/lisp/mail/reporter.el Thu Apr 13 17:05:39 1995 +0000 @@ -81,7 +81,7 @@ ;; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ;; user defined variables -(defvar reporter-mailer '(vm-mail mail) +(defvar reporter-mailer '(vm-mail reporter-mail) "*Mail package to use to generate bug report buffer. This can either be a function symbol or a list of function symbols. If a list, it tries to use each specified mailer in order until an @@ -301,6 +301,14 @@ 'move) ;search for and move (buffer-substring (match-beginning 0) (match-end 0)))) +;; Serves as an interface to `mail', +;; but when the user says "no" to discarding an unset message, +;; it gives an error. +(defun reporter-mail (&rest args) + (interactive "P") + (or (apply 'mail args) + (error "Bug report aborted"))) + ;;;###autoload (defun reporter-submit-bug-report (address pkgname varlist &optional pre-hooks post-hooks salutation) @@ -326,22 +334,21 @@ (read-string "(Very) brief summary of problem: "))) (mailbuf (progn - (or (call-interactively - (if (nlistp reporter-mailer) - reporter-mailer - (let ((mlist reporter-mailer) - (mailer nil)) - (while mlist - (if (commandp (car mlist)) - (setq mailer (car mlist) - mlist nil) - (setq mlist (cdr mlist)))) - (if (not mailer) - (error - "Variable `%s' does not contain a command for mailing" - "reporter-mailer")) - mailer))) - (error "Bug report aborted")) + (call-interactively + (if (nlistp reporter-mailer) + reporter-mailer + (let ((mlist reporter-mailer) + (mailer nil)) + (while mlist + (if (commandp (car mlist)) + (setq mailer (car mlist) + mlist nil) + (setq mlist (cdr mlist)))) + (if (not mailer) + (error + "Variable `%s' does not contain a command for mailing" + "reporter-mailer")) + mailer))) (current-buffer)))) (require 'sendmail) (pop-to-buffer reporter-eval-buffer)