]> code.delx.au - gnu-emacs/blobdiff - lisp/mail/emacsbug.el
Calc: Update mode line after change mode
[gnu-emacs] / lisp / mail / emacsbug.el
index 8cd59006d8d29964ece0ac759d1ea36efc41c08f..18eaa22b34c5837c217f98ba0c2a3308fa27705f 100644 (file)
@@ -1,6 +1,6 @@
 ;;; emacsbug.el --- command to report Emacs bugs to appropriate mailing list
 
-;; Copyright (C) 1985, 1994, 1997-1998, 2000-2015 Free Software
+;; Copyright (C) 1985, 1994, 1997-1998, 2000-2016 Free Software
 ;; Foundation, Inc.
 
 ;; Author: K. Shane Hartman
@@ -162,6 +162,14 @@ Prompts for bug subject.  Leaves you in a mail buffer."
     (setq message-end-point
          (with-current-buffer (messages-buffer)
            (point-max-marker)))
+    (condition-case nil
+        ;; For the novice user make sure there's always enough space for
+        ;; the mail and the warnings buffer on this frame (Bug#10873).
+        (unless report-emacs-bug-no-explanations
+          (delete-other-windows)
+          (set-window-dedicated-p nil nil)
+          (set-frame-parameter nil 'unsplittable nil))
+      (error nil))
     (compose-mail report-emacs-bug-address topic)
     ;; The rest of this does not execute if the user was asked to
     ;; confirm and said no.
@@ -215,7 +223,7 @@ usually do not have translators for other languages.\n\n")))
 
     (insert "Please describe exactly what actions triggered the bug, and\n"
            "the precise symptoms of the bug.  If you can, give a recipe\n"
-           "starting from `emacs -Q':\n\n")
+           "starting from 'emacs -Q':\n\n")
     (let ((txt (delete-and-extract-region
                 (save-excursion (rfc822-goto-eoh) (line-beginning-position 2))
                 (point))))
@@ -225,7 +233,7 @@ usually do not have translators for other languages.\n\n")))
 
     (insert "If Emacs crashed, and you have the Emacs process in the gdb debugger,\n"
            "please include the output from the following gdb commands:\n"
-           "    `bt full' and `xbacktrace'.\n")
+           "    'bt full' and 'xbacktrace'.\n")
 
     (let ((debug-file (expand-file-name "DEBUG" data-directory)))
       (if (file-readable-p debug-file)
@@ -234,13 +242,17 @@ usually do not have translators for other languages.\n\n")))
     (let ((txt (delete-and-extract-region (1+ user-point) (point))))
       (insert (propertize "\n" 'display txt)))
 
-    (insert "\n\nIn " (emacs-version) "\n")
+    (insert "\nIn " (emacs-version))
+    (if emacs-build-system
+        (insert " built on " emacs-build-system))
+    (insert "\n")
+
     (if (stringp emacs-repository-version)
        (insert "Repository revision: " emacs-repository-version "\n"))
     (if (fboundp 'x-server-vendor)
        (condition-case nil
             ;; This is used not only for X11 but also W32 and others.
-           (insert "Windowing system distributor `" (x-server-vendor)
+           (insert "Windowing system distributor '" (x-server-vendor)
                     "', version "
                    (mapconcat 'number-to-string (x-server-version) ".") "\n")
          (error t)))
@@ -251,9 +263,21 @@ usually do not have translators for other languages.\n\n")))
                     (buffer-string)))))
       (if (stringp lsb)
          (insert "System " lsb "\n")))
+    (let ((message-buf (get-buffer "*Messages*")))
+      (if message-buf
+         (let (beg-pos
+               (end-pos message-end-point))
+           (with-current-buffer message-buf
+             (goto-char end-pos)
+             (forward-line -10)
+             (setq beg-pos (point)))
+            (terpri (current-buffer) t)
+           (insert "Recent messages:\n")
+           (insert-buffer-substring message-buf beg-pos end-pos))))
+    (insert "\n")
     (when (and system-configuration-options
               (not (equal system-configuration-options "")))
-      (insert "Configured using:\n `configure "
+      (insert "Configured using:\n 'configure "
              system-configuration-options "'\n\n")
       (fill-region (line-beginning-position -1) (point)))
     (insert "Configured features:\n" system-configuration-features "\n\n")
@@ -283,20 +307,6 @@ usually do not have translators for other languages.\n\n")))
       (and (boundp mode) (buffer-local-value mode from-buffer)
           (insert (format "  %s: %s\n" mode
                           (buffer-local-value mode from-buffer)))))
-    (let ((message-buf (get-buffer "*Messages*")))
-      (if message-buf
-         (let (beg-pos
-               (end-pos message-end-point))
-           (with-current-buffer message-buf
-             (goto-char end-pos)
-             (forward-line -10)
-             (setq beg-pos (point)))
-           (insert "\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")
     (let* ((msg "Checking for load-path shadows...")
@@ -315,7 +325,7 @@ usually do not have translators for other languages.\n\n")))
 
     (insert (format "\nMemory information:\n"))
     (pp (garbage-collect) (current-buffer))
-    
+
     ;; 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" 'info-emacs-bug)
@@ -417,7 +427,8 @@ and send the mail again%s."
                                         (regexp-quote (system-name)))
                                 from))
               (not (yes-or-no-p
-                    (format "Is `%s' really your email address? " from)))
+                    (format-message "Is `%s' really your email address? "
+                                     from)))
               (error "Please edit the From address and try again"))))))