Mercurial > emacs
comparison lisp/mail/reporter.el @ 11422:fd0a461e9c72
(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.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 13 Apr 1995 17:05:39 +0000 |
parents | db8f78f3f9a9 |
children | 7709c74b3188 |
comparison
equal
deleted
inserted
replaced
11421:c53961dfba50 | 11422:fd0a461e9c72 |
---|---|
79 | 79 |
80 | 80 |
81 ;; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv | 81 ;; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv |
82 ;; user defined variables | 82 ;; user defined variables |
83 | 83 |
84 (defvar reporter-mailer '(vm-mail mail) | 84 (defvar reporter-mailer '(vm-mail reporter-mail) |
85 "*Mail package to use to generate bug report buffer. | 85 "*Mail package to use to generate bug report buffer. |
86 This can either be a function symbol or a list of function symbols. | 86 This can either be a function symbol or a list of function symbols. |
87 If a list, it tries to use each specified mailer in order until an | 87 If a list, it tries to use each specified mailer in order until an |
88 existing one is found. | 88 existing one is found. |
89 | 89 |
299 "\\)$") ;end of line | 299 "\\)$") ;end of line |
300 nil | 300 nil |
301 'move) ;search for and move | 301 'move) ;search for and move |
302 (buffer-substring (match-beginning 0) (match-end 0)))) | 302 (buffer-substring (match-beginning 0) (match-end 0)))) |
303 | 303 |
304 ;; Serves as an interface to `mail', | |
305 ;; but when the user says "no" to discarding an unset message, | |
306 ;; it gives an error. | |
307 (defun reporter-mail (&rest args) | |
308 (interactive "P") | |
309 (or (apply 'mail args) | |
310 (error "Bug report aborted"))) | |
311 | |
304 ;;;###autoload | 312 ;;;###autoload |
305 (defun reporter-submit-bug-report | 313 (defun reporter-submit-bug-report |
306 (address pkgname varlist &optional pre-hooks post-hooks salutation) | 314 (address pkgname varlist &optional pre-hooks post-hooks salutation) |
307 ;; Submit a bug report via mail. | 315 ;; Submit a bug report via mail. |
308 | 316 |
324 (reporter-status-count 0) | 332 (reporter-status-count 0) |
325 (problem (and reporter-prompt-for-summary-p | 333 (problem (and reporter-prompt-for-summary-p |
326 (read-string "(Very) brief summary of problem: "))) | 334 (read-string "(Very) brief summary of problem: "))) |
327 (mailbuf | 335 (mailbuf |
328 (progn | 336 (progn |
329 (or (call-interactively | 337 (call-interactively |
330 (if (nlistp reporter-mailer) | 338 (if (nlistp reporter-mailer) |
331 reporter-mailer | 339 reporter-mailer |
332 (let ((mlist reporter-mailer) | 340 (let ((mlist reporter-mailer) |
333 (mailer nil)) | 341 (mailer nil)) |
334 (while mlist | 342 (while mlist |
335 (if (commandp (car mlist)) | 343 (if (commandp (car mlist)) |
336 (setq mailer (car mlist) | 344 (setq mailer (car mlist) |
337 mlist nil) | 345 mlist nil) |
338 (setq mlist (cdr mlist)))) | 346 (setq mlist (cdr mlist)))) |
339 (if (not mailer) | 347 (if (not mailer) |
340 (error | 348 (error |
341 "Variable `%s' does not contain a command for mailing" | 349 "Variable `%s' does not contain a command for mailing" |
342 "reporter-mailer")) | 350 "reporter-mailer")) |
343 mailer))) | 351 mailer))) |
344 (error "Bug report aborted")) | |
345 (current-buffer)))) | 352 (current-buffer)))) |
346 (require 'sendmail) | 353 (require 'sendmail) |
347 (pop-to-buffer reporter-eval-buffer) | 354 (pop-to-buffer reporter-eval-buffer) |
348 (pop-to-buffer mailbuf) | 355 (pop-to-buffer mailbuf) |
349 (goto-char (point-min)) | 356 (goto-char (point-min)) |