Anonymous avatar Anonymous committed a81a54a

2001-10-06 Simon Josefsson <jas@extundo.com>;

Emacs 21 sync.

* reporter.el (top-level): Remove outdated version and last
modified fields.
(reporter-calculate-separator): Remove.
(reporter-submit-bug-report): Don't use it. This may be bogus, if
it causes problems, revert.
(reporter-bug-hook): Ditto, use `rfc822-goto-eoh' instead.
(reporter-submit-bug-report): Doc fix for font-locking.

2001-07-15 Stefan Monnier <monnier@cs.yale.edu>;

* reporter.el (reporter-submit-bug-report):
Don't abuse make-variable-buffer-local. Fix call to add-hook.

2000-05-26 Dave Love <fx@gnu.org>;

* reporter.el (reporter-version): Deleted.

Comments (0)

Files changed (2)

+2001-10-06  Simon Josefsson  <jas@extundo.com>
+
+	Emacs 21 sync.
+
+	* reporter.el (top-level): Remove outdated version and last
+	modified fields.
+	(reporter-calculate-separator): Remove.
+	(reporter-submit-bug-report): Don't use it.  This may be bogus, if
+	it causes problems, revert.
+	(reporter-bug-hook): Ditto, use `rfc822-goto-eoh' instead.
+	(reporter-submit-bug-report): Doc fix for font-locking.
+
+2001-07-15  Stefan Monnier  <monnier@cs.yale.edu>
+
+	* reporter.el (reporter-submit-bug-report):
+	Don't abuse make-variable-buffer-local.  Fix call to add-hook.
+
+2000-05-26  Dave Love  <fx@gnu.org>
+
+	* reporter.el (reporter-version): Deleted.
+
 2001-10-10  Simon Josefsson  <jas@extundo.com>
 
 	* mail-utils.el (mail-check-safe-charset): Fix typo.
 ;; Author:          1993-1998 Barry A. Warsaw
 ;; Maintainer:      XEmacs Development Team
 ;; Created:         19-Apr-1993
-;; Version:         3.35
-;; Last Modified:   1998/03/20 22:52:44
 ;; Keywords: maint mail tools
 
 ;; This file is part of GNU Emacs.
 variables.  Current buffer will always be the mail buffer being
 composed.")
 
-(defconst reporter-version "3.35"
-  "Reporter version number.")
-
 (defvar reporter-initial-text nil
   "The automatically created initial text of a bug report.")
 (make-variable-buffer-local 'reporter-initial-text)
     ))
 
 
-(defun reporter-calculate-separator ()
-  ;; returns the string regexp matching the mail separator
-  (save-excursion
-    (re-search-forward
-     (concat
-      "^\\("				;beginning of line
-      (mapconcat
-       'identity
-       (list "[\t ]*"			;simple SMTP form
-	     "-+"			;mh-e form
-	     (regexp-quote 
-	      mail-header-separator))	;sendmail.el form
-       "\\|")				;or them together
-      "\\)$")				;end of line
-     nil
-     'move)				;search for and move
-    (buffer-substring (match-beginning 0) (match-end 0))))
-
-
 (defun reporter-compose-outgoing ()
   "Compose the outgoing mail buffer.
 
 
 This function does not send a message; it uses the given information
 to initialize a a messagem, which the user can then edit and finally send
-(or decline to send).  The variable `mail-user-agent' controls which
+\(or decline to send).  The variable `mail-user-agent' controls which
 mail-sending package is used for editing and sending the message."
   (let ((reporter-eval-buffer (current-buffer))
 	final-resting-place
       ;; back somewhere
       (and pop-up-windows (display-buffer reporter-eval-buffer)))
     (goto-char (point-min))
-    ;; different mailers use different separators, some may not even
-    ;; use mail-header-separator, but sendmail.el stuff must have this
-    ;; variable bound.
-    (let ((mail-header-separator (reporter-calculate-separator)))
-      (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)))
-      ;; move point to the body of the message
-      (mail-text)
-      (forward-line 1)
-      (setq after-sep-pos (point))
-      (and salutation (insert "\n" salutation "\n\n"))
-      (unwind-protect
-	  (progn
-	    (setq final-resting-place (point-marker))
-	    (insert "\n\n")
-	    (reporter-dump-state pkgname varlist pre-hooks post-hooks)
-	    (goto-char final-resting-place))
-	(set-marker final-resting-place nil)))
+    (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)))
+    ;; move point to the body of the message
+    (mail-text)
+    (forward-line 1)
+    (setq after-sep-pos (point))
+    (and salutation (insert "\n" salutation "\n\n"))
+    (unwind-protect
+	(progn
+	  (setq final-resting-place (point-marker))
+	  (insert "\n\n")
+	  (reporter-dump-state pkgname varlist pre-hooks post-hooks)
+	  (goto-char final-resting-place))
+      (set-marker final-resting-place nil))
 
     ;; save initial text and set up the `no-empty-submission' hook.
     ;; This only works for mailers that support a pre-send hook, and
       (skip-chars-backward " \t\n")
       (setq reporter-initial-text (buffer-substring after-sep-pos (point))))
     (if (setq hookvar (get agent 'hookvar))
-	(progn
-	  (make-variable-buffer-local hookvar)
-	  (add-hook hookvar 'reporter-bug-hook)))
+	(add-hook hookvar 'reporter-bug-hook nil t))
 
     ;; compose the minibuf message and display this.
     (let* ((sendkey-whereis (where-is-internal
   "Prohibit sending mail if empty bug report."
   (let ((after-sep-pos
 	 (save-excursion
-	   (beginning-of-buffer)
-	   (re-search-forward (reporter-calculate-separator) (point-max) 'move)
+	   (rfc822-goto-eoh)
 	   (forward-line 1)
 	   (point))))
     (save-excursion
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.