gnus-group.el (gnus-import-other-newsrc-file): New function.
This commit is contained in:
parent
a4d4252bfb
commit
85e75dedc0
3 changed files with 23 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
2011-02-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
|
||||
|
||||
* gnus-group.el (gnus-import-other-newsrc-file): New function.
|
||||
|
||||
2011-02-25 Teodor Zlatanov <tzz@lifelogs.com>
|
||||
|
||||
* auth-source.el (auth-source-search): Cache empty result sets.
|
||||
|
|
|
@ -4400,6 +4400,21 @@ and the second element is the address."
|
|||
(defun gnus-group-set-params-info (group params)
|
||||
(gnus-group-set-info params group 'params))
|
||||
|
||||
;; Ad-hoc function for inserting data from a different newsrc.eld
|
||||
;; file. Use with caution, if at all.
|
||||
(defun gnus-import-other-newsrc-file (file)
|
||||
(with-temp-buffer
|
||||
(insert-file file)
|
||||
(let (form)
|
||||
(while (ignore-errors
|
||||
(setq form (read (current-buffer))))
|
||||
(when (and (consp form)
|
||||
(eq (cadr form) 'gnus-newsrc-alist))
|
||||
(let ((infos (cadr (nth 2 form))))
|
||||
(dolist (info infos)
|
||||
(when (gnus-get-info (car info))
|
||||
(gnus-set-info (car info) info)))))))))
|
||||
|
||||
(defun gnus-add-marked-articles (group type articles &optional info force)
|
||||
;; Add ARTICLES of TYPE to the info of GROUP.
|
||||
;; If INFO is non-nil, use that info. If FORCE is non-nil, don't
|
||||
|
|
|
@ -3114,6 +3114,10 @@ Return nil if not defined."
|
|||
(defmacro gnus-get-info (group)
|
||||
`(nth 2 (gnus-gethash ,group gnus-newsrc-hashtb)))
|
||||
|
||||
(defun gnus-set-info (group info)
|
||||
(setcar (nthcdr 2 (gnus-gethash group gnus-newsrc-hashtb))
|
||||
info))
|
||||
|
||||
;;; Load the compatibility functions.
|
||||
|
||||
(require 'gnus-ems)
|
||||
|
|
Loading…
Add table
Reference in a new issue