# HG changeset patch # User Richard M. Stallman # Date 868043291 0 # Node ID 9e7f6d07413886257d76a4b78768e4ec295d34fc # Parent a7dd2801b909794b0a3bca6f0d4aa15a3d6396e6 (report-emacs-bug): Don't include messages in *Messages* generated by report-emacs-bug itself. diff -r a7dd2801b909 -r 9e7f6d074138 lisp/mail/emacsbug.el --- a/lisp/mail/emacsbug.el Fri Jul 04 18:56:19 1997 +0000 +++ b/lisp/mail/emacsbug.el Fri Jul 04 19:08:11 1997 +0000 @@ -54,7 +54,10 @@ ;; the bug subject string is read. (interactive (reverse (list (recent-keys) (read-string "Bug Subject: ")))) (condition-case nil - (let (user-point) + (let (user-point message-end-point) + (setq message-end-point + (with-current-buffer (get-buffer "*Messages*") + (point-max-marker))) (compose-mail (if (string-match "\\..*\\..*\\." emacs-version) ;; If there are four numbers in emacs-version, ;; this is a pretest version. @@ -93,17 +96,14 @@ (insert "\n")))) (let ((message-buf (get-buffer "*Messages*"))) (if message-buf - (progn + (let (beg-pos + (end-pos message-end-point)) + (with-current-buffer message-buf + (goto-char end-pos) + (forward-line -10) + (setq beg-pos (point))) (insert "\n\nRecent messages:\n") - (insert-buffer-substring message-buf - (save-excursion - (set-buffer message-buf) - (goto-char (point-max)) - (forward-line -10) - (point)) - (save-excursion - (set-buffer message-buf) - (point-max)))))) + (insert-buffer-substring message-buf beg-pos end-pos)))) ;; This is so the user has to type something ;; in order to send easily. (use-local-map (nconc (make-sparse-keymap) (current-local-map)))