+2003-07-25 Jesper Harder <harder@ifa.au.dk>
+
+ * smime.el (smime-ask-passphrase): Use read-passwd rather than
+ comint-read-noecho. The former is more secure.
+
+2003-07-24 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * 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 <harder@ifa.au.dk>
* pgg-gpg.el (pgg-gpg-process-region): Add "--yes" to options.
: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
;; Idea from Dan Christensen <jdc@chow.mat.jhu.edu>
;; 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)
(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))
;;; Code:
(require 'dig)
-(require 'comint)
(eval-when-compile (require 'cl))
(defgroup smime nil
(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)))
: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
(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")