;;; gnus-int.el --- backend interface functions for Gnus
;; Copyright (C) 1996,97,98 Free Software Foundation, Inc.
-;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
+;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
;; This file is part of GNU Emacs.
(cdr method-fnlist-elt))))
;; Maybe complain if there is no function.
(unless (fboundp func)
+ (unless (car method)
+ (error "Trying to require a method that doesn't exist"))
(require (car method))
- (when (and (not (fboundp func))
- (not noerror))
- (error "No such function: %s" func)))
+ (when (not (fboundp func))
+ (if noerror
+ (setq func nil)
+ (error "No such function: %s" func))))
func))
\f
(gnus-group-real-name group) article))))
(defun gnus-request-update-mark (group article mark)
- "Return the type (`post' or `mail') of GROUP (and ARTICLE)."
+ "Allow the backend to change the mark the user tries to put on an article."
(let ((gnus-command-method (gnus-find-method-for-group group)))
(if (not (gnus-check-backend-function
'request-update-mark (car gnus-command-method)))
(goto-char (point-max))
(unless (bolp)
(insert "\n"))
+ (save-restriction
+ (message-narrow-to-headers)
+ (rfc2047-encode-message-header))
+ (message-encode-message-body)
(let ((func (car (or gnus-command-method
(gnus-find-method-for-group group)))))
(funcall (intern (format "%s-request-accept-article" func))
last)))
(defun gnus-request-replace-article (article group buffer)
+ (save-restriction
+ (message-narrow-to-headers)
+ (rfc2047-encode-message-header))
+ (message-encode-message-body)
(let ((func (car (gnus-group-name-to-method group))))
(funcall (intern (format "%s-request-replace-article" func))
article (gnus-group-real-name group) buffer)))