aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeder O. Klingenberg2014-11-15 16:22:29 +0100
committerLars Magne Ingebrigtsen2014-11-15 16:22:29 +0100
commit20478c2bd3eab268136b47d14cdee2442efb6ba9 (patch)
tree624f4de24aa83c282b4db79ea47d27cd2e88f881
parentb8c9a4e36dc3525fa03e0e0d862693dc26137b5f (diff)
downloademacs-20478c2bd3eab268136b47d14cdee2442efb6ba9.tar.gz
emacs-20478c2bd3eab268136b47d14cdee2442efb6ba9.zip
(report-emacs-bug): Make a better guess at envelope-from
Fixes: debbugs:19054 * mail/emacsbug.el (report-emacs-bug): Make a better guess at envelope-from when reporting through sendmail.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/mail/emacsbug.el17
2 files changed, 17 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a6ab3b87e43..107b9956194 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12014-10-28 Peder O. Klingenberg <peder@klingenberg.no>
2
3 * mail/emacsbug.el (report-emacs-bug): Make a better guess at
4 envelope-from when reporting through sendmail (bug#19054).
5
12014-11-14 Ivan Andrus <darthandrus@gmail.com> 62014-11-14 Ivan Andrus <darthandrus@gmail.com>
2 7
3 * progmodes/python.el (python-ffap-module-path): Use 8 * progmodes/python.el (python-ffap-module-path): Use
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index 329a3209cee..4cfd3e2051e 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -142,6 +142,12 @@ This requires either the OS X \"open\" command, or the freedesktop
142 (concat "mailto:" to))) 142 (concat "mailto:" to)))
143 (error "Subject, To or body not found"))))) 143 (error "Subject, To or body not found")))))
144 144
145;; It's the default mail mode, so it seems OK to use its features.
146(autoload 'message-bogus-recipient-p "message")
147(autoload 'message-make-address "message")
148(defvar message-send-mail-function)
149(defvar message-sendmail-envelope-from)
150
145;;;###autoload 151;;;###autoload
146(defun report-emacs-bug (topic &optional unused) 152(defun report-emacs-bug (topic &optional unused)
147 "Report a bug in GNU Emacs. 153 "Report a bug in GNU Emacs.
@@ -169,7 +175,12 @@ Prompts for bug subject. Leaves you in a mail buffer."
169 ;; that report-emacs-bug-orig-text remains valid. (Bug#5178) 175 ;; that report-emacs-bug-orig-text remains valid. (Bug#5178)
170 (message-sort-headers) 176 (message-sort-headers)
171 ;; Stop message-mode stealing the properties we will add. 177 ;; Stop message-mode stealing the properties we will add.
172 (set (make-local-variable 'message-strip-special-text-properties) nil)) 178 (set (make-local-variable 'message-strip-special-text-properties) nil)
179 ;; Make sure we default to the From: address as envelope when sending
180 ;; through sendmail.
181 (when (and (not message-sendmail-envelope-from)
182 (message-bogus-recipient-p (message-make-address)))
183 (set (make-local-variable 'message-sendmail-envelope-from) 'header)))
173 (rfc822-goto-eoh) 184 (rfc822-goto-eoh)
174 (forward-line 1) 185 (forward-line 1)
175 ;; Move the mail signature to the proper place. 186 ;; Move the mail signature to the proper place.
@@ -349,10 +360,6 @@ usually do not have translators for other languages.\n\n")))
349 360
350(define-obsolete-function-alias 'report-emacs-bug-info 'info-emacs-bug "24.3") 361(define-obsolete-function-alias 'report-emacs-bug-info 'info-emacs-bug "24.3")
351 362
352;; It's the default mail mode, so it seems OK to use its features.
353(autoload 'message-bogus-recipient-p "message")
354(defvar message-send-mail-function)
355
356(defun report-emacs-bug-hook () 363(defun report-emacs-bug-hook ()
357 "Do some checking before sending a bug report." 364 "Do some checking before sending a bug report."
358 (save-excursion 365 (save-excursion