diff options
author | Karl Heuer <kwzh@gnu.org> | 1995-12-21 19:02:46 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1995-12-21 19:02:46 +0000 |
commit | 6a1de14a050023998ccc636a28a415a2c9f73c4b (patch) | |
tree | 18ae6722f0def76e3f504c01a04918c7a6c6f3a0 /lisp/mail/emacsbug.el | |
parent | 2afdd231f81e37164745aa242c7f27487865cb7b (diff) | |
download | emacs-6a1de14a050023998ccc636a28a415a2c9f73c4b.tar.gz |
(report-emacs-bug): Don't die if *Messages* buf is gone.
Diffstat (limited to 'lisp/mail/emacsbug.el')
-rw-r--r-- | lisp/mail/emacsbug.el | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index fe6b52f7cc0..9d5afd601a2 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el @@ -77,17 +77,19 @@ Prompts for bug subject. Leaves you in a mail buffer." (while (progn (move-to-column 50) (not (eobp))) (search-forward " " nil t) (insert "\n"))) - (insert "\n\n") - (insert "Recent messages:\n") - (insert-buffer-substring "*Messages*" - (save-excursion - (set-buffer "*Messages*") - (goto-char (point-max)) - (forward-line -10) - (point)) - (save-excursion - (set-buffer "*Messages*") - (point-max))) + (let ((message-buf (get-buffer "*Messages*"))) + (if message-buf + (progn + (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)))))) ;; This is so the user has to type something ;; in order to send easily. (use-local-map (nconc (make-sparse-keymap) (current-local-map))) |