From: Miles Bader Date: Tue, 7 Dec 2004 21:56:42 +0000 (+0000) Subject: Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-716 X-Git-Tag: ttn-vms-21-2-B4~3378 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ad136a7c3b310fa7240dd2adf62f23b454782bd0;p=emacs.git Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-716 Merge from gnus--rel--5.10 Patches applied: * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-74 Update from CVS 2004-12-02 Katsumi Yamaoka * lisp/gnus/message.el (message-forward-make-body-mml): Remove headers according to message-forward-ignored-headers if a message is decoded. 2004-12-02 Romain Francoise * lisp/gnus/message.el (message-forward-make-body-plain): Always remove headers according to message-forward-ignored-headers. 2004-11-26 Katsumi Yamaoka * lisp/gnus/lpath.el: Remove bbdb-create-internal, bbdb-records, spam-BBDB-register-routine and spam-enter-ham-BBDB. * lisp/gnus/nnrss.el (nnrss-string-as-multibyte): Redefine it as a macro in order to silence the byte compiler. * lisp/gnus/pop3.el (pop3-md5): Define it before being used. * lisp/gnus/spam.el: Fix the way to silence the byte compiler, which complained about bbdb-buffer, bbdb-create-internal, bbdb-search-simple, mail-check-payment, spam-BBDB-register-routine, spam-enter-ham-BBDB, spam-stat-buffer-change-to-non-spam, spam-stat-buffer-change-to-spam, spam-stat-buffer-is-non-spam, spam-stat-buffer-is-spam, spam-stat-load, spam-stat-register-ham-routine, spam-stat-register-spam-routine, spam-stat-save and spam-stat-split-fancy. 2004-11-26 Katsumi Yamaoka * lisp/gnus/canlock.el (canlock-password): Remove `:size 0' or `:size 1' which may confuse users. (canlock-password-for-verify): Ditto. * lisp/gnus/deuglify.el (gnus-outlook-deuglify-unwrap-stop-chars): Ditto. * lisp/gnus/gnus-art.el (gnus-emphasis-alist): Ditto. * lisp/gnus/gnus-registry.el (gnus-registry-max-entries): Ditto. * lisp/gnus/gnus-score.el (gnus-adaptive-word-length-limit): Ditto. * lisp/gnus/gnus-start.el (gnus-save-killed-list): Ditto. * lisp/gnus/gnus-sum.el (gnus-thread-hide-subtree): Ditto. (gnus-sum-thread-tree-root): Ditto. (gnus-sum-thread-tree-false-root): Ditto. (gnus-sum-thread-tree-single-indent): Ditto. * lisp/gnus/message.el (message-courtesy-message): Ditto. (message-archive-note): Ditto. (message-subscribed-address-file): Ditto. (message-user-fqdn): Ditto. * lisp/gnus/spam-report.el (spam-report-gmane-regex): Ditto. * lisp/gnus/spam.el (spam-blackhole-good-server-regex): Ditto. 2004-11-25 Reiner Steib * lisp/gnus/message.el (message-forbidden-properties): Fixed typo in doc string. 2004-11-25 Lars Magne Ingebrigtsen * lisp/gnus/message.el (message-strip-forbidden-properties): Bind buffer-read-only (etc) to nil. 2004-11-25 Reiner Steib * lisp/gnus/gnus-util.el (gnus-replace-in-string): Added doc string. * lisp/gnus/nnmail.el (nnmail-split-header-length-limit): Increase to 2048 to avoid problems when splitting mails with many recipients. 2004-11-23 Katsumi Yamaoka * lisp/gnus/rfc2047.el (rfc2047-header-encoding-alist): Add In-Reply-To to address-mime. Suggested by ARISAWA Akihiro . 2004-11-22 Marek Martin (tiny change) * lisp/gnus/nnfolder.el (nnfolder-request-create-group): Save current buffer. 2004-11-22 Reiner Steib * man/message.texi (Various Message Variables): Mention that all mail file variables are derived from `message-directory'. * man/gnus.texi (Splitting Mail): Clarify bogus group. 2004-11-16 Reiner Steib * man/gnus.texi (Filtering Spam Using The Spam ELisp Package): --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 11719d7d709..2b83229010d 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,89 @@ +2004-12-02 Katsumi Yamaoka + + * message.el (message-forward-make-body-mml): Remove headers + according to message-forward-ignored-headers if a message is + decoded. + +2004-12-02 Romain Francoise + + * message.el (message-forward-make-body-plain): Always remove + headers according to message-forward-ignored-headers. + +2004-11-26 Katsumi Yamaoka + + * lpath.el: Remove bbdb-create-internal, bbdb-records, + spam-BBDB-register-routine and spam-enter-ham-BBDB. + + * nnrss.el (nnrss-string-as-multibyte): Redefine it as a macro in + order to silence the byte compiler. + + * pop3.el (pop3-md5): Define it before being used. + + * spam.el: Fix the way to silence the byte compiler, which + complained about bbdb-buffer, bbdb-create-internal, + bbdb-search-simple, mail-check-payment, spam-BBDB-register-routine, + spam-enter-ham-BBDB, spam-stat-buffer-change-to-non-spam, + spam-stat-buffer-change-to-spam, spam-stat-buffer-is-non-spam, + spam-stat-buffer-is-spam, spam-stat-load, + spam-stat-register-ham-routine, spam-stat-register-spam-routine, + spam-stat-save and spam-stat-split-fancy. + +2004-11-26 Katsumi Yamaoka + + * canlock.el (canlock-password): Remove `:size 0' or `:size 1' + which may confuse users. + (canlock-password-for-verify): Ditto. + + * deuglify.el (gnus-outlook-deuglify-unwrap-stop-chars): Ditto. + + * gnus-art.el (gnus-emphasis-alist): Ditto. + + * gnus-registry.el (gnus-registry-max-entries): Ditto. + + * gnus-score.el (gnus-adaptive-word-length-limit): Ditto. + + * gnus-start.el (gnus-save-killed-list): Ditto. + + * gnus-sum.el (gnus-thread-hide-subtree): Ditto. + (gnus-sum-thread-tree-root): Ditto. + (gnus-sum-thread-tree-false-root): Ditto. + (gnus-sum-thread-tree-single-indent): Ditto. + + * message.el (message-courtesy-message): Ditto. + (message-archive-note): Ditto. + (message-subscribed-address-file): Ditto. + (message-user-fqdn): Ditto. + + * spam-report.el (spam-report-gmane-regex): Ditto. + + * spam.el (spam-blackhole-good-server-regex): Ditto. + +2004-11-25 Reiner Steib + + * message.el (message-forbidden-properties): Fixed typo in doc + string. + +2004-11-25 Lars Magne Ingebrigtsen + + * message.el (message-strip-forbidden-properties): Bind + buffer-read-only (etc) to nil. + +2004-11-25 Reiner Steib + + * gnus-util.el (gnus-replace-in-string): Added doc string. + + * nnmail.el (nnmail-split-header-length-limit): Increase to 2048 + to avoid problems when splitting mails with many recipients. + +2004-11-23 Katsumi Yamaoka + + * rfc2047.el (rfc2047-header-encoding-alist): Add In-Reply-To to + address-mime. Suggested by ARISAWA Akihiro . + +2004-11-22 Marek Martin (tiny change) + + * nnfolder.el (nnfolder-request-create-group): Save current buffer. + 2004-11-22 Stefan Monnier * gnus-sum.el (gnus-summary-exit): Remove redundant and harmful diff --git a/lisp/gnus/canlock.el b/lisp/gnus/canlock.el index 99d6500001a..71c7dbe03d8 100644 --- a/lisp/gnus/canlock.el +++ b/lisp/gnus/canlock.el @@ -55,13 +55,13 @@ (defcustom canlock-password nil "Password to use when signing a Cancel-Lock or a Cancel-Key header." :type '(radio (const :format "Not specified " nil) - (string :tag "Password" :size 0)) + (string :tag "Password")) :group 'canlock) (defcustom canlock-password-for-verify canlock-password "Password to use when verifying a Cancel-Lock or a Cancel-Key header." :type '(radio (const :format "Not specified " nil) - (string :tag "Password" :size 0)) + (string :tag "Password")) :group 'canlock) (defcustom canlock-force-insert-header nil diff --git a/lisp/gnus/deuglify.el b/lisp/gnus/deuglify.el index 4fe1001a050..a00151063de 100644 --- a/lisp/gnus/deuglify.el +++ b/lisp/gnus/deuglify.el @@ -1,6 +1,6 @@ ;;; deuglify.el --- deuglify broken Outlook (Express) articles -;; Copyright (C) 2002, 2003 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. ;; Copyright (C) 2001, 2002 Raymond Scholz ;; Author: Raymond Scholz @@ -257,7 +257,7 @@ "Characters that inhibit unwrapping if they are the last one on the cited line above the possible wrapped line." :version "21.4" :type '(radio (const :format "None " nil) - (string :size 0 :value ".?!")) + (string :value ".?!")) :group 'gnus-outlook-deuglify) (defcustom gnus-outlook-deuglify-no-wrap-chars "`" diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index a87348188f9..f6286c7de87 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -399,15 +399,15 @@ is the face used for highlighting." :value (gnus-emphasis-custom-value-to-external value)))) (widget-group-value-create widget)) - (regexp :format "%t: %v\n" :size 1) - (integer :format "Match group: %v\n" :size 0) - (integer :format "Emphasize group: %v\n" :size 0) + regexp + (integer :format "Match group: %v") + (integer :format "Emphasize group: %v") face) (group :tag "Simple" :value (("_" . "_") nil default) (cons :format "%v" - (regexp :format "Start regexp: %v\n" :size 0) - (regexp :format "End regexp: %v\n" :size 0)) + (regexp :format "Start regexp: %v") + (regexp :format "End regexp: %v")) (boolean :format "Show start and end patterns: %[%v%]\n" :on " On " :off " Off ") face))) diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index 046114cbe24..71e98a236bd 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/gnus-registry.el @@ -1,5 +1,5 @@ ;;; gnus-registry.el --- article registry for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 ;; Free Software Foundation, Inc. ;; Author: Ted Zlatanov @@ -128,7 +128,7 @@ way." "Maximum number of entries in the registry, nil for unlimited." :group 'gnus-registry :type '(radio (const :format "Unlimited " nil) - (integer :format "Maximum number: %v\n" :size 0))) + (integer :format "Maximum number: %v"))) ;; Function(s) missing in Emacs 20 (when (memq nil (mapcar 'fboundp '(puthash))) diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index 370ef00eb49..21e59e4dbf3 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el @@ -240,7 +240,7 @@ This variable allows the same syntax as `gnus-home-score-file'." :version "21.4" :group 'gnus-score-adapt :type '(radio (const :format "Unlimited " nil) - (integer :format "Maximum length: %v\n" :size 0))) + (integer :format "Maximum length: %v"))) (defcustom gnus-ignored-adaptive-words nil "List of words to be ignored when doing adaptive word scoring." diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 53ac8f0dbdd..17b0f1d687d 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -258,7 +258,7 @@ not match this regexp will be removed before saving the list." (and value (not (stringp value)))) :value t) (const nil) - (regexp :format "%t: %v\n" :size 0))) + regexp)) (defcustom gnus-ignored-newsgroups (mapconcat 'identity diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 4c5b8dcf9d5..03e1624237e 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -264,7 +264,7 @@ to expose hidden threads." (not (or (consp value) (functionp value)))) :value t) (const nil) - (sexp :tag "Predicate specifier" :size 0))) + (sexp :tag "Predicate specifier"))) (defcustom gnus-thread-hide-killed t "*If non-nil, hide killed threads automatically." @@ -4639,19 +4639,19 @@ Unscored articles will be counted as having a score of zero." "With %B spec, used for the root of a thread. If nil, use subject instead." :version "21.4" - :type '(radio (const :format "%v " nil) (string :size 0)) + :type '(radio (const :format "%v " nil) string) :group 'gnus-thread) (defcustom gnus-sum-thread-tree-false-root "> " "With %B spec, used for a false root of a thread. If nil, use subject instead." :version "21.4" - :type '(radio (const :format "%v " nil) (string :size 0)) + :type '(radio (const :format "%v " nil) string) :group 'gnus-thread) (defcustom gnus-sum-thread-tree-single-indent "" "With %B spec, used for a thread with just one message. If nil, use subject instead." :version "21.4" - :type '(radio (const :format "%v " nil) (string :size 0)) + :type '(radio (const :format "%v " nil) string) :group 'gnus-thread) (defcustom gnus-sum-thread-tree-vertical "| " "With %B spec, used for drawing a vertical line." diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 4b71e252f6e..d9952fd8cdc 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -60,10 +60,20 @@ ((fboundp 'replace-in-string) (defalias 'gnus-replace-in-string 'replace-in-string)) ((fboundp 'replace-regexp-in-string) - (defun gnus-replace-in-string (string regexp newtext &optional literal) + (defun gnus-replace-in-string (string regexp newtext &optional literal) + "Replace all matches for REGEXP with NEWTEXT in STRING. +If LITERAL is non-nil, insert NEWTEXT literally. Return a new +string containing the replacements. + +This is a compatibility function for different Emacsen." (replace-regexp-in-string regexp newtext string nil literal))) (t (defun gnus-replace-in-string (string regexp newtext &optional literal) + "Replace all matches for REGEXP with NEWTEXT in STRING. +If LITERAL is non-nil, insert NEWTEXT literally. Return a new +string containing the replacements. + +This is a compatibility function for different Emacsen." (let ((start 0) tail) (while (string-match regexp string start) (setq tail (- (length string) (match-end 0))) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index fb63d6724be..113547741c0 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -146,7 +146,7 @@ If the string contains the format spec \"%s\", the Newsgroups the article has been posted to will be inserted there. If this variable is nil, no such courtesy message will be added." :group 'message-sending - :type '(radio (string :format "%t: %v\n" :size 0) (const nil))) + :type '(radio string (const nil))) (defcustom message-ignored-bounced-headers "^\\(Received\\|Return-Path\\|Delivered-To\\):" @@ -373,8 +373,7 @@ Archives \(such as groups.google.com\) respect this header." "Note to insert why you wouldn't want this posting archived. If nil, don't insert any text in the body." :version "21.4" - :type '(radio (string :format "%t: %v\n" :size 0) - (const nil)) + :type '(radio string (const nil)) :link '(custom-manual "(message)Header Commands") :group 'message-various) @@ -698,8 +697,7 @@ non-nil, each line of this file should be a mailing list address." :version "21.4" :group 'message-interface :link '(custom-manual "(message)Mailing Lists") - :type '(radio (file :format "%t: %v\n" :size 0) - (const nil))) + :type '(radio file (const nil))) (defcustom message-subscribed-addresses nil "*Specifies a list of addresses the user is subscribed to. @@ -1442,7 +1440,7 @@ no, only reply back to the author." :group 'message-headers :link '(custom-manual "(message)News Headers") :type '(radio (const :format "%v " nil) - (string :format "FQDN: %v\n" :size 0))) + (string :format "FQDN: %v"))) (defcustom message-use-idna (and (condition-case nil (require 'idna) (file-error)) @@ -2403,7 +2401,7 @@ message composition doesn't break too bad." ;; fontified: is used by font-lock. ;; syntax-table, local-map: I dunno. ;; We need to add XEmacs names to the list. - "Property list of with properties.forbidden in message buffers. + "Property list of with properties forbidden in message buffers. The values of the properties are ignored, only the property names are used.") (defun message-tamago-not-in-use-p (pos) @@ -2426,11 +2424,13 @@ This function is intended to be called from `after-change-functions'. See also `message-forbidden-properties'." (when (and message-strip-special-text-properties (message-tamago-not-in-use-p begin)) - (while (not (= begin end)) - (when (not (get-text-property begin 'message-hidden)) - (remove-text-properties begin (1+ begin) - message-forbidden-properties)) - (incf begin)))) + (let ((buffer-read-only nil) + (inhibit-read-only t)) + (while (not (= begin end)) + (when (not (get-text-property begin 'message-hidden)) + (remove-text-properties begin (1+ begin) + message-forbidden-properties)) + (incf begin))))) ;;;###autoload (define-derived-mode message-mode text-mode "Message" @@ -6193,8 +6193,7 @@ Optional DIGEST will use digest to forward." (setq e (point)) (insert "\n-------------------- End of forwarded message --------------------\n") - (when (and (not current-prefix-arg) - message-forward-ignored-headers) + (when message-forward-ignored-headers (save-restriction (narrow-to-region b e) (goto-char b) @@ -6240,7 +6239,7 @@ Optional DIGEST will use digest to forward." (goto-char (point-max)))) (setq e (point)) (insert "<#/mml>\n") - (when (and (not current-prefix-arg) + (when (and (not message-forward-decoded-p) message-forward-ignored-headers) (save-restriction (narrow-to-region b e) diff --git a/lisp/gnus/nnfolder.el b/lisp/gnus/nnfolder.el index f3e2ea8f533..bf8fc9bac9a 100644 --- a/lisp/gnus/nnfolder.el +++ b/lisp/gnus/nnfolder.el @@ -1,5 +1,5 @@ ;;; nnfolder.el --- mail folder access for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 ;; Free Software Foundation, Inc. ;; Author: Simon Josefsson (adding MARKS) @@ -370,10 +370,11 @@ the group. Then the marks file will be regenerated properly by Gnus.") (deffoo nnfolder-request-create-group (group &optional server args) (nnfolder-possibly-change-group nil server) (nnmail-activate 'nnfolder) - (when group - (unless (assoc group nnfolder-group-alist) - (push (list group (cons 1 0)) nnfolder-group-alist) - (nnfolder-save-active nnfolder-group-alist nnfolder-active-file) + (when (and group + (not (assoc group nnfolder-group-alist))) + (push (list group (cons 1 0)) nnfolder-group-alist) + (nnfolder-save-active nnfolder-group-alist nnfolder-active-file) + (save-current-buffer (nnfolder-read-folder group))) t) diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el index 040be1e60e1..471a0f3aa21 100644 --- a/lisp/gnus/nnmail.el +++ b/lisp/gnus/nnmail.el @@ -554,7 +554,7 @@ parameter. It should return nil, `warn' or `delete'." :group 'nnmail :type '(repeat symbol)) -(defcustom nnmail-split-header-length-limit 512 +(defcustom nnmail-split-header-length-limit 2048 "Header lines longer than this limit are excluded from the split function." :version "21.1" :group 'nnmail diff --git a/lisp/gnus/nnrss.el b/lisp/gnus/nnrss.el index 9b4825c53f9..6ff2b46722e 100644 --- a/lisp/gnus/nnrss.el +++ b/lisp/gnus/nnrss.el @@ -82,6 +82,12 @@ ARTICLE is the article number of the current headline.") ;;; Interface functions +(eval-when-compile + (defmacro nnrss-string-as-multibyte (string) + (if (featurep 'xemacs) + string + `(string-as-multibyte ,string)))) + (deffoo nnrss-retrieve-headers (articles &optional group server fetch-old) (nnrss-possibly-change-group group server) (let (e) @@ -410,10 +416,6 @@ ARTICLE is the article number of the current headline.") (defalias 'nnrss-insert 'nnrss-insert-w3) -(if (featurep 'xemacs) - (defalias 'nnrss-string-as-multibyte 'identity) - (defalias 'nnrss-string-as-multibyte 'string-as-multibyte)) - ;;; Snarf functions (defun nnrss-check-group (group server) diff --git a/lisp/gnus/pop3.el b/lisp/gnus/pop3.el index db8753057d6..4aa387f375f 100644 --- a/lisp/gnus/pop3.el +++ b/lisp/gnus/pop3.el @@ -348,6 +348,22 @@ If NOW, use that time instead." ;; AUTHORIZATION STATE +(eval-and-compile + (if (fboundp 'md5) + (defalias 'pop3-md5 'md5) + (defvar pop3-md5-program "md5" + "*Program to encode its input in MD5.") + + (defun pop3-md5 (string) + (with-temp-buffer + (insert string) + (call-process-region (point-min) (point-max) + pop3-md5-program + t (current-buffer) nil) + ;; The meaningful output is the first 32 characters. + ;; Don't return the newline that follows them! + (buffer-substring (point-min) (+ 32 (point-min))))))) + (defun pop3-user (process user) "Send USER information to POP3 server." (pop3-send-command process (format "USER %s" user)) @@ -378,22 +394,6 @@ If NOW, use that time instead." ;; TRANSACTION STATE -(eval-and-compile - (if (fboundp 'md5) - (defalias 'pop3-md5 'md5) - (defvar pop3-md5-program "md5" - "*Program to encode its input in MD5.") - - (defun pop3-md5 (string) - (with-temp-buffer - (insert string) - (call-process-region (point-min) (point-max) - pop3-md5-program - t (current-buffer) nil) - ;; The meaningful output is the first 32 characters. - ;; Don't return the newline that follows them! - (buffer-substring (point-min) (+ 32 (point-min))))))) - (defun pop3-stat (process) "Return the number of messages in the maildrop and the maildrop's size." (pop3-send-command process "STAT") diff --git a/lisp/gnus/rfc2047.el b/lisp/gnus/rfc2047.el index cbb5a1fc5b0..e6461bf2627 100644 --- a/lisp/gnus/rfc2047.el +++ b/lisp/gnus/rfc2047.el @@ -71,7 +71,7 @@ Value is what BODY returns." '(("Newsgroups" . nil) ("Followup-To" . nil) ("Message-ID" . nil) - ("\\(Resent-\\)?\\(From\\|Cc\\|To\\|Bcc\\|Reply-To\\|Sender\ + ("\\(Resent-\\)?\\(From\\|Cc\\|To\\|Bcc\\|\\(In-\\)?Reply-To\\|Sender\ \\|Mail-Followup-To\\|Mail-Copies-To\\|Approved\\)" . address-mime) (t . mime)) "*Header/encoding method alist. diff --git a/lisp/gnus/spam-report.el b/lisp/gnus/spam-report.el index edfd2e0ae73..80d422b06ab 100644 --- a/lisp/gnus/spam-report.el +++ b/lisp/gnus/spam-report.el @@ -43,7 +43,7 @@ If you are using spam.el, consider setting gnus-spam-process-newsgroups or the gnus-group-spam-exit-processor-report-gmane group/topic parameter instead." :type '(radio (const nil) - (regexp :format "%t: %v\n" :size 0 :value "^nntp\+.*:gmane\.")) + (regexp :value "^nntp\+.*:gmane\.")) :group 'spam-report) (defcustom spam-report-gmane-spam-header diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el index 075408b8fc7..a0b28340717 100644 --- a/lisp/gnus/spam.el +++ b/lisp/gnus/spam.el @@ -295,8 +295,7 @@ All unmarked article in such group receive the spam mark on group entry." (defcustom spam-blackhole-good-server-regex nil "String matching IP addresses that should not be checked in the blackholes." - :type '(radio (const nil) - (regexp :format "%t: %v\n" :size 0)) + :type '(radio (const nil) regexp) :group 'spam) (defcustom spam-face 'gnus-splash-face @@ -1257,6 +1256,9 @@ functions") ;;;; Hashcash. +(eval-when-compile + (autoload 'mail-check-payment "hashcash")) + (condition-case nil (progn (require 'hashcash) @@ -1265,9 +1267,7 @@ functions") "Check the headers for hashcash payments." (mail-check-payment))) ;mail-check-payment returns a boolean - (file-error (progn - (defalias 'mail-check-payment 'ignore) - (defalias 'spam-check-hashcash 'ignore)))) + (file-error)) ;;;; BBDB @@ -1276,66 +1276,67 @@ functions") ;; all this is done inside a condition-case to trap errors -(condition-case nil - (progn - (require 'bbdb) - (require 'bbdb-com) - - (defun spam-enter-ham-BBDB (addresses &optional remove) - "Enter an address into the BBDB; implies ham (non-spam) sender" - (dolist (from addresses) - (when (stringp from) - (let* ((parsed-address (gnus-extract-address-components from)) - (name (or (nth 0 parsed-address) "Ham Sender")) - (remove-function (if remove - 'bbdb-delete-record-internal - 'ignore)) - (net-address (nth 1 parsed-address)) - (record (and net-address - (bbdb-search-simple nil net-address)))) - (when net-address - (gnus-message 5 "%s address %s %s BBDB" - (if remove "Deleting" "Adding") - from - (if remove "from" "to")) - (if record - (funcall remove-function record) - (bbdb-create-internal name nil net-address nil nil - "ham sender added by spam.el"))))))) - - (defun spam-BBDB-register-routine (articles &optional unregister) - (let (addresses) - (dolist (article articles) - (when (stringp (spam-fetch-field-from-fast article)) - (push (spam-fetch-field-from-fast article) addresses))) - ;; now do the register/unregister action - (spam-enter-ham-BBDB addresses unregister))) - - (defun spam-BBDB-unregister-routine (articles) - (spam-BBDB-register-routine articles t)) - - (defun spam-check-BBDB () - "Mail from people in the BBDB is classified as ham or non-spam" - (let ((who (nnmail-fetch-field "from")) - (spam-split-group (if spam-split-symbolic-return - 'spam - spam-split-group))) - (when who - (setq who (nth 1 (gnus-extract-address-components who))) - (if (bbdb-search-simple nil who) - t - (if spam-use-BBDB-exclusive - spam-split-group - nil)))))) - - (file-error (progn - (defalias 'bbdb-search-simple 'ignore) - (defalias 'spam-check-BBDB 'ignore) - (defalias 'spam-BBDB-register-routine 'ignore) - (defalias 'spam-enter-ham-BBDB 'ignore) - (defalias 'bbdb-create-internal 'ignore) - (defalias 'bbdb-delete-record-internal 'ignore) - (defalias 'bbdb-records 'ignore)))) +(eval-when-compile + (autoload 'bbdb-buffer "bbdb") + (autoload 'bbdb-create-internal "bbdb") + (autoload 'bbdb-search-simple "bbdb")) + +(eval-and-compile + (when (condition-case nil + (progn + (require 'bbdb) + (require 'bbdb-com)) + (file-error + (defalias 'spam-BBDB-register-routine 'ignore) + (defalias 'spam-enter-ham-BBDB 'ignore) + nil)) + + (defun spam-enter-ham-BBDB (addresses &optional remove) + "Enter an address into the BBDB; implies ham (non-spam) sender" + (dolist (from addresses) + (when (stringp from) + (let* ((parsed-address (gnus-extract-address-components from)) + (name (or (nth 0 parsed-address) "Ham Sender")) + (remove-function (if remove + 'bbdb-delete-record-internal + 'ignore)) + (net-address (nth 1 parsed-address)) + (record (and net-address + (bbdb-search-simple nil net-address)))) + (when net-address + (gnus-message 5 "%s address %s %s BBDB" + (if remove "Deleting" "Adding") + from + (if remove "from" "to")) + (if record + (funcall remove-function record) + (bbdb-create-internal name nil net-address nil nil + "ham sender added by spam.el"))))))) + + (defun spam-BBDB-register-routine (articles &optional unregister) + (let (addresses) + (dolist (article articles) + (when (stringp (spam-fetch-field-from-fast article)) + (push (spam-fetch-field-from-fast article) addresses))) + ;; now do the register/unregister action + (spam-enter-ham-BBDB addresses unregister))) + + (defun spam-BBDB-unregister-routine (articles) + (spam-BBDB-register-routine articles t)) + + (defun spam-check-BBDB () + "Mail from people in the BBDB is classified as ham or non-spam" + (let ((who (nnmail-fetch-field "from")) + (spam-split-group (if spam-split-symbolic-return + 'spam + spam-split-group))) + (when who + (setq who (nth 1 (gnus-extract-address-components who))) + (if (bbdb-search-simple nil who) + t + (if spam-use-BBDB-exclusive + spam-split-group + nil))))))) ;;;; ifile @@ -1411,66 +1412,63 @@ Uses `gnus-newsgroup-name' if category is nil (for ham registration)." ;;;; spam-stat -(condition-case nil - (progn - (let ((spam-stat-install-hooks nil)) - (require 'spam-stat)) - - (defun spam-check-stat () - "Check the spam-stat backend for the classification of this message" - (let ((spam-split-group (if spam-split-symbolic-return - 'spam - spam-split-group)) - (spam-stat-split-fancy-spam-group spam-split-group) ; override - (spam-stat-buffer (buffer-name)) ; stat the current buffer - category return) - (spam-stat-split-fancy))) - - (defun spam-stat-register-spam-routine (articles &optional unregister) - (dolist (article articles) - (let ((article-string (spam-get-article-as-string article))) - (with-temp-buffer - (insert article-string) - (if unregister - (spam-stat-buffer-change-to-non-spam) +(eval-when-compile + (autoload 'spam-stat-buffer-change-to-non-spam "spam-stat") + (autoload 'spam-stat-buffer-change-to-spam "spam-stat") + (autoload 'spam-stat-buffer-is-non-spam "spam-stat") + (autoload 'spam-stat-buffer-is-spam "spam-stat") + (autoload 'spam-stat-load "spam-stat") + (autoload 'spam-stat-save "spam-stat") + (autoload 'spam-stat-split-fancy "spam-stat")) + +(eval-and-compile + (when (condition-case nil + (let ((spam-stat-install-hooks nil)) + (require 'spam-stat)) + (file-error + (defalias 'spam-stat-register-ham-routine 'ignore) + (defalias 'spam-stat-register-spam-routine 'ignore) + nil)) + + (defun spam-check-stat () + "Check the spam-stat backend for the classification of this message" + (let ((spam-split-group (if spam-split-symbolic-return + 'spam + spam-split-group)) + (spam-stat-split-fancy-spam-group spam-split-group) ; override + (spam-stat-buffer (buffer-name)) ; stat the current buffer + category return) + (spam-stat-split-fancy))) + + (defun spam-stat-register-spam-routine (articles &optional unregister) + (dolist (article articles) + (let ((article-string (spam-get-article-as-string article))) + (with-temp-buffer + (insert article-string) + (if unregister + (spam-stat-buffer-change-to-non-spam) (spam-stat-buffer-is-spam)))))) - (defun spam-stat-unregister-spam-routine (articles) - (spam-stat-register-spam-routine articles t)) + (defun spam-stat-unregister-spam-routine (articles) + (spam-stat-register-spam-routine articles t)) - (defun spam-stat-register-ham-routine (articles &optional unregister) - (dolist (article articles) - (let ((article-string (spam-get-article-as-string article))) - (with-temp-buffer - (insert article-string) - (if unregister - (spam-stat-buffer-change-to-spam) + (defun spam-stat-register-ham-routine (articles &optional unregister) + (dolist (article articles) + (let ((article-string (spam-get-article-as-string article))) + (with-temp-buffer + (insert article-string) + (if unregister + (spam-stat-buffer-change-to-spam) (spam-stat-buffer-is-non-spam)))))) - (defun spam-stat-unregister-ham-routine (articles) - (spam-stat-register-ham-routine articles t)) - - (defun spam-maybe-spam-stat-load () - (when spam-use-stat (spam-stat-load))) - - (defun spam-maybe-spam-stat-save () - (when spam-use-stat (spam-stat-save)))) - - (file-error (progn - (defalias 'spam-stat-load 'ignore) - (defalias 'spam-stat-save 'ignore) - (defalias 'spam-maybe-spam-stat-load 'ignore) - (defalias 'spam-maybe-spam-stat-save 'ignore) - (defalias 'spam-stat-register-ham-routine 'ignore) - (defalias 'spam-stat-unregister-ham-routine 'ignore) - (defalias 'spam-stat-register-spam-routine 'ignore) - (defalias 'spam-stat-unregister-spam-routine 'ignore) - (defalias 'spam-stat-buffer-is-spam 'ignore) - (defalias 'spam-stat-buffer-change-to-spam 'ignore) - (defalias 'spam-stat-buffer-is-non-spam 'ignore) - (defalias 'spam-stat-buffer-change-to-non-spam 'ignore) - (defalias 'spam-stat-split-fancy 'ignore) - (defalias 'spam-check-stat 'ignore)))) + (defun spam-stat-unregister-ham-routine (articles) + (spam-stat-register-ham-routine articles t)) + + (defun spam-maybe-spam-stat-load () + (when spam-use-stat (spam-stat-load))) + + (defun spam-maybe-spam-stat-save () + (when spam-use-stat (spam-stat-save))))) diff --git a/man/ChangeLog b/man/ChangeLog index f86d960d6d2..24c322facd1 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -102,6 +102,17 @@ to Alex Ott, Karl Fogel, Stefan Monnier, and David Kastrup for suggestions. +2004-11-22 Reiner Steib + + * message.texi (Various Message Variables): Mention that all mail + file variables are derived from `message-directory'. + + * gnus.texi (Splitting Mail): Clarify bogus group. + +2004-11-16 Reiner Steib + + * gnus.texi (Filtering Spam Using The Spam ELisp Package): + 2004-11-02 Katsumi Yamaoka * emacs-mime.texi (Encoding Customization): Fix diff --git a/man/gnus.texi b/man/gnus.texi index ca9045bf5b9..50d7bd16de8 100644 --- a/man/gnus.texi +++ b/man/gnus.texi @@ -13244,14 +13244,16 @@ called narrowed to the headers with the first element of the rule as the argument. It should return a non-@code{nil} value if it thinks that the mail belongs in that group. +@cindex @samp{bogus} group The last of these groups should always be a general one, and the regular -expression should @emph{always} be @samp{*} so that it matches any mails +expression should @emph{always} be @samp{""} so that it matches any mails that haven't been matched by any of the other regexps. (These rules are -processed from the beginning of the alist toward the end. The first -rule to make a match will ``win'', unless you have crossposting enabled. -In that case, all matching rules will ``win''.) When new groups are -created by splitting mail, you may want to run -@code{gnus-group-find-new-groups} to see the new groups. +processed from the beginning of the alist toward the end. The first rule +to make a match will ``win'', unless you have crossposting enabled. In +that case, all matching rules will ``win''.) If no rule matched, the mail +will end up in the @samp{bogus} group. When new groups are created by +splitting mail, you may want to run @code{gnus-group-find-new-groups} to +see the new groups. This also applies to the @samp{bogus} group. If you like to tinker with this yourself, you can set this variable to a function of your choice. This function will be called without any @@ -13268,7 +13270,7 @@ some add @code{X-Gnus-Group} headers; most rename the Unix mbox The mail back ends all support cross-posting. If several regexps match, the mail will be ``cross-posted'' to all those groups. @code{nnmail-crosspost} says whether to use this mechanism or not. Note -that no articles are crossposted to the general (@samp{*}) group. +that no articles are crossposted to the general (@samp{""}) group. @vindex nnmail-crosspost-link-function @cindex crosspost diff --git a/man/message.texi b/man/message.texi index b4e20f84d80..4d4f7af2a07 100644 --- a/man/message.texi +++ b/man/message.texi @@ -1867,6 +1867,7 @@ follows this line--} by default. @item message-directory @vindex message-directory Directory used by many mailey things. The default is @file{~/Mail/}. +All other mail file variables are derived from @code{message-directory}. @item message-auto-save-directory @vindex message-auto-save-directory