diff options
| author | Richard M. Stallman | 1998-04-30 06:24:03 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-04-30 06:24:03 +0000 |
| commit | fc48f3818e66d4094347c56b43141ef0f1a6480d (patch) | |
| tree | b732f65cc70d14a11c2adc256fe9cc83fb6eaf37 | |
| parent | c7ed80bcf72b02526518916150204a097dcdab8c (diff) | |
| download | emacs-fc48f3818e66d4094347c56b43141ef0f1a6480d.tar.gz emacs-fc48f3818e66d4094347c56b43141ef0f1a6480d.zip | |
(reporter-calculate-separator): Function deleted.
(reporter-submit-bug-report): Major rewrite.
| -rw-r--r-- | lisp/mail/reporter.el | 61 |
1 files changed, 19 insertions, 42 deletions
diff --git a/lisp/mail/reporter.el b/lisp/mail/reporter.el index ce245d76b85..748237dea05 100644 --- a/lisp/mail/reporter.el +++ b/lisp/mail/reporter.el | |||
| @@ -286,25 +286,6 @@ composed.") | |||
| 286 | )) | 286 | )) |
| 287 | 287 | ||
| 288 | 288 | ||
| 289 | (defun reporter-calculate-separator () | ||
| 290 | ;; returns the string regexp matching the mail separator | ||
| 291 | (save-excursion | ||
| 292 | (re-search-forward | ||
| 293 | (concat | ||
| 294 | "^\\(" ;beginning of line | ||
| 295 | (mapconcat | ||
| 296 | 'identity | ||
| 297 | (list "[\t ]*" ;simple SMTP form | ||
| 298 | "-+" ;mh-e form | ||
| 299 | (regexp-quote | ||
| 300 | mail-header-separator)) ;sendmail.el form | ||
| 301 | "\\|") ;or them together | ||
| 302 | "\\)$") ;end of line | ||
| 303 | nil | ||
| 304 | 'move) ;search for and move | ||
| 305 | (buffer-substring (match-beginning 0) (match-end 0)))) | ||
| 306 | |||
| 307 | |||
| 308 | (defun reporter-compose-outgoing () | 289 | (defun reporter-compose-outgoing () |
| 309 | ;; compose the outgoing mail buffer, and return the selected | 290 | ;; compose the outgoing mail buffer, and return the selected |
| 310 | ;; paradigm, with the current-buffer tacked onto the beginning of | 291 | ;; paradigm, with the current-buffer tacked onto the beginning of |
| @@ -364,29 +345,25 @@ composed.") | |||
| 364 | ;; back somewhere | 345 | ;; back somewhere |
| 365 | (and pop-up-windows (display-buffer reporter-eval-buffer))) | 346 | (and pop-up-windows (display-buffer reporter-eval-buffer))) |
| 366 | (goto-char (point-min)) | 347 | (goto-char (point-min)) |
| 367 | ;; different mailers use different separators, some may not even | 348 | (mail-position-on-field "to") |
| 368 | ;; use mail-header-separator, but sendmail.el stuff must have this | 349 | (insert address) |
| 369 | ;; variable bound. | 350 | ;; insert problem summary if available |
| 370 | (let ((mail-header-separator (reporter-calculate-separator))) | 351 | (if (and reporter-prompt-for-summary-p problem pkgname) |
| 371 | (mail-position-on-field "to") | 352 | (progn |
| 372 | (insert address) | 353 | (mail-position-on-field "subject") |
| 373 | ;; insert problem summary if available | 354 | (insert pkgname "; " problem))) |
| 374 | (if (and reporter-prompt-for-summary-p problem pkgname) | 355 | ;; move point to the body of the message |
| 375 | (progn | 356 | (mail-text) |
| 376 | (mail-position-on-field "subject") | 357 | (forward-line 1) |
| 377 | (insert pkgname "; " problem))) | 358 | (setq after-sep-pos (point)) |
| 378 | ;; move point to the body of the message | 359 | (and salutation (insert "\n" salutation "\n\n")) |
| 379 | (mail-text) | 360 | (unwind-protect |
| 380 | (forward-line 1) | 361 | (progn |
| 381 | (setq after-sep-pos (point)) | 362 | (setq final-resting-place (point-marker)) |
| 382 | (and salutation (insert "\n" salutation "\n\n")) | 363 | (insert "\n\n") |
| 383 | (unwind-protect | 364 | (reporter-dump-state pkgname varlist pre-hooks post-hooks) |
| 384 | (progn | 365 | (goto-char final-resting-place)) |
| 385 | (setq final-resting-place (point-marker)) | 366 | (set-marker final-resting-place nil)) |
| 386 | (insert "\n\n") | ||
| 387 | (reporter-dump-state pkgname varlist pre-hooks post-hooks) | ||
| 388 | (goto-char final-resting-place)) | ||
| 389 | (set-marker final-resting-place nil))) | ||
| 390 | 367 | ||
| 391 | ;; save initial text and set up the `no-empty-submission' hook. | 368 | ;; save initial text and set up the `no-empty-submission' hook. |
| 392 | ;; This only works for mailers that support a pre-send hook, and | 369 | ;; This only works for mailers that support a pre-send hook, and |