diff options
author | Glenn Morris <rgm@gnu.org> | 2009-12-13 23:43:17 +0000 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2009-12-13 23:43:17 +0000 |
commit | 2f1b7dc4a2650779f8e4801cc63adae4347fe4d2 (patch) | |
tree | b41cb5bd0f887687c9dec530e765e4378efa70c6 /lisp/mail | |
parent | 029dda9c93b536a9677c22e841f74ab8ca97bf87 (diff) | |
download | emacs-2f1b7dc4a2650779f8e4801cc63adae4347fe4d2.tar.gz |
(report-emacs-bug): In message-mode, sort manually before storing
original report text. (Bug#5178)
Remove superfluous save-excursion.
Diffstat (limited to 'lisp/mail')
-rw-r--r-- | lisp/mail/emacsbug.el | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index 2ecca76b5f9..9fafab565b5 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el @@ -106,11 +106,14 @@ Prompts for bug subject. Leaves you in a mail buffer." (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 @@ usually do not have translators to read other languages for them.\n\n") ;; 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 () |