0
|
1 ;;; emacsbug.el --- command to report Emacs bugs to appropriate mailing list.
|
|
2
|
|
3 ;; Copyright (C) 1985, 1994 Free Software Foundation, Inc.
|
|
4
|
|
5 ;; Author: K. Shane Hartman
|
|
6 ;; Maintainer: FSF
|
|
7 ;; Keywords: maint
|
|
8
|
|
9 ;; Not fully installed because it can work only on Internet hosts.
|
|
10 ;; This file is part of XEmacs.
|
|
11
|
|
12 ;; XEmacs is free software; you can redistribute it and/or modify it
|
|
13 ;; under the terms of the GNU General Public License as published by
|
|
14 ;; the Free Software Foundation; either version 2, or (at your option)
|
|
15 ;; any later version.
|
|
16
|
|
17 ;; XEmacs is distributed in the hope that it will be useful, but
|
|
18 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
20 ;; General Public License for more details.
|
|
21
|
|
22 ;; You should have received a copy of the GNU General Public License
|
|
23 ;; along with XEmacs; see the file COPYING. If not, write to the Free
|
|
24 ;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
25
|
|
26 ;;; Synched up with: FSF 19.30.
|
|
27
|
|
28 ;;; Commentary:
|
|
29
|
|
30 ;; `M-x report-emacs-bug ' starts an email note to the Emacs maintainers
|
|
31 ;; describing a problem. Here's how it's done...
|
|
32
|
|
33 ;;; Code:
|
|
34
|
|
35 ;; >> This should be an address which is accessible to your machine,
|
|
36 ;; >> otherwise you can't use this file. It will only work on the
|
|
37 ;; >> internet with this address.
|
|
38
|
|
39 (require 'sendmail)
|
|
40
|
|
41 (defvar bug-gnu-emacs "xemacs@cs.uiuc.edu"
|
|
42 "Address of site maintaining mailing list for GNU Emacs bugs.")
|
|
43
|
|
44 (defvar report-emacs-bug-orig-text nil
|
|
45 "The automatically-created initial text of bug report.")
|
|
46
|
|
47 ;;;###autoload
|
|
48 (defun report-emacs-bug (topic)
|
|
49 "Report a bug in GNU Emacs.
|
|
50 Prompts for bug subject. Leaves you in a mail buffer."
|
|
51 (interactive "sBug Subject: ")
|
|
52 (mail nil bug-gnu-emacs topic)
|
|
53 (goto-char (point-min))
|
|
54 (re-search-forward (concat "^" (regexp-quote mail-header-separator) "\n"))
|
|
55 (insert "In " (emacs-version) "\n")
|
|
56 (if (and system-configuration-options
|
|
57 (not (equal system-configuration-options "")))
|
|
58 (insert "configured using `configure "
|
|
59 system-configuration-options "'\n"))
|
|
60 (insert "\n")
|
|
61 ;; This is so the user has to type something
|
|
62 ;; in order to send easily.
|
|
63 (use-local-map (nconc (make-sparse-keymap) (current-local-map)))
|
|
64 (define-key (current-local-map) "\C-c\C-i" 'report-emacs-bug-info)
|
|
65 (with-output-to-temp-buffer "*Bug Help*"
|
|
66 (princ (substitute-command-keys
|
|
67 "Type \\[mail-send-and-exit] to send the bug report.\n"))
|
|
68 (terpri)
|
|
69 (princ (substitute-command-keys
|
|
70 "Type \\[report-emacs-bug-info] to visit in Info the Emacs Manual section
|
|
71 about when and how to write a bug report,
|
|
72 and what information to supply so that the bug can be fixed.
|
|
73 Type SPC to scroll through this section and its subsections.")))
|
|
74 ;; Make it less likely people will send empty messages.
|
|
75 (make-local-variable 'mail-send-hook)
|
|
76 (add-hook 'mail-send-hook 'report-emacs-bug-hook)
|
|
77 (save-excursion
|
|
78 (goto-char (point-max))
|
|
79 (skip-chars-backward " \t\n")
|
|
80 (make-local-variable 'report-emacs-bug-orig-text)
|
|
81 (setq report-emacs-bug-orig-text (buffer-substring (point-min) (point)))))
|
|
82
|
|
83 (defun report-emacs-bug-info ()
|
|
84 "Go to the Info node on reporting Emacs bugs."
|
|
85 (interactive)
|
|
86 (info)
|
|
87 (Info-directory)
|
|
88 (Info-menu "emacs")
|
|
89 (Info-goto-node "Bugs"))
|
|
90
|
|
91 (defun report-emacs-bug-hook ()
|
|
92 (save-excursion
|
|
93 (goto-char (point-max))
|
|
94 (skip-chars-backward " \t\n")
|
|
95 (if (and (= (- (point) (point-min))
|
|
96 (length report-emacs-bug-orig-text))
|
|
97 (equal (buffer-substring (point-min) (point))
|
|
98 report-emacs-bug-orig-text))
|
|
99 (error "No text entered in bug report"))))
|
|
100
|
|
101 (provide 'emacsbug)
|
|
102
|
|
103 ;;; emacsbug.el ends here
|