diff options
| -rw-r--r-- | lisp/mail/emacsbug.el | 46 |
1 files changed, 29 insertions, 17 deletions
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index bed314825e4..09c9af0bfcd 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | ;; Author: K. Shane Hartman | 5 | ;; Author: K. Shane Hartman |
| 6 | ;; Maintainer: FSF | 6 | ;; Maintainer: FSF |
| 7 | ;; Keywords: maint | 7 | ;; Keywords: maint mail |
| 8 | 8 | ||
| 9 | ;; Not fully installed because it can work only on Internet hosts. | 9 | ;; Not fully installed because it can work only on Internet hosts. |
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| @@ -37,6 +37,11 @@ | |||
| 37 | 37 | ||
| 38 | (require 'sendmail) | 38 | (require 'sendmail) |
| 39 | 39 | ||
| 40 | (defgroup emacsbug nil | ||
| 41 | "Sending Emacs bug reports." | ||
| 42 | :group 'maint | ||
| 43 | :group 'mail) | ||
| 44 | |||
| 40 | (defvar bug-gnu-emacs "bug-gnu-emacs@prep.ai.mit.edu" | 45 | (defvar bug-gnu-emacs "bug-gnu-emacs@prep.ai.mit.edu" |
| 41 | "Address of mailing list for GNU Emacs bugs.") | 46 | "Address of mailing list for GNU Emacs bugs.") |
| 42 | 47 | ||
| @@ -46,9 +51,15 @@ | |||
| 46 | (defvar report-emacs-bug-orig-text nil | 51 | (defvar report-emacs-bug-orig-text nil |
| 47 | "The automatically-created initial text of bug report.") | 52 | "The automatically-created initial text of bug report.") |
| 48 | 53 | ||
| 49 | ;;;###autoload | 54 | (defcustom report-emacs-bug-no-confirmation nil |
| 50 | (defvar report-emacs-bug-run-tersely nil | 55 | "*If non-nil, suppress the confirmations asked for the sake of novice users." |
| 51 | "*If non-nil, suppress confirmations for novice users.") | 56 | :group 'emacsbug |
| 57 | :type 'boolean) | ||
| 58 | |||
| 59 | (defcustom report-emacs-bug-no-explanations nil | ||
| 60 | "*If non-nil, suppress the explanations given for the sake of novice users." | ||
| 61 | :group 'emacsbug | ||
| 62 | :type 'boolean) | ||
| 52 | 63 | ||
| 53 | ;;;###autoload | 64 | ;;;###autoload |
| 54 | (defun report-emacs-bug (topic &optional recent-keys) | 65 | (defun report-emacs-bug (topic &optional recent-keys) |
| @@ -71,17 +82,18 @@ Prompts for bug subject. Leaves you in a mail buffer." | |||
| 71 | ;; if the user was asked to confirm and said no. | 82 | ;; if the user was asked to confirm and said no. |
| 72 | (goto-char (point-min)) | 83 | (goto-char (point-min)) |
| 73 | (re-search-forward (concat "^" (regexp-quote mail-header-separator) "\n")) | 84 | (re-search-forward (concat "^" (regexp-quote mail-header-separator) "\n")) |
| 74 | ;; Insert warnings for novice users. | 85 | (unless report-emacs-bug-no-explanations |
| 75 | (insert "This bug report will be sent to the Free Software Foundation,\n") | 86 | ;; Insert warnings for novice users. |
| 76 | (let ((pos (point))) | 87 | (insert "This bug report will be sent to the Free Software Foundation,\n") |
| 77 | (insert " not to your local site managers!!") | 88 | (let ((pos (point))) |
| 78 | (put-text-property pos (point) 'face 'highlight)) | 89 | (insert " not to your local site managers!!") |
| 79 | (insert "\nPlease write in ") | 90 | (put-text-property pos (point) 'face 'highlight)) |
| 80 | (let ((pos (point))) | 91 | (insert "\nPlease write in ") |
| 81 | (insert "English") | 92 | (let ((pos (point))) |
| 82 | (put-text-property pos (point) 'face 'highlight)) | 93 | (insert "English") |
| 83 | (insert ", because the Emacs maintainers do not have | 94 | (put-text-property pos (point) 'face 'highlight)) |
| 84 | translators to read other languages for them.\n\n") | 95 | (insert ", because the Emacs maintainers do not have |
| 96 | translators to read other languages for them.\n\n")) | ||
| 85 | 97 | ||
| 86 | (insert "In " (emacs-version) "\n") | 98 | (insert "In " (emacs-version) "\n") |
| 87 | (if (and system-configuration-options | 99 | (if (and system-configuration-options |
| @@ -169,7 +181,7 @@ Type SPC to scroll through this section and its subsections."))) | |||
| 169 | (let ((charsets (delq 'ascii | 181 | (let ((charsets (delq 'ascii |
| 170 | (find-charset-region (point-min) (point-max))))) | 182 | (find-charset-region (point-min) (point-max))))) |
| 171 | (if charsets | 183 | (if charsets |
| 172 | (if (or report-emacs-bug-run-tersely | 184 | (if (or report-emacs-bug-no-confirmation |
| 173 | (y-or-n-p "Convert non-ASCII letters to hexadecimal? ")) | 185 | (y-or-n-p "Convert non-ASCII letters to hexadecimal? ")) |
| 174 | (save-excursion | 186 | (save-excursion |
| 175 | (goto-char (point-min)) | 187 | (goto-char (point-min)) |
| @@ -183,7 +195,7 @@ Type SPC to scroll through this section and its subsections."))) | |||
| 183 | (error "Please convert non-ASCII characters to something else")))) | 195 | (error "Please convert non-ASCII characters to something else")))) |
| 184 | 196 | ||
| 185 | ;; The last warning for novice users. | 197 | ;; The last warning for novice users. |
| 186 | (if (or report-emacs-bug-run-tersely | 198 | (if (or report-emacs-bug-no-confirmation |
| 187 | (yes-or-no-p | 199 | (yes-or-no-p |
| 188 | "Send this bug report to the Emacs maintainers? ")) | 200 | "Send this bug report to the Emacs maintainers? ")) |
| 189 | ;; Just send the current mail. | 201 | ;; Just send the current mail. |