]> code.delx.au - gnu-emacs/blobdiff - lisp/mail/emacsbug.el
Define risky-local-variable property here rather than in files.el.
[gnu-emacs] / lisp / mail / emacsbug.el
index 5582bf95b4fc9ab23444e706ff0c7ce0390140ea..e09b68de2b3c228e81a0da28f56cfa43f1174572 100644 (file)
@@ -1,7 +1,7 @@
 ;;; 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 Free Software Foundation, Inc.
+;;   2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
 ;; Author: K. Shane Hartman
 ;; Maintainer: FSF
@@ -65,6 +65,9 @@
 (defvar report-emacs-bug-orig-text nil
   "The automatically-created initial text of bug report.")
 
+(declare-function x-server-vendor "xfns.c" (&optional terminal))
+(declare-function x-server-version "xfns.c" (&optional terminal))
+
 ;;;###autoload
 (defun report-emacs-bug (topic &optional recent-keys)
   "Report a bug in GNU Emacs.
@@ -203,6 +206,18 @@ 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))))
+    ;; 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)))
     ;; This is so the user has to type something
     ;; in order to send easily.
     (use-local-map (nconc (make-sparse-keymap) (current-local-map)))