projects
/
elisp
/
gnus.git-
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add "Changing Servers".
[elisp/gnus.git-]
/
lisp
/
nnoo.el
diff --git
a/lisp/nnoo.el
b/lisp/nnoo.el
index
c28c888
..
37ac4bb
100644
(file)
--- a/
lisp/nnoo.el
+++ b/
lisp/nnoo.el
@@
-1,5
+1,5
@@
;;; nnoo.el --- OO Gnus Backends
;;; nnoo.el --- OO Gnus Backends
-;; Copyright (C) 1996,97 Free Software Foundation, Inc.
+;; Copyright (C) 1996,97,98 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
;; Keywords: news
;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
;; Keywords: news
@@
-103,7
+103,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
+118,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))
@@
-189,7
+201,9
@@
(nconc bvariables
(list (cons (car def) (and (boundp (car def))
(symbol-value (car def)))))))
(nconc bvariables
(list (cons (car def) (and (boundp (car def))
(symbol-value (car 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)))))
(while parents
(nnoo-change-server
(caar parents) (format "%s+%s" backend server)
(while parents
(nnoo-change-server
(caar parents) (format "%s+%s" backend server)
@@
-219,7
+233,10
@@
(nconc bstate (list (cons current state))))))
(defsubst nnoo-current-server-p (backend server)
(nconc bstate (list (cons current state))))))
(defsubst nnoo-current-server-p (backend server)
- (equal (nnoo-current-server backend) server))
+ (equal (nnoo-current-server backend)
+ (if nnoo-parent-backend
+ (format "%s+%s" nnoo-parent-backend server)
+ server)))
(defun nnoo-current-server (backend)
(nth 1 (assq backend nnoo-state-alist)))
(defun nnoo-current-server (backend)
(nth 1 (assq backend nnoo-state-alist)))