Mercurial > emacs
comparison 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 |
comparison
equal
deleted
inserted
replaced
106562:0d89cb5de442 | 106563:b07b0e49769d |
---|---|
104 user-point message-end-point) | 104 user-point message-end-point) |
105 (setq message-end-point | 105 (setq message-end-point |
106 (with-current-buffer (get-buffer-create "*Messages*") | 106 (with-current-buffer (get-buffer-create "*Messages*") |
107 (point-max-marker))) | 107 (point-max-marker))) |
108 (compose-mail reporting-address topic) | 108 (compose-mail reporting-address topic) |
109 ;; The rest of this does not execute | 109 ;; The rest of this does not execute if the user was asked to |
110 ;; if the user was asked to confirm and said no. | 110 ;; confirm and said no. |
111 ;; Message-mode sorts the headers before sending. We sort now so | |
112 ;; that report-emacs-bug-orig-text remains valid. (Bug#5178) | |
113 (if (eq major-mode 'message-mode) | |
114 (message-sort-headers)) | |
111 (rfc822-goto-eoh) | 115 (rfc822-goto-eoh) |
112 (forward-line 1) | 116 (forward-line 1) |
113 | |
114 (let ((signature (buffer-substring (point) (point-max)))) | 117 (let ((signature (buffer-substring (point) (point-max)))) |
115 (delete-region (point) (point-max)) | 118 (delete-region (point) (point-max)) |
116 (insert signature) | 119 (insert signature) |
117 (backward-char (length signature))) | 120 (backward-char (length signature))) |
118 (unless report-emacs-bug-no-explanations | 121 (unless report-emacs-bug-no-explanations |
260 information you should include to help fix the bug."))) | 263 information you should include to help fix the bug."))) |
261 (shrink-window-if-larger-than-buffer (get-buffer-window "*Bug Help*"))) | 264 (shrink-window-if-larger-than-buffer (get-buffer-window "*Bug Help*"))) |
262 ;; Make it less likely people will send empty messages. | 265 ;; Make it less likely people will send empty messages. |
263 (if report-emacs-bug-send-hook | 266 (if report-emacs-bug-send-hook |
264 (add-hook report-emacs-bug-send-hook 'report-emacs-bug-hook nil t)) | 267 (add-hook report-emacs-bug-send-hook 'report-emacs-bug-hook nil t)) |
265 (save-excursion | 268 (goto-char (point-max)) |
266 (goto-char (point-max)) | 269 (skip-chars-backward " \t\n") |
267 (skip-chars-backward " \t\n") | 270 (make-local-variable 'report-emacs-bug-orig-text) |
268 (make-local-variable 'report-emacs-bug-orig-text) | 271 (setq report-emacs-bug-orig-text |
269 (setq report-emacs-bug-orig-text | 272 (buffer-substring-no-properties (point-min) (point))) |
270 (buffer-substring-no-properties (point-min) (point)))) | |
271 (goto-char user-point))) | 273 (goto-char user-point))) |
272 | 274 |
273 (defun report-emacs-bug-info () | 275 (defun report-emacs-bug-info () |
274 "Go to the Info node on reporting Emacs bugs." | 276 "Go to the Info node on reporting Emacs bugs." |
275 (interactive) | 277 (interactive) |