X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/a971635315e259c076de020b3676c04d1dcc415e..0e963201d03d9229bb8ac4323291d2b0119526ed:/lisp/mail/reporter.el diff --git a/lisp/mail/reporter.el b/lisp/mail/reporter.el index 46d3746adb..5f4b3ad0cd 100644 --- a/lisp/mail/reporter.el +++ b/lisp/mail/reporter.el @@ -1,10 +1,9 @@ ;;; reporter.el --- customizable bug reporting of lisp programs -;; Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +;; Copyright (C) 1993-1998, 2001-2016 Free Software Foundation, Inc. ;; Author: 1993-1998 Barry A. Warsaw -;; Maintainer: FSF +;; Maintainer: emacs-devel@gnu.org ;; Created: 19-Apr-1993 ;; Keywords: maint mail tools @@ -174,8 +173,7 @@ composed.") MAILBUF is the mail buffer being composed." (reporter-update-status) (condition-case nil - (let ((val (save-excursion - (set-buffer reporter-eval-buffer) + (let ((val (with-current-buffer reporter-eval-buffer (symbol-value varsym))) (sym (symbol-name varsym)) (print-escape-newlines t) @@ -201,11 +199,11 @@ MAILBUF is the mail buffer being composed." (reporter-beautify-list maxwidth compact-p)))) (insert "\n")) (void-variable - (save-excursion - (set-buffer mailbuf) - (mail-position-on-field "X-Reporter-Void-Vars-Found") - (end-of-line) - (insert (symbol-name varsym) " "))) + (with-current-buffer mailbuf + (save-excursion + (mail-position-on-field "X-Reporter-Void-Vars-Found") + (end-of-line) + (insert (symbol-name varsym) " ")))) (error (error "")))) @@ -247,8 +245,7 @@ dumped." (condition-case fault (let ((mailbuf (current-buffer)) (elbuf (get-buffer-create " *tmp-reporter-buffer*"))) - (save-excursion - (set-buffer elbuf) + (with-current-buffer elbuf (emacs-lisp-mode) (erase-buffer) (insert "(setq\n") @@ -336,20 +333,19 @@ mail-sending package is used for editing and sending the message." hookvar) ;; do the work (require 'sendmail) + ;; Just in case the original buffer is not visible now, bring it + ;; back somewhere + (display-buffer reporter-eval-buffer) ;; If mailbuf did not get made visible before, make it visible now. - (let (same-window-buffer-names same-window-regexps) - (pop-to-buffer mailbuf) - ;; Just in case the original buffer is not visible now, bring it - ;; back somewhere - (and pop-up-windows (display-buffer reporter-eval-buffer))) + (pop-to-buffer mailbuf) (goto-char (point-min)) (mail-position-on-field "to") (insert address) ;; insert problem summary if available - (if (and reporter-prompt-for-summary-p problem pkgname) - (progn - (mail-position-on-field "subject") - (insert pkgname "; " problem))) + (when (and reporter-prompt-for-summary-p problem) + (mail-position-on-field "subject") + (if pkgname (insert pkgname "; ")) + (insert problem)) ;; move point to the body of the message (mail-text) (forward-line 1) @@ -410,5 +406,4 @@ mail-sending package is used for editing and sending the message." (provide 'reporter) -;; arch-tag: 33612ff4-fbbc-4be2-b183-560ce9e0199b ;;; reporter.el ends here