+2003-05-28 Jesper Harder <harder@ifa.au.dk>
+
+ * lpath.el: Add put-char-table and get-char-table.
+
+2003-05-28 Teodor Zlatanov <tzz@bwh.harvard.edu>
+
+ * gnus-registry.el (gnus-registry-dirty): flag for modified registry
+ (gnus-registry-save, gnus-registry-read)
+ (gnus-registry-store-extra, gnus-registry-clear): use it (note
+ that gnus-registry-store-extra is invoked for all modifications to
+ set the mtime, so gnus-registry-dirty only needs to be set there)
+
2003-05-23 Simon Josefsson <jas@extundo.com>
* mml1991.el (mml1991-pgg-sign): Use mml-sender instead of
(require 'gnus-sum)
(require 'nnmail)
+(defvar gnus-registry-dirty t
+ "Boolean set to t when the registry is modified")
+
(defgroup gnus-registry nil
"The Gnus registry."
:group 'gnus)
(interactive)
(let ((file gnus-registry-cache-file))
(save-excursion
- ;; Save .newsrc.eld.
(set-buffer (gnus-get-buffer-create " *Gnus-registry-cache*"))
(make-local-variable 'version-control)
(setq version-control gnus-backup-startup-file)
(replace-match "" t t))))
(defun gnus-registry-save ()
- (setq gnus-registry-alist (hashtable-to-alist gnus-registry-hashtb))
- (gnus-registry-cache-save))
+;; TODO: delete entries with 0 groups
+ (when gnus-registry-dirty
+ (setq gnus-registry-alist (hashtable-to-alist gnus-registry-hashtb))
+ (gnus-registry-cache-save)
+ (setq gnus-registry-dirty nil)))
(defun gnus-registry-read ()
(gnus-registry-cache-read)
- (setq gnus-registry-hashtb (alist-to-hashtable gnus-registry-alist)))
+ (setq gnus-registry-hashtb (alist-to-hashtable gnus-registry-alist))
+ (setq gnus-registry-dirty nil))
(defun alist-to-hashtable (alist)
"Build a hashtable from the values in ALIST."
(let ((trail (gethash id gnus-registry-hashtb))
(old-extra (gnus-registry-fetch-extra id)))
(puthash id (cons extra (delete old-extra trail))
- gnus-registry-hashtb))))
+ gnus-registry-hashtb)
+ (setq gnus-registry-dirty t))))
(defun gnus-registry-store-extra-entry (id key value)
"Put a specific entry in the extras field of the registry entry for id."
"Clear the Gnus registry."
(interactive)
(setq gnus-registry-alist nil)
- (setq gnus-registry-hashtb (alist-to-hashtable gnus-registry-alist)))
+ (setq gnus-registry-hashtb (alist-to-hashtable gnus-registry-alist))
+ (setq gnus-registry-dirty t))
(defun gnus-registry-install-hooks ()
"Install the registry hooks."
spam-enter-ham-BBDB string-to-multibyte tool-bar-add-item
tool-bar-add-item-from-menu tool-bar-local-item-from-menu
url-http-file-exists-p vcard-pretty-print w32-focus-frame
- w3m-charset-to-coding-system x-focus-frame))
+ w3m-charset-to-coding-system x-focus-frame put-char-table
+ get-char-table))
(maybe-bind '(filladapt-mode
mc-pgp-always-sign mm-w3m-mode-map rmail-enable-mime-composing
rmail-insert-mime-forwarded-message-function