diff options
| author | Karl Heuer | 1997-10-15 23:03:30 +0000 |
|---|---|---|
| committer | Karl Heuer | 1997-10-15 23:03:30 +0000 |
| commit | 0a18209b69268df7a09d41f5e0b6683d1b73f727 (patch) | |
| tree | b4aec7117bfb247db54d6b01490a4e68982c937e /lisp | |
| parent | 4fdd59c0db6af9192112d86b3ab17b6ebe8d1ff5 (diff) | |
| download | emacs-0a18209b69268df7a09d41f5e0b6683d1b73f727.tar.gz emacs-0a18209b69268df7a09d41f5e0b6683d1b73f727.zip | |
(report-emacs-bug): Delete the condition-case.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/mail/emacsbug.el | 168 |
1 files changed, 83 insertions, 85 deletions
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index e1936867f3a..bed314825e4 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el | |||
| @@ -57,97 +57,95 @@ Prompts for bug subject. Leaves you in a mail buffer." | |||
| 57 | ;; This strange form ensures that (recent-keys) is the value before | 57 | ;; This strange form ensures that (recent-keys) is the value before |
| 58 | ;; the bug subject string is read. | 58 | ;; the bug subject string is read. |
| 59 | (interactive (reverse (list (recent-keys) (read-string "Bug Subject: ")))) | 59 | (interactive (reverse (list (recent-keys) (read-string "Bug Subject: ")))) |
| 60 | (condition-case nil | 60 | (let (user-point message-end-point) |
| 61 | (let (user-point message-end-point) | 61 | (setq message-end-point |
| 62 | (setq message-end-point | 62 | (with-current-buffer (get-buffer "*Messages*") |
| 63 | (with-current-buffer (get-buffer "*Messages*") | 63 | (point-max-marker))) |
| 64 | (point-max-marker))) | 64 | (compose-mail (if (string-match "\\..*\\..*\\." emacs-version) |
| 65 | (compose-mail (if (string-match "\\..*\\..*\\." emacs-version) | 65 | ;; If there are four numbers in emacs-version, |
| 66 | ;; If there are four numbers in emacs-version, | 66 | ;; this is a pretest version. |
| 67 | ;; this is a pretest version. | 67 | report-emacs-bug-pretest-address |
| 68 | report-emacs-bug-pretest-address | 68 | bug-gnu-emacs) |
| 69 | bug-gnu-emacs) | 69 | topic) |
| 70 | topic) | 70 | ;; The rest of this does not execute |
| 71 | ;; The rest of this does not execute | 71 | ;; if the user was asked to confirm and said no. |
| 72 | ;; if the user was asked to confirm and said no. | 72 | (goto-char (point-min)) |
| 73 | (goto-char (point-min)) | 73 | (re-search-forward (concat "^" (regexp-quote mail-header-separator) "\n")) |
| 74 | (re-search-forward (concat "^" (regexp-quote mail-header-separator) "\n")) | 74 | ;; Insert warnings for novice users. |
| 75 | ;; Insert warnings for novice users. | 75 | (insert "This bug report will be sent to the Free Software Foundation,\n") |
| 76 | (insert "This bug report will be sent to the Free Software Foundation,\n") | 76 | (let ((pos (point))) |
| 77 | (let ((pos (point))) | 77 | (insert " not to your local site managers!!") |
| 78 | (insert " not to your local site managers!!") | 78 | (put-text-property pos (point) 'face 'highlight)) |
| 79 | (put-text-property pos (point) 'face 'highlight)) | 79 | (insert "\nPlease write in ") |
| 80 | (insert "\nPlease write in ") | 80 | (let ((pos (point))) |
| 81 | (let ((pos (point))) | 81 | (insert "English") |
| 82 | (insert "English") | 82 | (put-text-property pos (point) 'face 'highlight)) |
| 83 | (put-text-property pos (point) 'face 'highlight)) | 83 | (insert ", because the Emacs maintainers do not have |
| 84 | (insert ", because the Emacs maintainers do not have | ||
| 85 | translators to read other languages for them.\n\n") | 84 | translators to read other languages for them.\n\n") |
| 86 | 85 | ||
| 87 | (insert "In " (emacs-version) "\n") | 86 | (insert "In " (emacs-version) "\n") |
| 88 | (if (and system-configuration-options | 87 | (if (and system-configuration-options |
| 89 | (not (equal system-configuration-options ""))) | 88 | (not (equal system-configuration-options ""))) |
| 90 | (insert "configured using `configure " | 89 | (insert "configured using `configure " |
| 91 | system-configuration-options "'\n")) | 90 | system-configuration-options "'\n")) |
| 92 | (insert "\n") | 91 | (insert "\n") |
| 93 | (insert "Please describe exactly what actions triggered the bug\n" | 92 | (insert "Please describe exactly what actions triggered the bug\n" |
| 94 | "and the precise symptoms of the bug:\n\n") | 93 | "and the precise symptoms of the bug:\n\n") |
| 95 | (setq user-point (point)) | 94 | (setq user-point (point)) |
| 96 | (insert "\n\n\n" | 95 | (insert "\n\n\n" |
| 97 | "Recent input:\n") | 96 | "Recent input:\n") |
| 98 | (let ((before-keys (point))) | 97 | (let ((before-keys (point))) |
| 99 | (insert (mapconcat (lambda (key) | 98 | (insert (mapconcat (lambda (key) |
| 100 | (if (or (integerp key) | 99 | (if (or (integerp key) |
| 101 | (symbolp key) | 100 | (symbolp key) |
| 102 | (listp key)) | 101 | (listp key)) |
| 103 | (single-key-description key) | 102 | (single-key-description key) |
| 104 | (prin1-to-string key nil))) | 103 | (prin1-to-string key nil))) |
| 105 | (or recent-keys (recent-keys)) | 104 | (or recent-keys (recent-keys)) |
| 106 | " ")) | 105 | " ")) |
| 107 | (save-restriction | 106 | (save-restriction |
| 108 | (narrow-to-region before-keys (point)) | 107 | (narrow-to-region before-keys (point)) |
| 109 | (goto-char before-keys) | 108 | (goto-char before-keys) |
| 110 | (while (progn (move-to-column 50) (not (eobp))) | 109 | (while (progn (move-to-column 50) (not (eobp))) |
| 111 | (search-forward " " nil t) | 110 | (search-forward " " nil t) |
| 112 | (insert "\n")))) | 111 | (insert "\n")))) |
| 113 | (let ((message-buf (get-buffer "*Messages*"))) | 112 | (let ((message-buf (get-buffer "*Messages*"))) |
| 114 | (if message-buf | 113 | (if message-buf |
| 115 | (let (beg-pos | 114 | (let (beg-pos |
| 116 | (end-pos message-end-point)) | 115 | (end-pos message-end-point)) |
| 117 | (with-current-buffer message-buf | 116 | (with-current-buffer message-buf |
| 118 | (goto-char end-pos) | 117 | (goto-char end-pos) |
| 119 | (forward-line -10) | 118 | (forward-line -10) |
| 120 | (setq beg-pos (point))) | 119 | (setq beg-pos (point))) |
| 121 | (insert "\n\nRecent messages:\n") | 120 | (insert "\n\nRecent messages:\n") |
| 122 | (insert-buffer-substring message-buf beg-pos end-pos)))) | 121 | (insert-buffer-substring message-buf beg-pos end-pos)))) |
| 123 | ;; This is so the user has to type something | 122 | ;; This is so the user has to type something |
| 124 | ;; in order to send easily. | 123 | ;; in order to send easily. |
| 125 | (use-local-map (nconc (make-sparse-keymap) (current-local-map))) | 124 | (use-local-map (nconc (make-sparse-keymap) (current-local-map))) |
| 126 | (define-key (current-local-map) "\C-c\C-i" 'report-emacs-bug-info) | 125 | (define-key (current-local-map) "\C-c\C-i" 'report-emacs-bug-info) |
| 127 | (with-output-to-temp-buffer "*Bug Help*" | 126 | (with-output-to-temp-buffer "*Bug Help*" |
| 128 | (if (eq mail-user-agent 'sendmail-user-agent) | 127 | (if (eq mail-user-agent 'sendmail-user-agent) |
| 129 | (princ (substitute-command-keys | ||
| 130 | "Type \\[mail-send-and-exit] to send the bug report.\n"))) | ||
| 131 | (princ (substitute-command-keys | 128 | (princ (substitute-command-keys |
| 132 | "Type \\[kill-buffer] RET to cancel (don't send it).\n")) | 129 | "Type \\[mail-send-and-exit] to send the bug report.\n"))) |
| 133 | (terpri) | 130 | (princ (substitute-command-keys |
| 134 | (princ (substitute-command-keys | 131 | "Type \\[kill-buffer] RET to cancel (don't send it).\n")) |
| 135 | "Type \\[report-emacs-bug-info] to visit in Info the Emacs Manual section | 132 | (terpri) |
| 133 | (princ (substitute-command-keys | ||
| 134 | "Type \\[report-emacs-bug-info] to visit in Info the Emacs Manual section | ||
| 136 | about when and how to write a bug report, | 135 | about when and how to write a bug report, |
| 137 | and what information to supply so that the bug can be fixed. | 136 | and what information to supply so that the bug can be fixed. |
| 138 | Type SPC to scroll through this section and its subsections."))) | 137 | Type SPC to scroll through this section and its subsections."))) |
| 139 | ;; Make it less likely people will send empty messages. | 138 | ;; Make it less likely people will send empty messages. |
| 140 | (make-local-variable 'mail-send-hook) | 139 | (make-local-variable 'mail-send-hook) |
| 141 | (add-hook 'mail-send-hook 'report-emacs-bug-hook) | 140 | (add-hook 'mail-send-hook 'report-emacs-bug-hook) |
| 142 | ;; Discourage users to write non-English text. | 141 | ;; Discourage users to write non-English text. |
| 143 | (setq enable-multibyte-characters nil) | 142 | (setq enable-multibyte-characters nil) |
| 144 | (save-excursion | 143 | (save-excursion |
| 145 | (goto-char (point-max)) | 144 | (goto-char (point-max)) |
| 146 | (skip-chars-backward " \t\n") | 145 | (skip-chars-backward " \t\n") |
| 147 | (make-local-variable 'report-emacs-bug-orig-text) | 146 | (make-local-variable 'report-emacs-bug-orig-text) |
| 148 | (setq report-emacs-bug-orig-text (buffer-substring (point-min) (point)))) | 147 | (setq report-emacs-bug-orig-text (buffer-substring (point-min) (point)))) |
| 149 | (goto-char user-point)) | 148 | (goto-char user-point))) |
| 150 | (error nil))) | ||
| 151 | 149 | ||
| 152 | (defun report-emacs-bug-info () | 150 | (defun report-emacs-bug-info () |
| 153 | "Go to the Info node on reporting Emacs bugs." | 151 | "Go to the Info node on reporting Emacs bugs." |