projects
/
elisp
/
gnus.git-
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Synch to No Gnus 200509052359.
[elisp/gnus.git-]
/
lisp
/
nnoo.el
diff --git
a/lisp/nnoo.el
b/lisp/nnoo.el
index
37ac4bb
..
736d90f
100644
(file)
--- a/
lisp/nnoo.el
+++ b/
lisp/nnoo.el
@@
-1,7
+1,9
@@
;;; nnoo.el --- OO Gnus Backends
;;; nnoo.el --- OO Gnus Backends
-;; Copyright (C) 1996,97,98 Free Software Foundation, Inc.
-;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
+;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+;; 2004, 2005 Free Software Foundation, Inc.
+
+;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
;; This file is part of GNU Emacs.
;; Keywords: news
;; This file is part of GNU Emacs.
@@
-18,15
+20,15
@@
;; 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., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Commentary:
;;; Code:
;;; Commentary:
;;; Code:
-(require 'nnheader)
(eval-when-compile (require 'cl))
(eval-when-compile (require 'cl))
+(require 'nnheader)
(defvar nnoo-definition-alist nil)
(defvar nnoo-state-alist nil)
(defvar nnoo-definition-alist nil)
(defvar nnoo-state-alist nil)
@@
-36,7
+38,7
@@
"The same as `defvar', only takes list of variables to MAP to."
`(prog1
,(if doc
"The same as `defvar', only takes list of variables to MAP to."
`(prog1
,(if doc
- `(defvar ,var ,init ,doc)
+ `(defvar ,var ,init ,(concat doc "\n\nThis is a Gnus server variable. See Info node `(gnus)Select Methods'."))
`(defvar ,var ,init))
(nnoo-define ',var ',map)))
(put 'defvoo 'lisp-indent-function 2)
`(defvar ,var ,init))
(nnoo-define ',var ',map)))
(put 'defvoo 'lisp-indent-function 2)
@@
-105,11
+107,11
@@
(cdr (assq pbackend (nnoo-parents backend))))
(prog1
(apply function args)
(cdr (assq pbackend (nnoo-parents backend))))
(prog1
(apply function args)
- ;; Copy the changed variables back into the child.
- (let ((vars (cdr (assq pbackend (nnoo-parents backend)))))
- (while vars
- (set (cadar vars) (symbol-value (caar vars)))
- (setq vars (cdr vars)))))))
+ ;; Copy the changed variables back into the child.
+ (let ((vars (cdr (assq pbackend (nnoo-parents backend)))))
+ (while vars
+ (set (cadar vars) (symbol-value (caar vars)))
+ (setq vars (cdr vars)))))))
(defun nnoo-execute (backend function &rest args)
"Execute FUNCTION on behalf of BACKEND."
(defun nnoo-execute (backend function &rest args)
"Execute FUNCTION on behalf of BACKEND."
@@
-199,8
+201,8
@@
(while (setq def (pop defs))
(unless (assq (car def) bvariables)
(nconc bvariables
(while (setq def (pop defs))
(unless (assq (car def) bvariables)
(nconc bvariables
- (list (cons (car def) (and (boundp (car def))
- (symbol-value (car def)))))))
+ (list (cons (car def) (and (boundp (car def))
+ (symbol-value (car def)))))))
(if (equal server "*internal-non-initialized-backend*")
(set (car def) (symbol-value (cadr def)))
(set (car def) (cadr def)))))
(if (equal server "*internal-non-initialized-backend*")
(set (car def) (symbol-value (cadr def)))
(set (car def) (cadr def)))))
@@
-302,6
+304,20
@@
All functions will return nil and report an error."
(&rest args)
(nnheader-report ',backend ,(format "%s-%s not implemented"
backend function))))))))
(&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))))
+
(provide 'nnoo)
(provide 'nnoo)
-;;; nnoo.el ends here.
+;;; nnoo.el ends here