From: Glenn Morris Date: Sun, 13 Dec 2009 23:43:17 +0000 (+0000) Subject: (report-emacs-bug): In message-mode, sort manually before storing X-Git-Tag: emacs-pretest-23.1.91~100 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2f1b7dc4a2650779f8e4801cc63adae4347fe4d2;p=emacs.git (report-emacs-bug): In message-mode, sort manually before storing original report text. (Bug#5178) Remove superfluous save-excursion. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fa6cd869ebc..27c14b00aae 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2009-12-13 Glenn Morris + + * mail/emacsbug.el (report-emacs-bug): In message-mode, sort manually + before storing original report text. (Bug#5178) + Remove superfluous save-excursion. + 2009-12-12 Michael Albinus * net/dbus.el (dbus-property-handler): Filter lambda forms out 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 ()