diff options
| author | Richard M. Stallman | 1993-10-18 05:37:51 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-10-18 05:37:51 +0000 |
| commit | 9ee7c69da24f189fdb2f40f0d66388db18533ab9 (patch) | |
| tree | 2f3f8efc5a0f8bb687072121cf1c4be23af87105 | |
| parent | 219a7d3fd6d41dac73717fd887429c6cd29c308d (diff) | |
| download | emacs-9ee7c69da24f189fdb2f40f0d66388db18533ab9.tar.gz emacs-9ee7c69da24f189fdb2f40f0d66388db18533ab9.zip | |
(reporter-submit-bug-report, reporter-mailer): reporter-mailer
variable can now take a list of mailers, trying each one until an
commandp one is found.
Fixed elisp archive address.
Handle dumping of buffer local variables via reporter-eval-buffer.
| -rw-r--r-- | lisp/mail/reporter.el | 61 |
1 files changed, 42 insertions, 19 deletions
diff --git a/lisp/mail/reporter.el b/lisp/mail/reporter.el index 6f0689b7fda..f2d5b131db8 100644 --- a/lisp/mail/reporter.el +++ b/lisp/mail/reporter.el | |||
| @@ -1,26 +1,29 @@ | |||
| 1 | ;;; reporter.el --- customizable bug reporting of lisp programs | 1 | ;;; reporter.el --- customizable bug reporting of lisp programs |
| 2 | ;; Copyright (C) 1993 Free Software Foundation, Inc. | ||
| 3 | 2 | ||
| 4 | ;; Author: 1993 Barry A. Warsaw, Century Computing Inc. <bwarsaw@cen.com> | 3 | ;; Author: 1993 Barry A. Warsaw, Century Computing Inc. <bwarsaw@cen.com> |
| 5 | ;; Maintainer: bwarsaw@cen.com | 4 | ;; Maintainer: bwarsaw@cen.com |
| 6 | ;; Created: 19-Apr-1993 | 5 | ;; Created: 19-Apr-1993 |
| 6 | ;; Version: 1.23 | ||
| 7 | ;; Last Modified: 1993/09/02 20:28:36 | ||
| 7 | ;; Keywords: bug reports lisp | 8 | ;; Keywords: bug reports lisp |
| 8 | 9 | ||
| 10 | ;; Copyright (C) 1993 Free Software Foundation, Inc. | ||
| 11 | |||
| 9 | ;; This file is part of GNU Emacs. | 12 | ;; This file is part of GNU Emacs. |
| 10 | ;; | 13 | |
| 11 | ;; This program is free software; you can redistribute it and/or modify | 14 | ;; GNU Emacs is free software; you can redistribute it and/or modify |
| 12 | ;; it under the terms of the GNU General Public License as published by | 15 | ;; it under the terms of the GNU General Public License as published by |
| 13 | ;; the Free Software Foundation; either version 2 of the License, or | 16 | ;; the Free Software Foundation; either version 2, or (at your option) |
| 14 | ;; (at your option) any later version. | 17 | ;; any later version. |
| 15 | ;; | 18 | |
| 16 | ;; This program is distributed in the hope that it will be useful, | 19 | ;; GNU Emacs is distributed in the hope that it will be useful, |
| 17 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | 20 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 21 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 19 | ;; GNU General Public License for more details. | 22 | ;; GNU General Public License for more details. |
| 20 | ;; | 23 | |
| 21 | ;; You should have received a copy of the GNU General Public License | 24 | ;; You should have received a copy of the GNU General Public License |
| 22 | ;; along with this program; if not, write to the Free Software | 25 | ;; along with GNU Emacs; see the file COPYING. If not, write to |
| 23 | ;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 26 | ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
| 24 | 27 | ||
| 25 | ;; Introduction | 28 | ;; Introduction |
| 26 | ;; ============ | 29 | ;; ============ |
| @@ -56,15 +59,15 @@ | |||
| 56 | ;; I've set up a mailing list to report bugs or suggest enhancements, | 59 | ;; I've set up a mailing list to report bugs or suggest enhancements, |
| 57 | ;; etc. This list's intended audience is elisp package authors who are | 60 | ;; etc. This list's intended audience is elisp package authors who are |
| 58 | ;; using reporter and want to stay current with releases. Here are the | 61 | ;; using reporter and want to stay current with releases. Here are the |
| 59 | ;; relevant addresses: | 62 | ;; relevent addresses: |
| 60 | ;; | 63 | ;; |
| 61 | ;; Administrivia: reporter-request@anthem.nlm.nih.gov | 64 | ;; Administrivia: reporter-request@anthem.nlm.nih.gov |
| 62 | ;; Submissions: reporter@anthem.nlm.nih.gov | 65 | ;; Submissions: reporter@anthem.nlm.nih.gov |
| 63 | 66 | ||
| 64 | ;; LCD Archive Entry: | 67 | ;; LCD Archive Entry: |
| 65 | ;; reporter|Barry A. Warsaw|warsaw@cen.com| | 68 | ;; reporter|Barry A. Warsaw|bwarsaw@cen.com| |
| 66 | ;; Customizable bug reporting of lisp programs.| | 69 | ;; Customizable bug reporting of lisp programs.| |
| 67 | ;; 1993/05/22 00:29:49|1.18|~/misc/reporter.el.Z| | 70 | ;; 1993/09/02 20:28:36|1.23|~/misc/reporter.el.Z| |
| 68 | 71 | ||
| 69 | ;;; Code: | 72 | ;;; Code: |
| 70 | 73 | ||
| @@ -72,8 +75,12 @@ | |||
| 72 | ;; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv | 75 | ;; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv |
| 73 | ;; user defined variables | 76 | ;; user defined variables |
| 74 | 77 | ||
| 75 | (defvar reporter-mailer 'mail | 78 | (defvar reporter-mailer '(vm-mail mail) |
| 76 | "*Mail package to use to generate bug report buffer.") | 79 | "*Mail package to use to generate bug report buffer. |
| 80 | This can either be a function symbol or a list of function symbols. | ||
| 81 | If a list, it tries to use each specified mailer in order until an | ||
| 82 | existing one is found.") | ||
| 83 | |||
| 77 | 84 | ||
| 78 | ;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | 85 | ;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 79 | ;; end of user defined variables | 86 | ;; end of user defined variables |
| @@ -83,6 +90,7 @@ | |||
| 83 | This is necessary to properly support the printing of buffer-local | 90 | This is necessary to properly support the printing of buffer-local |
| 84 | variables. Current buffer will always be the mail buffer being | 91 | variables. Current buffer will always be the mail buffer being |
| 85 | composed.") | 92 | composed.") |
| 93 | |||
| 86 | 94 | ||
| 87 | (defun reporter-dump-variable (varsym) | 95 | (defun reporter-dump-variable (varsym) |
| 88 | "Pretty-print the value of the variable in symbol VARSYM." | 96 | "Pretty-print the value of the variable in symbol VARSYM." |
| @@ -150,13 +158,28 @@ the name of the mode (you must explicitly concat any version numbers). | |||
| 150 | VARLIST is the list of variables to dump (do a `\\[describe-function] reporter-dump-state' | 158 | VARLIST is the list of variables to dump (do a `\\[describe-function] reporter-dump-state' |
| 151 | for details). Optional PRE-HOOKS and POST-HOOKS are passed to | 159 | for details). Optional PRE-HOOKS and POST-HOOKS are passed to |
| 152 | `reporter-dump-state'. Optional SALUTATION is inserted at the top of the | 160 | `reporter-dump-state'. Optional SALUTATION is inserted at the top of the |
| 153 | mail buffer, and point is left after the salutation. | 161 | mail buffer, and point is left after the saluation. |
| 154 | 162 | ||
| 155 | The mailer used is described in the variable `reporter-mailer'." | 163 | The mailer used is described in the variable `reporter-mailer'." |
| 156 | |||
| 157 | (let ((reporter-eval-buffer (current-buffer)) | 164 | (let ((reporter-eval-buffer (current-buffer)) |
| 158 | (mailbuf (progn (call-interactively reporter-mailer) | 165 | (mailbuf |
| 159 | (current-buffer)))) | 166 | (progn |
| 167 | (call-interactively | ||
| 168 | (if (nlistp reporter-mailer) | ||
| 169 | reporter-mailer | ||
| 170 | (let ((mlist reporter-mailer) | ||
| 171 | (mailer nil)) | ||
| 172 | (while mlist | ||
| 173 | (if (commandp (car mlist)) | ||
| 174 | (setq mailer (car mlist) | ||
| 175 | mlist nil) | ||
| 176 | (setq mlist (cdr mlist)))) | ||
| 177 | (if (not mailer) | ||
| 178 | (error | ||
| 179 | "variable `%s' does not contain a command for mailing." | ||
| 180 | "reporter-mailer")) | ||
| 181 | mailer))) | ||
| 182 | (current-buffer)))) | ||
| 160 | (require 'sendmail) | 183 | (require 'sendmail) |
| 161 | (pop-to-buffer reporter-eval-buffer) | 184 | (pop-to-buffer reporter-eval-buffer) |
| 162 | (pop-to-buffer mailbuf) | 185 | (pop-to-buffer mailbuf) |