]> code.delx.au - gnu-emacs/blobdiff - lisp/mail/reporter.el
Update copyright year to 2016
[gnu-emacs] / lisp / mail / reporter.el
index 45700d4d60d250860e8885fedf3c86094714875f..5f4b3ad0cd4ae568ace4d9a2c76bd1b6a97ad870 100644 (file)
@@ -1,9 +1,9 @@
 ;;; reporter.el --- customizable bug reporting of lisp programs
 
-;; Copyright (C) 1993-1998, 2001-2011 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
 
@@ -200,9 +200,10 @@ MAILBUF is the mail buffer being composed."
        (insert "\n"))
     (void-variable
      (with-current-buffer mailbuf
-       (mail-position-on-field "X-Reporter-Void-Vars-Found")
-       (end-of-line)
-       (insert (symbol-name varsym) " ")))
+       (save-excursion
+        (mail-position-on-field "X-Reporter-Void-Vars-Found")
+        (end-of-line)
+        (insert (symbol-name varsym) " "))))
     (error
      (error ""))))
 
@@ -332,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)