+(defmacro nnoo-define-skeleton (backend)
+ "Define all required backend functions for BACKEND.
+All functions will return nil and report an error."
+ `(eval-and-compile
+ (nnoo-define-skeleton-1 ',backend)))
+
+(defun nnoo-define-skeleton-1 (backend)
+ (let ((functions '(retrieve-headers
+ request-close request-article
+ request-group close-group
+ request-list request-post request-list-newsgroups))
+ function fun)
+ (while (setq function (pop functions))
+ (when (not (fboundp (setq fun (nnoo-symbol backend function))))
+ (eval `(deffoo ,fun
+ (&rest args)
+ (nnheader-report ',backend ,(format "%s-%s not implemented"
+ backend function))))))))
+
+(defun nnoo-set (server &rest args)
+ (let ((parents (nnoo-parents (car server)))
+ (nnoo-parent-backend (car server)))
+ (while parents
+ (nnoo-change-server (caar parents)
+ (cadr server)
+ (cdar parents))
+ (pop parents)))
+ (nnoo-change-server (car server)
+ (cadr server) (cddr server))
+ (while args
+ (set (pop args) (pop args))))
+