+2009-12-13 Glenn Morris <rgm@gnu.org>
+
+ * 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 <michael.albinus@gmx.de>
* net/dbus.el (dbus-property-handler): Filter lambda forms out
(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)
;; 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 ()