aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorLars Ingebrigtsen2011-02-27 08:20:21 +0000
committerKatsumi Yamaoka2011-02-27 08:20:21 +0000
commit85e75dedc0c45d92a2c03357433cfeb414fd7dc6 (patch)
tree9fd01c532e55041d32fd3a58e6565aaf6cefb314 /lisp
parenta4d4252bfb3ef85dd735c6d5e3b5bd3763e78346 (diff)
downloademacs-85e75dedc0c45d92a2c03357433cfeb414fd7dc6.tar.gz
emacs-85e75dedc0c45d92a2c03357433cfeb414fd7dc6.zip
gnus-group.el (gnus-import-other-newsrc-file): New function.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/gnus/ChangeLog4
-rw-r--r--lisp/gnus/gnus-group.el15
-rw-r--r--lisp/gnus/gnus.el4
3 files changed, 23 insertions, 0 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 3eb7a477dd1..d0660545844 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,7 @@
12011-02-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * gnus-group.el (gnus-import-other-newsrc-file): New function.
4
12011-02-25 Teodor Zlatanov <tzz@lifelogs.com> 52011-02-25 Teodor Zlatanov <tzz@lifelogs.com>
2 6
3 * auth-source.el (auth-source-search): Cache empty result sets. 7 * auth-source.el (auth-source-search): Cache empty result sets.
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 30cd1275e7b..832cd758b61 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -4400,6 +4400,21 @@ and the second element is the address."
4400(defun gnus-group-set-params-info (group params) 4400(defun gnus-group-set-params-info (group params)
4401 (gnus-group-set-info params group 'params)) 4401 (gnus-group-set-info params group 'params))
4402 4402
4403;; Ad-hoc function for inserting data from a different newsrc.eld
4404;; file. Use with caution, if at all.
4405(defun gnus-import-other-newsrc-file (file)
4406 (with-temp-buffer
4407 (insert-file file)
4408 (let (form)
4409 (while (ignore-errors
4410 (setq form (read (current-buffer))))
4411 (when (and (consp form)
4412 (eq (cadr form) 'gnus-newsrc-alist))
4413 (let ((infos (cadr (nth 2 form))))
4414 (dolist (info infos)
4415 (when (gnus-get-info (car info))
4416 (gnus-set-info (car info) info)))))))))
4417
4403(defun gnus-add-marked-articles (group type articles &optional info force) 4418(defun gnus-add-marked-articles (group type articles &optional info force)
4404 ;; Add ARTICLES of TYPE to the info of GROUP. 4419 ;; Add ARTICLES of TYPE to the info of GROUP.
4405 ;; If INFO is non-nil, use that info. If FORCE is non-nil, don't 4420 ;; If INFO is non-nil, use that info. If FORCE is non-nil, don't
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 42acb65ff9f..a5c727925f6 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -3114,6 +3114,10 @@ Return nil if not defined."
3114(defmacro gnus-get-info (group) 3114(defmacro gnus-get-info (group)
3115 `(nth 2 (gnus-gethash ,group gnus-newsrc-hashtb))) 3115 `(nth 2 (gnus-gethash ,group gnus-newsrc-hashtb)))
3116 3116
3117(defun gnus-set-info (group info)
3118 (setcar (nthcdr 2 (gnus-gethash group gnus-newsrc-hashtb))
3119 info))
3120
3117;;; Load the compatibility functions. 3121;;; Load the compatibility functions.
3118 3122
3119(require 'gnus-ems) 3123(require 'gnus-ems)