projects
/
gnus
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(gnus-default-adaptive-score-alist): Set defaults
[gnus]
/
lisp
/
nnoo.el
diff --git
a/lisp/nnoo.el
b/lisp/nnoo.el
index
eea499e
..
fcd50c3
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 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,8
+20,8
@@
;; 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:
;;; Commentary:
@@
-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)
@@
-103,7
+105,13
@@
(nnoo-change-server pbackend
(nnoo-current-server backend)
(cdr (assq pbackend (nnoo-parents backend))))
(nnoo-change-server pbackend
(nnoo-current-server backend)
(cdr (assq pbackend (nnoo-parents backend))))
- (apply function args)))
+ (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)))))))
(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."
@@
-112,7
+120,13
@@
(nnoo-change-server pbackend
(nnoo-current-server backend)
(cdr (assq pbackend (nnoo-parents backend))))
(nnoo-change-server pbackend
(nnoo-current-server backend)
(cdr (assq pbackend (nnoo-parents backend))))
- (apply function args)))
+ (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)))))))
(defmacro nnoo-map-functions (backend &rest maps)
`(nnoo-map-functions-1 ',backend ',maps))
(defmacro nnoo-map-functions (backend &rest maps)
`(nnoo-map-functions-1 ',backend ',maps))
@@
-187,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)))))
@@
-290,6
+304,21
@@
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.
+;;; arch-tag: 0196b5ed-6f34-4778-a455-73a971f837e7
+;;; nnoo.el ends here