From: yamaoka Date: Fri, 25 Jul 2003 06:17:00 +0000 (+0000) Subject: Synch to Gnus 200307250053. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=606ae195f7641ff86a4f2f68aba229436d1c5e67;p=elisp%2Fgnus.git- Synch to Gnus 200307250053. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ad3ac5f..cab38a0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,20 @@ +2003-07-25 Jesper Harder + + * smime.el (smime-ask-passphrase): Use read-passwd rather than + comint-read-noecho. The former is more secure. + +2003-07-24 Teodor Zlatanov + + * gnus-registry.el (gnus-registry-cache-whitespace): make "adding + whitespace" message level 5 instead of 4 + (gnus-registry-clean-empty-function): new function to remove empty + registry entries + (gnus-registry-clean-empty): new variable to enable cleaning the + registry when saving it by calling gnus-registry-clean-empty-function + + * spam.el (spam-summary-prepare-exit): use spam-process-ham-in-spam-groups + (spam-process-ham-in-spam-groups): new variable + 2003-07-24 Jesper Harder * pgg-gpg.el (pgg-gpg-process-region): Add "--yes" to options. diff --git a/lisp/gnus-registry.el b/lisp/gnus-registry.el index b2a66c2..0766da7 100644 --- a/lisp/gnus-registry.el +++ b/lisp/gnus-registry.el @@ -54,6 +54,12 @@ The group names are matched, they don't have to be fully qualified." :group 'gnus-registry :type 'boolean) +(defcustom gnus-registry-clean-empty t + "Whether the empty registry entries should be deleted. +Registry entries are considered empty when they have no groups." + :group 'gnus-registry + :type 'boolean) + (defcustom gnus-registry-use-long-group-names nil "Whether the registry should use long group names (BUGGY)." :group 'gnus-registry @@ -155,7 +161,7 @@ The group names are matched, they don't have to be fully qualified." ;; Idea from Dan Christensen ;; Save the gnus-registry file with extra line breaks. (defun gnus-registry-cache-whitespace (filename) - (gnus-message 4 "Adding whitespace to %s" filename) + (gnus-message 5 "Adding whitespace to %s" filename) (save-excursion (goto-char (point-min)) (while (re-search-forward "^(\\|(\\\"" nil t) @@ -165,13 +171,28 @@ The group names are matched, they don't have to be fully qualified." (replace-match "" t t)))) (defun gnus-registry-save (&optional force) -;; TODO: delete entries with 0 groups (when (or gnus-registry-dirty force) + ;; remove empty entries + (when gnus-registry-clean-empty + (gnus-registry-clean-empty-function)) + ;; now trim the registry appropriately (setq gnus-registry-alist (gnus-registry-trim (hashtable-to-alist gnus-registry-hashtb))) + ;; really save (gnus-registry-cache-save) (setq gnus-registry-dirty nil))) +(defun gnus-registry-clean-empty-function () + "Remove all empty entries from the registry. Returns count thereof." + (let ((count 0)) + (maphash + (lambda (key value) + (unless (gnus-registry-fetch-group key) + (incf count) + (remhash key gnus-registry-hashtb))) + gnus-registry-hashtb) + count)) + (defun gnus-registry-read () (gnus-registry-cache-read) (setq gnus-registry-hashtb (alist-to-hashtable gnus-registry-alist)) diff --git a/lisp/smime.el b/lisp/smime.el index a4c70cc..436a475 100644 --- a/lisp/smime.el +++ b/lisp/smime.el @@ -119,7 +119,6 @@ ;;; Code: (require 'dig) -(require 'comint) (eval-when-compile (require 'cl)) (defgroup smime nil @@ -211,8 +210,8 @@ If nil, use system defaults." (defun smime-ask-passphrase () "Asks the passphrase to unlock the secret key." (let ((passphrase - (comint-read-noecho - "Passphrase for secret key (RET for no passphrase): " t))) + (read-passwd + "Passphrase for secret key (RET for no passphrase): "))) (if (string= passphrase "") nil passphrase))) diff --git a/lisp/spam.el b/lisp/spam.el index 45c2e66..1f73204 100644 --- a/lisp/spam.el +++ b/lisp/spam.el @@ -82,6 +82,11 @@ spam groups." :type 'boolean :group 'spam) +(defcustom spam-process-ham-in-spam-groups nil + "Whether ham should be processed in spam groups." + :type 'boolean + :group 'spam) + (defcustom spam-mark-only-unseen-as-spam t "Whether only unseen articles should be marked as spam in spam groups. When nil, all unread articles in a spam group are marked as @@ -482,6 +487,8 @@ spamoracle database." (spam-mark-spam-as-expired-and-move-routine nil) (when (or (spam-group-ham-contents-p gnus-newsgroup-name) + (and (spam-group-spam-contents-p gnus-newsgroup-name) + spam-process-ham-in-spam-groups) spam-process-ham-in-nonham-groups) (when (spam-group-ham-processor-whitelist-p gnus-newsgroup-name) (gnus-message 5 "Registering ham with the whitelist")