[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/gnus/gnus-registry.el,v
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/gnus/gnus-registry.el,v |
Date: |
Sat, 07 Oct 2006 01:51:57 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Miles Bader <miles> 06/10/07 01:51:54
Index: lisp/gnus/gnus-registry.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/gnus-registry.el,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- lisp/gnus/gnus-registry.el 5 Feb 2006 13:56:44 -0000 1.11
+++ lisp/gnus/gnus-registry.el 7 Oct 2006 01:51:54 -0000 1.12
@@ -60,6 +60,7 @@
(require 'gnus)
(require 'gnus-int)
(require 'gnus-sum)
+(require 'gnus-util)
(require 'nnmail)
(defvar gnus-registry-dirty t
@@ -243,7 +244,8 @@
(gnus-registry-clean-empty-function))
;; now trim the registry appropriately
(setq gnus-registry-alist (gnus-registry-trim
- (hashtable-to-alist gnus-registry-hashtb)))
+ (gnus-hashtable-to-alist
+ gnus-registry-hashtb)))
;; really save
(gnus-registry-cache-save)
(setq gnus-registry-entry-caching caching)
@@ -262,7 +264,7 @@
(defun gnus-registry-read ()
(gnus-registry-cache-read)
- (setq gnus-registry-hashtb (alist-to-hashtable gnus-registry-alist))
+ (setq gnus-registry-hashtb (gnus-alist-to-hashtable gnus-registry-alist))
(setq gnus-registry-dirty nil))
(defun gnus-registry-trim (alist)
@@ -290,26 +292,6 @@
(cdr (gethash (car a) timehash))
(cdr (gethash (car b) timehash))))))))))
-(defun alist-to-hashtable (alist)
- "Build a hashtable from the values in ALIST."
- (let ((ht (make-hash-table
- :size 4096
- :test 'equal)))
- (mapc
- (lambda (kv-pair)
- (puthash (car kv-pair) (cdr kv-pair) ht))
- alist)
- ht))
-
-(defun hashtable-to-alist (hash)
- "Build an alist from the values in HASH."
- (let ((list nil))
- (maphash
- (lambda (key value)
- (setq list (cons (cons key value) list)))
- hash)
- list))
-
(defun gnus-registry-action (action data-header from &optional to method)
(let* ((id (mail-header-id data-header))
(subject (gnus-registry-simplify-subject
@@ -660,7 +642,7 @@
"Clear the Gnus registry."
(interactive)
(setq gnus-registry-alist nil)
- (setq gnus-registry-hashtb (alist-to-hashtable gnus-registry-alist))
+ (setq gnus-registry-hashtb (gnus-alist-to-hashtable gnus-registry-alist))
(setq gnus-registry-dirty t))
;;;###autoload
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/gnus/gnus-registry.el,v,
Miles Bader <=