+2003-04-30 Steve Youngs <youngs@xemacs.org>
+
+ * dgnushack.el: Add some missing autoloads for XEmacs 21.1.
+
+2003-04-29 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * gnus-registry.el (gnus-registry-fetch-group): faster
+ (gnus-registry-delete-group): new function
+ (gnus-registry-add-group): new function
+ (gnus-register-spool-action): use it
+ (gnus-register-action): use it
+ (gnus-registry-translate-from-alist)
+ (gnus-registry-translate-to-alist): remove the headers registry
+ for now
+
+2003-04-29 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * gnus-art.el (gnus-button-alist): Fixed CTAN regexp.
+
+2003-04-29 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * spam-report.el (spam-report-gmane): gnus-summary-article-number
+ is not necessary, just use the function parameter
+
+2003-04-29 Karl Pflysterer <sigurd@12move.de>
+
+ * spam-stat.el (spam-stat-save): No longer font-locks the file
+ when saving
+
2003-04-29 Katsumi Yamaoka <yamaoka@jpl.org>
* canlock.el: Bind mail-header-separator when compiling (XEmacs
("\\bmailto:\\([^ \n\t]+\\)"
0 (>= gnus-button-message-level 0) gnus-url-mailto 1)
;; CTAN
- ("\\bCTAN:[ \t\n]*\\([^>)!;:,'\n\t ]*\\)"
+ ((concat "\\bCTAN:[ \t\n]?[^>)!;:,'\n\t ]*\\("
+ gnus-button-ctan-directory-regexp
+ "[^][>)!;:,'\n\t ]+\\)")
0 (>= gnus-button-tex-level 1) gnus-button-handle-ctan 1)
((concat "\\btex-archive/\\("
gnus-button-ctan-directory-regexp
1 (>= gnus-button-emacs-level 8) gnus-button-handle-library 1)
("`\\([a-z][-a-z0-9]+\\.el\\)'"
1 (>= gnus-button-emacs-level 8) gnus-button-handle-library 1)
- ("`\\([a-z]+-[a-z]+-[-a-z]+\\|\\(gnus\\|message\\)-[-a-z]+\\)'"
+ ("`\\([a-z][a-z0-9]+-[a-z]+-[-a-z]+\\|\\(gnus\\|message\\)-[-a-z]+\\)'"
0 (>= gnus-button-emacs-level 8) gnus-button-handle-symbol 1)
- ("`\\([a-z]+-[a-z]+\\)'"
+ ("`\\([a-z][a-z0-9]+-[a-z]+\\)'"
0 (>= gnus-button-emacs-level 9) gnus-button-handle-symbol 1)
("(setq[ \t\n]+\\([a-z][a-z0-9]+-[-a-z0-9]+\\)[ \t\n]+.+)"
1 (>= gnus-button-emacs-level 7) gnus-button-handle-describe-variable 1)
"*The article registry by Message ID.")
(defvar gnus-registry-headers-hashtb nil
- "*The article header registry by Message ID.")
+ "*The article header registry by Message ID. Unused for now.")
(defcustom gnus-registry-unfollowed-groups '("delayed" "drafts" "queue")
"List of groups that gnus-registry-split-fancy-with-parent won't follow.
(defalias 'puthash 'cl-puthash)))
(defun gnus-registry-translate-to-alist ()
- (setq gnus-registry-alist (hashtable-to-alist gnus-registry-hashtb))
- (setq gnus-registry-headers-alist (hashtable-to-alist
- gnus-registry-headers-hashtb)))
+ (setq gnus-registry-alist (hashtable-to-alist gnus-registry-hashtb)))
(defun gnus-registry-translate-from-alist ()
- (setq gnus-registry-hashtb (alist-to-hashtable gnus-registry-alist))
- (setq gnus-registry-headers-hashtb (alist-to-hashtable
- gnus-registry-headers-alist)))
+ (setq gnus-registry-hashtb (alist-to-hashtable gnus-registry-alist)))
(defun alist-to-hashtable (alist)
"Build a hashtable from the values in ALIST."
(let* ((id (mail-header-id data-header))
(from (gnus-group-guess-full-name from))
(to (if to (gnus-group-guess-full-name to) nil))
- (to-name (if to to "the Bit Bucket")))
+ (to-name (if to to "the Bit Bucket"))
+ (old-entry (gethash id gnus-registry-hashtb)))
(gnus-message 5 "Registry: article %s %s from %s to %s"
id
(if method "respooling" "going")
from
- to)
- (unless (gethash id gnus-registry-headers-hashtb)
- (puthash id (list data-header) gnus-registry-headers-hashtb))
- (puthash id (cons (list action from to)
- (gethash id gnus-registry-hashtb))
- gnus-registry-hashtb)))
+ to)
+
+ (cond
+ ((equal 'delete action) (gnus-registry-delete-group id from))
+ (t (gnus-registry-add-group id to)))))
(defun gnus-register-spool-action (id group)
;; do not process the draft IDs
; (unless (string-match "totally-fudged-out-message-id" id)
- (let ((group (gnus-group-guess-full-name group)))
- (when (string-match "\r$" id)
- (setq id (substring id 0 -1)))
- (gnus-message 5 "Registry: article %s spooled to %s"
- id
- group)
- (puthash id (cons (list 'spool nil group)
- (gethash id gnus-registry-hashtb))
- gnus-registry-hashtb)))
+; (let ((group (gnus-group-guess-full-name group)))
+ (when (string-match "\r$" id)
+ (setq id (substring id 0 -1)))
+ (gnus-message 5 "Registry: article %s spooled to %s"
+ id
+ group)
+ (gnus-registry-add-group id group))
;)
;; Function for nn{mail|imap}-split-fancy: look up all references in
(string-match x word))
list))))
-
(defun gnus-registry-fetch-group (id)
"Get the group of a message, based on the message ID.
Returns the first place where the trail finds a spool action."
(let ((trail (gethash id gnus-registry-hashtb)))
- (dolist (crumb trail)
- (let ((action (nth 0 crumb))
- (from (nth 1 crumb))
- (to (nth 2 crumb)))
- (when (eq action 'spool)
- (return to))))))
+ (if trail
+ (car trail)
+ nil)))
+
+(defun gnus-registry-delete-group (id group)
+ "Get the group of a message, based on the message ID.
+Returns the first place where the trail finds a spool action."
+ (let ((trail (gethash id gnus-registry-hashtb))
+ (group (gnus-group-short-name group)))
+ (puthash id (if trail
+ (delete group trail)
+ nil)
+ gnus-registry-hashtb))
+ ;; now, clear the entry if it's empty
+ (unless (gethash id gnus-registry-hashtb)
+ (remhash id gnus-registry-hashtb)))
+
+(defun gnus-registry-add-group (id group)
+ "Get the group of a message, based on the message ID.
+Returns the first place where the trail finds a spool action."
+ ;; make sure there are no duplicate entries
+ (let ((group (gnus-group-short-name group)))
+ (gnus-registry-delete-group id group)
+ (let ((trail (gethash id gnus-registry-hashtb)))
+ (puthash id (if trail
+ (cons group trail)
+ (list group))
+ gnus-registry-hashtb))))
(defun gnus-registry-clear ()
"Clear the Gnus registry."