]> code.delx.au - gnu-emacs/blobdiff - lisp/mail/emacsbug.el
Reword header comment to prevent copyright.el wanting to update years.
[gnu-emacs] / lisp / mail / emacsbug.el
index 7132da6785dc1bc91fbea26ef87111f3eedbe3c1..73e61a4668dc6d50ea05965df9064d37b6d855d4 100644 (file)
@@ -1,13 +1,12 @@
 ;;; emacsbug.el --- command to report Emacs bugs to appropriate mailing list
 
-;; Copyright (C) 1985, 1994, 1997, 1998, 2000, 2001, 2002, 2003,
-;;   2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1994, 1997, 1998, 2000, 2001, 2002, 2003, 2004,
+;;   2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
 
 ;; Author: K. Shane Hartman
 ;; Maintainer: FSF
 ;; Keywords: maint mail
 
-;; Not fully installed because it can work only on Internet hosts.
 ;; This file is part of GNU Emacs.
 
 ;; GNU Emacs is free software: you can redistribute it and/or modify
@@ -130,7 +129,8 @@ usually do not have translators to read other languages for them.\n\n")
        (insert ",\nand to the gnu.emacs.bug news group.\n\n")))
 
     (insert "Please describe exactly what actions triggered the bug\n"
-           "and the precise symptoms of the bug:\n\n")
+           "and the precise symptoms of the bug.  If you can, give\n"
+           "a recipe starting from `emacs -Q':\n\n")
     (add-text-properties (point) (save-excursion (mail-text) (point))
                          prompt-properties)
 
@@ -143,8 +143,8 @@ usually do not have translators to read other languages for them.\n\n")
 
     (let ((debug-file (expand-file-name "DEBUG" data-directory)))
       (if (file-readable-p debug-file)
-         (insert "If you would like to further debug the crash, please read the file\n"
-                 debug-file " for instructions.\n")))
+         (insert "For information about debugging Emacs, please read the file\n"
+                 debug-file ".\n")))
     (add-text-properties (1+ user-point) (point) prompt-properties)
 
     (insert "\n\nIn " (emacs-version) "\n")
@@ -166,8 +166,8 @@ usually do not have translators to read other languages for them.\n\n")
      '("LC_ALL" "LC_COLLATE" "LC_CTYPE" "LC_MESSAGES"
        "LC_MONETARY" "LC_NUMERIC" "LC_TIME" "LANG" "XMODIFIERS"))
     (insert (format "  locale-coding-system: %s\n" locale-coding-system))
-    (insert (format "  default-enable-multibyte-characters: %s\n"
-                   default-enable-multibyte-characters))
+    (insert (format "  default enable-multibyte-characters: %s\n"
+                   (default-value 'enable-multibyte-characters)))
     (insert "\n")
     (insert (format "Major mode: %s\n"
                    (format-mode-line
@@ -206,23 +206,37 @@ usually do not have translators to read other languages for them.\n\n")
              (setq beg-pos (point)))
            (insert "\n\nRecent messages:\n")
            (insert-buffer-substring message-buf beg-pos end-pos))))
-    ;; This is so the user has to type something
-    ;; in order to send easily.
+    ;; After Recent messages, to avoid the messages produced by
+    ;; list-load-path-shadows.
+    (unless (looking-back "\n")
+      (insert "\n"))
+    (insert "\n")
+    (insert "Load-path shadows:\n")
+    (message "Checking for load-path shadows...")
+    (let ((shadows (list-load-path-shadows t)))
+      (message "Checking for load-path shadows...done")
+      (insert (if (zerop (length shadows))
+                  "None found.\n"
+                shadows)))
+    (insert (format "\nFeatures:\n%s\n" features))
+    (fill-region (line-beginning-position 0) (point))
+    ;; This is so the user has to type something in order to send easily.
     (use-local-map (nconc (make-sparse-keymap) (current-local-map)))
     (define-key (current-local-map) "\C-c\C-i" 'report-emacs-bug-info)
     (unless report-emacs-bug-no-explanations
       (with-output-to-temp-buffer "*Bug Help*"
+       (princ "While in the mail buffer:\n\n")
        (if (eq mail-user-agent 'sendmail-user-agent)
            (princ (substitute-command-keys
-                   "Type \\[mail-send-and-exit] to send the bug report.\n")))
+                   "  Type \\[mail-send-and-exit] to send the bug report.\n")))
        (princ (substitute-command-keys
-               "Type \\[kill-buffer] RET to cancel (don't send it).\n"))
+               "  Type \\[kill-buffer] RET to cancel (don't send it).\n"))
        (terpri)
        (princ (substitute-command-keys
-               "Type \\[report-emacs-bug-info] to visit in Info the Emacs Manual section
-about when and how to write a bug report,
-and what information to supply so that the bug can be fixed.
-Type SPC to scroll through this section and its subsections."))))
+               "  Type \\[report-emacs-bug-info] to visit in Info the Emacs Manual section
+    about when and how to write a bug report, and what
+    information you should include to help fix the bug.")))
+      (shrink-window-if-larger-than-buffer (get-buffer-window "*Bug Help*")))
     ;; Make it less likely people will send empty messages.
     (make-local-variable 'mail-send-hook)
     (add-hook 'mail-send-hook 'report-emacs-bug-hook)