summaryrefslogtreecommitdiff
path: root/lisp/mail/emacsbug.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mail/emacsbug.el')
-rw-r--r--lisp/mail/emacsbug.el86
1 files changed, 40 insertions, 46 deletions
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index c1bc7e2e1ab..8e28973c43f 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -1,10 +1,10 @@
;;; emacsbug.el --- command to report Emacs bugs to appropriate mailing list
-;; Copyright (C) 1985, 1994, 1997-1998, 2000-2013 Free Software
+;; Copyright (C) 1985, 1994, 1997-1998, 2000-2015 Free Software
;; Foundation, Inc.
;; Author: K. Shane Hartman
-;; Maintainer: FSF
+;; Maintainer: emacs-devel@gnu.org
;; Keywords: maint mail
;; Package: emacs
@@ -43,11 +43,6 @@
(define-obsolete-variable-alias 'report-emacs-bug-pretest-address
'report-emacs-bug-address "24.1")
-(defcustom report-emacs-bug-address "bug-gnu-emacs@gnu.org"
- "Address of mailing list for GNU Emacs bugs."
- :group 'emacsbug
- :type 'string)
-
(defcustom report-emacs-bug-no-confirmation nil
"If non-nil, suppress the confirmations asked for the sake of novice users."
:group 'emacsbug
@@ -142,13 +137,18 @@ This requires either the OS X \"open\" command, or the freedesktop
(concat "mailto:" to)))
(error "Subject, To or body not found")))))
+;; It's the default mail mode, so it seems OK to use its features.
+(autoload 'message-bogus-recipient-p "message")
+(autoload 'message-make-address "message")
+(defvar message-send-mail-function)
+(defvar message-sendmail-envelope-from)
+
;;;###autoload
-(defun report-emacs-bug (topic &optional recent-keys)
+(defun report-emacs-bug (topic &optional unused)
"Report a bug in GNU Emacs.
Prompts for bug subject. Leaves you in a mail buffer."
- ;; This strange form ensures that (recent-keys) is the value before
- ;; the bug subject string is read.
- (interactive (reverse (list (recent-keys) (read-string "Bug Subject: "))))
+ (declare (advertised-calling-convention (topic) "24.5"))
+ (interactive "sBug Subject: ")
;; The syntax `version;' is preferred to `[version]' because the
;; latter could be mistakenly stripped by mailing software.
(if (eq system-type 'ms-dos)
@@ -160,7 +160,7 @@ Prompts for bug subject. Leaves you in a mail buffer."
(report-emacs-bug-can-use-osx-open)))
user-point message-end-point)
(setq message-end-point
- (with-current-buffer (get-buffer-create "*Messages*")
+ (with-current-buffer (messages-buffer)
(point-max-marker)))
(compose-mail report-emacs-bug-address topic)
;; The rest of this does not execute if the user was asked to
@@ -170,7 +170,12 @@ Prompts for bug subject. Leaves you in a mail buffer."
;; that report-emacs-bug-orig-text remains valid. (Bug#5178)
(message-sort-headers)
;; Stop message-mode stealing the properties we will add.
- (set (make-local-variable 'message-strip-special-text-properties) nil))
+ (set (make-local-variable 'message-strip-special-text-properties) nil)
+ ;; Make sure we default to the From: address as envelope when sending
+ ;; through sendmail.
+ (when (and (not message-sendmail-envelope-from)
+ (message-bogus-recipient-p (message-make-address)))
+ (set (make-local-variable 'message-sendmail-envelope-from) 'header)))
(rfc822-goto-eoh)
(forward-line 1)
;; Move the mail signature to the proper place.
@@ -210,7 +215,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))))
@@ -220,7 +225,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)
@@ -230,12 +235,12 @@ usually do not have translators for other languages.\n\n")))
(insert (propertize "\n" 'display txt)))
(insert "\n\nIn " (emacs-version) "\n")
- (if (stringp emacs-bzr-version)
- (insert "Bzr revision: " emacs-bzr-version "\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)))
@@ -248,9 +253,11 @@ usually do not have translators for other languages.\n\n")))
(insert "System " lsb "\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")
+ (fill-region (line-beginning-position -1) (point))
(insert "Important settings:\n")
(mapc
(lambda (var)
@@ -260,8 +267,11 @@ usually do not have translators for other languages.\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-value 'enable-multibyte-characters)))
+ ;; Only ~ 0.2% of people from a sample of 3200 changed this from
+ ;; the default, t.
+ (or (default-value '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
@@ -273,23 +283,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)))))
- (insert "\n")
- (insert "Recent input:\n")
- (let ((before-keys (point)))
- (insert (mapconcat (lambda (key)
- (if (or (integerp key)
- (symbolp key)
- (listp key))
- (single-key-description key)
- (prin1-to-string key nil)))
- (or recent-keys (recent-keys))
- " "))
- (save-restriction
- (narrow-to-region before-keys (point))
- (goto-char before-keys)
- (while (progn (move-to-column 50) (not (eobp)))
- (search-forward " " nil t)
- (insert "\n"))))
(let ((message-buf (get-buffer "*Messages*")))
(if message-buf
(let (beg-pos
@@ -298,11 +291,11 @@ usually do not have translators for other languages.\n\n")))
(goto-char end-pos)
(forward-line -10)
(setq beg-pos (point)))
- (insert "\n\nRecent messages:\n")
+ (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")
+ (unless (looking-back "\n" (1- (point)))
(insert "\n"))
(insert "\n")
(insert "Load-path shadows:\n")
@@ -319,6 +312,10 @@ usually do not have translators for other languages.\n\n")))
shadows)))
(insert (format "\nFeatures:\n%s\n" features))
(fill-region (line-beginning-position 0) (point))
+
+ (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)
@@ -360,10 +357,6 @@ usually do not have translators for other languages.\n\n")))
(define-obsolete-function-alias 'report-emacs-bug-info 'info-emacs-bug "24.3")
-;; It's the default mail mode, so it seems OK to use its features.
-(autoload 'message-bogus-recipient-p "message")
-(defvar message-send-mail-function)
-
(defun report-emacs-bug-hook ()
"Do some checking before sending a bug report."
(save-excursion
@@ -396,7 +389,7 @@ and send the mail again%s."
(format " using \\[%s]"
report-emacs-bug-send-command)
"")))))
- (error "M-x report-emacs-bug was cancelled, please read *Bug Help* buffer"))
+ (error "M-x report-emacs-bug was canceled, please read *Bug Help* buffer"))
;; Query the user for the SMTP method, so that we can skip
;; questions about From header validity if the user is going to
;; use mailclient, anyway.
@@ -424,7 +417,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"))))))