# HG changeset patch # User Richard M. Stallman # Date 889863412 0 # Node ID 17ad035e0cab9d4fb7fa6956f248ef58fc5520c4 # Parent e917eb0d4e011492c3ca28cc495a3968639d46fc (news-inews): Signal error if inews fails. diff -r e917eb0d4e01 -r 17ad035e0cab lisp/mail/rnewspost.el --- a/lisp/mail/rnewspost.el Sat Mar 14 08:15:36 1998 +0000 +++ b/lisp/mail/rnewspost.el Sat Mar 14 08:16:52 1998 +0000 @@ -271,18 +271,21 @@ (or (= (preceding-char) ?\n) (insert ?\n)) (message "Posting to USENET...") - (call-process-region (point-min) (point-max) - news-inews-program nil 0 nil - "-h") ; take all header lines! - ;@@ setting of subject and newsgroups still needed? - ;"-t" subject - ;"-n" newsgroups - (message "Posting to USENET... done") - (goto-char (point-min)) ;restore internal header separator - (search-forward "\n\n") - (replace-match (concat "\n" mail-header-separator "\n")) - (set-buffer-modified-p nil)) - (and (fboundp 'bury-buffer) (bury-buffer)))) + (unwind-protect + (if (not (eq 0 + (call-process-region (point-min) (point-max) + news-inews-program nil 0 nil + "-h"))) ; take all header lines! + ;@@ setting of subject and newsgroups still needed? + ;"-t" subject + ;"-n" newsgroups + (error "Posting to USENET failed") + (message "Posting to USENET... done")) + (goto-char (point-min)) ;restore internal header separator + (search-forward "\n\n") + (replace-match (concat "\n" mail-header-separator "\n")) + (set-buffer-modified-p nil))) + (bury-buffer))) ;@@ shares some code with news-reply and news-post-news (defun news-mail-reply ()