projects
/
gnus
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* gnus-art.el (gnus-header-from, gnus-header-subject, gnus-header-name)
[gnus]
/
lisp
/
nngateway.el
diff --git
a/lisp/nngateway.el
b/lisp/nngateway.el
index
28fd245
..
b478d10
100644
(file)
--- a/
lisp/nngateway.el
+++ b/
lisp/nngateway.el
@@
-1,7
+1,9
@@
;;; nngateway.el --- posting news via mail gateways
;;; nngateway.el --- posting news via mail gateways
-;; Copyright (C) 1996,97 Free Software Foundation, Inc.
-;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
+;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+;; 2005, 2006, 2007 Free Software Foundation, Inc.
+
+;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news, mail
;; This file is part of GNU Emacs.
;; Keywords: news, mail
;; This file is part of GNU Emacs.
@@
-18,13
+20,14
@@
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 5
9 Temple Place - Suite 330
,
-;; Boston, MA 0211
1-1307
, USA.
+;; Free Software Foundation, Inc., 5
1 Franklin Street, Fifth Floor
,
+;; Boston, MA 0211
0-1301
, USA.
;;; Commentary:
;;; Code:
;;; Commentary:
;;; Code:
+(eval-when-compile (require 'cl))
(require 'nnoo)
(require 'message)
(require 'nnoo)
(require 'message)
@@
-54,7
+57,7
@@
parameter -- the gateway address.")
(nngateway-open-server server))
;; Rewrite the header.
(let ((buf (current-buffer)))
(nngateway-open-server server))
;; Rewrite the header.
(let ((buf (current-buffer)))
- (
nnheader-temp-write nil
+ (
with-temp-buffer
(insert-buffer-substring buf)
(message-narrow-to-head)
(funcall nngateway-header-transformation nngateway-address)
(insert-buffer-substring buf)
(message-narrow-to-head)
(funcall nngateway-header-transformation nngateway-address)
@@
-62,7
+65,9
@@
parameter -- the gateway address.")
(insert mail-header-separator "\n")
(widen)
(let (message-required-mail-headers)
(insert mail-header-separator "\n")
(widen)
(let (message-required-mail-headers)
- (funcall message-send-mail-function))))))
+ (funcall (or message-send-mail-real-function
+ message-send-mail-function)))
+ t))))
;;; Internal functions
;;; Internal functions
@@
-75,8
+80,16
@@
parameter -- the gateway address.")
(insert "To: " (nnheader-replace-chars-in-string newsgroups ?. ?-)
"@" gateway "\n")))
(insert "To: " (nnheader-replace-chars-in-string newsgroups ?. ?-)
"@" gateway "\n")))
+(defun nngateway-mail2news-header-transformation (gateway)
+ "Transform the headers for sending to a mail2news gateway."
+ (message-remove-header "to")
+ (message-remove-header "cc")
+ (goto-char (point-min))
+ (insert "To: " gateway "\n"))
+
(nnoo-define-skeleton nngateway)
(provide 'nngateway)
(nnoo-define-skeleton nngateway)
(provide 'nngateway)
+;;; arch-tag: f7ecb92e-b10c-43d5-9a9b-1314233341fc
;;; nngateway.el ends here
;;; nngateway.el ends here