;;; emacsbug.el --- command to report Emacs bugs to appropriate mailing list
-;; Copyright (C) 1985, 1994, 1997-1998, 2000-2014 Free Software
+;; Copyright (C) 1985, 1994, 1997-1998, 2000-2015 Free Software
;; Foundation, Inc.
;; Author: K. Shane Hartman
(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
(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 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.
(declare (advertised-calling-convention (topic) "24.5"))
- (interactive (reverse (list (recent-keys) (read-string "Bug Subject: "))))
+ (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)
;; 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.
(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)
(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