comparison lisp/mail/emacsbug.el @ 20774:d56dca77717a

(emacsbug): Customized. (report-emacs-bug-no-confirmation): Renamed from report-emacs-bug-run-tersely. (report-emacs-bug-no-explanations): New option. (report-emacs-bug): Handle that option.
author Richard M. Stallman <rms@gnu.org>
date Mon, 26 Jan 1998 03:14:34 +0000
parents 38942e2dfffa
children 5941b5298627
comparison
equal deleted inserted replaced
20773:6c655dc99321 20774:d56dca77717a
2 2
3 ;; Copyright (C) 1985, 1994, 1997 Free Software Foundation, Inc. 3 ;; Copyright (C) 1985, 1994, 1997 Free Software Foundation, Inc.
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.
11 11
12 ;; GNU Emacs is free software; you can redistribute it and/or modify 12 ;; GNU Emacs is free software; you can redistribute it and/or modify
35 ;; >> otherwise you can't use this file. It will only work on the 35 ;; >> otherwise you can't use this file. It will only work on the
36 ;; >> internet with this address. 36 ;; >> internet with this address.
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
43 (defvar report-emacs-bug-pretest-address "emacs-pretest-bug@gnu.ai.mit.edu" 48 (defvar report-emacs-bug-pretest-address "emacs-pretest-bug@gnu.ai.mit.edu"
44 "Address of mailing list for GNU Emacs pretest bugs.") 49 "Address of mailing list for GNU Emacs pretest bugs.")
45 50
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)
55 "Report a bug in GNU Emacs. 66 "Report a bug in GNU Emacs.
56 Prompts for bug subject. Leaves you in a mail buffer." 67 Prompts for bug subject. Leaves you in a mail buffer."
69 topic) 80 topic)
70 ;; The rest of this does not execute 81 ;; The rest of this does not execute
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
88 (not (equal system-configuration-options ""))) 100 (not (equal system-configuration-options "")))
89 (insert "configured using `configure " 101 (insert "configured using `configure "
167 179
168 ;; Check the buffer contents and reject non-English letters. 180 ;; Check the buffer contents and reject non-English letters.
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))
176 (let ((enable-multibyte-characters nil) 188 (let ((enable-multibyte-characters nil)
177 (pattern (format "[%c-%c]" 128 255)) 189 (pattern (format "[%c-%c]" 128 255))
181 (delete-char -1) 193 (delete-char -1)
182 (insert (format "=%02x" ch))))) 194 (insert (format "=%02x" ch)))))
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.
190 nil 202 nil
191 (goto-char (point-min)) 203 (goto-char (point-min))