Mercurial > emacs
diff lisp/mail/emacsbug.el @ 106563:b07b0e49769d
(report-emacs-bug): In message-mode, sort manually before storing
original report text. (Bug#5178)
Remove superfluous save-excursion.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sun, 13 Dec 2009 23:43:17 +0000 |
parents | e5b7752075ef |
children | 18ebc6fe2cc9 |
line wrap: on
line diff
--- a/lisp/mail/emacsbug.el Sun Dec 13 19:14:28 2009 +0000 +++ b/lisp/mail/emacsbug.el Sun Dec 13 23:43:17 2009 +0000 @@ -106,11 +106,14 @@ (with-current-buffer (get-buffer-create "*Messages*") (point-max-marker))) (compose-mail reporting-address topic) - ;; The rest of this does not execute - ;; if the user was asked to confirm and said no. + ;; The rest of this does not execute if the user was asked to + ;; confirm and said no. + ;; Message-mode sorts the headers before sending. We sort now so + ;; that report-emacs-bug-orig-text remains valid. (Bug#5178) + (if (eq major-mode 'message-mode) + (message-sort-headers)) (rfc822-goto-eoh) (forward-line 1) - (let ((signature (buffer-substring (point) (point-max)))) (delete-region (point) (point-max)) (insert signature) @@ -262,12 +265,11 @@ ;; Make it less likely people will send empty messages. (if report-emacs-bug-send-hook (add-hook report-emacs-bug-send-hook 'report-emacs-bug-hook nil t)) - (save-excursion - (goto-char (point-max)) - (skip-chars-backward " \t\n") - (make-local-variable 'report-emacs-bug-orig-text) - (setq report-emacs-bug-orig-text - (buffer-substring-no-properties (point-min) (point)))) + (goto-char (point-max)) + (skip-chars-backward " \t\n") + (make-local-variable 'report-emacs-bug-orig-text) + (setq report-emacs-bug-orig-text + (buffer-substring-no-properties (point-min) (point))) (goto-char user-point))) (defun report-emacs-bug-info ()