From 7941e04e6148538328ae4c3dd9320bd7a1690bce Mon Sep 17 00:00:00 2001 From: yamaoka Date: Wed, 1 Jan 2003 23:52:34 +0000 Subject: [PATCH] Synch with Oort Gnus. --- lisp/ChangeLog | 74 +++++++++++++++++++++++++ lisp/deuglify.el | 17 +++--- lisp/dns.el | 3 + lisp/gnus-agent.el | 3 + lisp/gnus-msg.el | 29 +++++----- lisp/gnus-sum.el | 27 ++++++++- lisp/message.el | 149 ++++++++++++++++++++++++++++++++++---------------- lisp/nndraft.el | 6 ++ lisp/spam.el | 33 ++++++++--- texi/ChangeLog | 5 ++ texi/message-ja.texi | 24 +++++++- texi/message.texi | 20 ++++++- 12 files changed, 309 insertions(+), 81 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 60004a5..cb4f1d2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,77 @@ +2003-01-01 Teodor Zlatanov + + * spam.el (spam-ham-marks, spam-spam-marks): changed list + customization and list itself to store mark symbol rather than + mark character. + (spam-bogofilter-register-routine): added logic to generate mark + values list from spam-ham-marks and spam-spam-marks, so (member) + would work. + +2003-01-01 Raymond Scholz + + * message.el (message-signature-insert-empty-line): New variable. + +2002-12-30 Reiner Steib + + * message.el: Renamed functions and variables: "xpost" -> + "cross-post", "-fup2" -> "-followup-to". + (message-cross-post-old-target, message-cross-post-default, + message-cross-post-note, message-followup-to-note, + message-cross-post-note-function): New variables names. + (message-xpost-old-target, message-xpost-default, + message-xpost-note, message-fup2-note, + message-xpost-note-function): Removed variable names. + (message-cross-post-followup-to-header, + message-cross-post-insert-note, message-cross-post-followup-to): + New function names. + (message-xpost-fup2-header, message-xpost-insert-note, + message-xpost-fup2): Removed function names. + +2002-12-30 Reiner Steib + + * message.el (message-send-mail): Added message-cleanup-headers to + prevent newlines in headers. + +2003-01-01 Lars Magne Ingebrigtsen + + * dns.el (dns-make-network-process): Comment. + + * gnus-sum.el (gnus-summary-display-while-building): Default to + nil. + +2003-01-01 Wes Hardaker + + * gnus-sum.el (gnus-summary-display-while-building): New + variable. + +2002-01-01 Raymond Scholz + + * deuglify.el (gnus-outlook-rearrange-article): Kill overlays + before rearranging the article. + +2003-01-01 Lars Magne Ingebrigtsen + + * nndraft.el (nndraft-generate-headers): New function. + (nndraft-request-associate-buffer): Use it to write headers on + buffer save. + + * message.el (message-generate-headers): Let the function be a + lambda form. + (message-draft-headers): New variable. + + * gnus-msg.el (gnus-inews-make-draft-meta-information): New + function. + (gnus-setup-message): Use it. + + * message.el (message-generate-headers-first): Doc fix. + (message-setup-1): Use new function for getting which headers to + generate. + (message-headers-to-generate): New function. + +2003-01-01 ShengHuo ZHU + + * gnus-agent.el (gnus-agent-save-alist): Make directory. + 2002-12-31 Reiner Steib <4uce.02.r.steib@gmx.net> * gnus-sum.el (gnus-summary-limit-to-age): Make prompt string diff --git a/lisp/deuglify.el b/lisp/deuglify.el index 77cf564..65951c4 100644 --- a/lisp/deuglify.el +++ b/lisp/deuglify.el @@ -311,17 +311,17 @@ length of an unwrapped citation line." (goto-char (match-beginning 0)))))))))) (defun gnus-outlook-rearrange-article (from-where) - "Put the text from `from-where' to the end of buffer at the top of -the article buffer." + "Put the text from `from-where' to the end of buffer at the top of the article buffer." (save-excursion (let ((inhibit-read-only t) (cite-marks gnus-outlook-deuglify-cite-marks)) (gnus-with-article-buffer - (beginning-of-buffer) - (re-search-forward "^$") - (transpose-regions (point) (- from-where 1) - from-where (point-max) t))))) - + (article-goto-body) + ;; attribution out of place? + (unless (= (point) from-where) + (gnus-kill-all-overlays) + (transpose-regions (point) (+ from-where 1) + (+ from-where 1) (point-max))))))) ;; John Doe wrote in message ;; news:a87usw8$dklsssa$2@some.news.server... @@ -341,6 +341,7 @@ the article buffer." "\\(" gnus-outlook-deuglify-attrib-end-regexp "\\)$") nil t) (progn + (gnus-kill-all-overlays) (replace-match "\\1\\2\\4") (match-beginning 0))))))) @@ -367,6 +368,7 @@ the article buffer." "[^\n]+: [^\n]+$") nil t) (progn + (gnus-kill-all-overlays) (replace-match "\\1 wrote:") (match-beginning 0))))))) @@ -387,6 +389,7 @@ the article buffer." "\\(" gnus-outlook-deuglify-attrib-end-regexp "\\)$") nil t) (progn + (gnus-kill-all-overlays) (replace-match "\\4 \\5\\6\\7") (match-beginning 0))))))) diff --git a/lisp/dns.el b/lisp/dns.el index dcac670..4be31e7 100644 --- a/lisp/dns.el +++ b/lisp/dns.el @@ -298,6 +298,9 @@ If TCP-P, the first two bytes of the package with be the length field." :host server :service "domain" :type 'datagram) + ;; Older versions of Emacs doesn't have + ;; `make-network-process', so we fall back on opening a TCP + ;; connection to the DNS server. (open-network-stream "dns" (current-buffer) server "domain"))))) (defun query-dns (name &optional type fullp) diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index ab6e70e..922eef2 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -1385,6 +1385,9 @@ of FILE placing the combined headers in nntp-server-buffer." (setcdr (cadr prev) state))) (setq prev (cdr prev))) (setq gnus-agent-article-alist (cdr all)) + (if dir + (gnus-make-directory dir) + (gnus-make-directory (gnus-agent-article-name "" group))) (with-temp-file (if dir (expand-file-name ".agentview" dir) (gnus-agent-article-name ".agentview" group)) diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index a124984..d99b04d 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -416,12 +416,20 @@ Thank you for your help in stamping out bugs. (add-hook 'message-mode-hook (lambda () (gnus-configure-posting-styles ,group))) + (gnus-pull ',(intern gnus-draft-meta-information-header) + message-required-headers) + (when (and ,group + (not (string= ,group ""))) + (push '(,(intern gnus-draft-meta-information-header) + . (lambda () + (gnus-inews-make-draft-meta-information + ,gnus-newsgroup-name ,gnus-article-reply))) + message-required-headers)) (unwind-protect (progn ,@forms) (gnus-inews-add-send-actions ,winconf ,buffer ,article ,config ,yanked) - (gnus-inews-insert-draft-meta-information ,group ,article) (setq gnus-message-buffer (current-buffer)) (set (make-local-variable 'gnus-message-group-art) (cons ,group ,article)) @@ -433,18 +441,13 @@ Thank you for your help in stamping out bugs. (run-hooks 'post-command-hook) (set-buffer-modified-p nil)))) -(defun gnus-inews-insert-draft-meta-information (group article) - (save-excursion - (when (and group - (not (string= group "")) - (not (message-fetch-field gnus-draft-meta-information-header))) - (goto-char (point-min)) - (insert gnus-draft-meta-information-header ": (\"" group "\" " - (if article (number-to-string - (if (listp article) - (car article) - article)) "\"\"") - ")\n")))) +(defun gnus-inews-make-draft-meta-information (group article) + (concat "(\"" group "\" " + (if article (number-to-string + (if (listp article) + (car article) + article)) "\"\"") + ")")) ;;;###autoload (defun gnus-msg-mail (&optional to subject other-headers continue diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 7554adc..7325ce2 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -4510,6 +4510,8 @@ or a straight list of headers." (let ((gnus-tmp-level 0) (default-score (or gnus-summary-default-score 0)) (gnus-visual-p (gnus-visual-p 'summary-highlight 'highlight)) + (building-line-count gnus-summary-display-while-building) + (building-count (integerp gnus-summary-display-while-building)) thread number subject stack state gnus-tmp-gathered beg-match new-roots gnus-tmp-new-adopts thread-end simp-subject gnus-tmp-header gnus-tmp-unread gnus-tmp-downloaded @@ -4529,6 +4531,8 @@ or a straight list of headers." ;; Do the threaded display. + (if gnus-summary-display-while-building + (switch-to-buffer (buffer-name))) (while (or threads stack gnus-tmp-new-adopts new-roots) (if (and (= gnus-tmp-level 0) @@ -4778,6 +4782,17 @@ or a straight list of headers." (push (if (nth 1 thread) 1 0) tree-stack) (incf gnus-tmp-level) (setq threads (if thread-end nil (cdar thread))) + (if gnus-summary-display-while-building + (if building-count + (progn + ;; use a set frequency + (setq building-line-count (1- building-line-count)) + (when (= building-line-count 0) + (sit-for 0) + (setq building-line-count + gnus-summary-display-while-building))) + ;; always + (sit-for 0))) (unless threads (setq gnus-tmp-level 0))))) (gnus-message 7 "Generating summary...done")) @@ -5093,7 +5108,8 @@ If SELECT-ARTICLES, only select those articles from GROUP." (defun gnus-articles-to-read (group &optional read-all) "Find out what articles the user wants to read." - (let* ((articles + (let* ((display (gnus-group-find-parameter group 'display)) + (articles ;; Select all articles if `read-all' is non-nil, or if there ;; are no unread articles. (if (or read-all @@ -8922,6 +8938,15 @@ If nil, use to the current newsgroup method." :type 'symbol :group 'gnus-summary-mail) +(defcustom gnus-summary-display-while-building nil + "If not-nil, show and update the summary buffer as it's being built. +If the value is t, update the buffer after every line is inserted. If +the value is an integer (N), update the display every N lines." + :group 'gnus-thread + :type '(choice (const :tag "off" nil) + number + (const :tag "frequently" t))) + (defun gnus-summary-respool-article (&optional n method) "Respool the current article. The article will be squeezed through the mail spooling process again, diff --git a/lisp/message.el b/lisp/message.el index fa11f64..0c91dd2 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -263,21 +263,21 @@ If nil, don't insert any text in the body." ;; inspired by JoH-followup-to by Jochem Huhman ;; new suggestions by R. Weikusat -(defvar message-xpost-old-target nil +(defvar message-cross-post-old-target nil "Old target for cross-posts or follow-ups.") -(make-variable-buffer-local 'message-xpost-old-target) +(make-variable-buffer-local 'message-cross-post-old-target) ;;;###autoload -(defcustom message-xpost-default t - "When non-nil `message-xpost-fup2' will normally perform a crosspost. -If nil, `message-xpost-fup2' will only do a followup. Note that you -can explicitly override this setting by calling `message-xpost-fup2' -with a prefix." +(defcustom message-cross-post-default t + "When non-nil `message-cross-post-followup-to' will normally perform a +crosspost. If nil, `message-cross-post-followup-to' will only do a followup. +Note that you can explicitly override this setting by calling +`message-cross-post-followup-to' with a prefix." :type 'boolean :group 'message-various) ;;;###autoload -(defcustom message-xpost-note +(defcustom message-cross-post-note "Crosspost & Followup-To: " "Note to insert before signature to notify of xpost and follow-up." :type 'string @@ -291,12 +291,12 @@ with a prefix." :group 'message-various) ;;;###autoload -(defcustom message-xpost-note-function - 'message-xpost-insert-note +(defcustom message-cross-post-note-function + 'message-cross-post-insert-note "Function to use to insert note about Crosspost or Followup-To. The function will be called with four arguments. The function should not only insert a note, but also ensure old notes are deleted. See the documentation -for `message-xpost-insert-note'. " +for `message-cross-post-insert-note'. " :type 'function :group 'message-various) @@ -353,6 +353,12 @@ Also see `message-required-news-headers' and :group 'message-headers :type '(repeat sexp)) +(defcustom message-draft-headers '(References) + "*Headers to be generated when saving a draft message." + :group 'message-news + :group 'message-headers + :type '(repeat sexp)) + (defcustom message-required-news-headers '(From Newsgroups Subject Date Message-ID (optional . Organization) @@ -832,6 +838,8 @@ variable isn't used." "*If non-nil, generate all required headers before composing. The variables `message-required-news-headers' and `message-required-mail-headers' specify which headers to generate. +This can also be a list of headers that should be generated before +composing. Note that the variable `message-deletable-headers' specifies headers which are to be deleted and then re-generated before sending, so this variable @@ -990,6 +998,12 @@ If nil, don't insert a signature." :type '(choice file (const :tags "None" nil)) :group 'message-insertion) +;;;###autoload +(defcustom message-signature-insert-empty-line t + "*If non-nil, insert an empty line before the signature separator." + :type 'boolean + :group 'message-insertion) + (defcustom message-distribution-function nil "*Function called to return a Distribution header." :group 'message-news @@ -1885,7 +1899,7 @@ body, set `message-archive-note' to nil." (message-sort-headers))) ;;;###autoload -(defun message-xpost-fup2-header (target-group) +(defun message-cross-post-followup-to-header (target-group) "Mangles FollowUp-To and Newsgroups header to point to TARGET-GROUP. With prefix-argument just set Follow-Up, don't cross-post." (interactive @@ -1900,19 +1914,19 @@ With prefix-argument just set Follow-Up, don't cross-post." (message-goto-newsgroups) (beginning-of-line) ;; if we already did a crosspost before, kill old target - (if (and message-xpost-old-target + (if (and message-cross-post-old-target (re-search-forward - (regexp-quote (concat "," message-xpost-old-target)) + (regexp-quote (concat "," message-cross-post-old-target)) nil t)) (replace-match "")) ;; unless (followup is to poster or user explicitly asked not ;; to cross-post, or target-group is already in Newsgroups) ;; add target-group to Newsgroups line. (cond ((and (or - ;; def: xpost, req:no - (and message-xpost-default (not current-prefix-arg)) - ;; def: no-xpost, req:yes - (and (not message-xpost-default) current-prefix-arg)) + ;; def: cross-post, req:no + (and message-cross-post-default (not current-prefix-arg)) + ;; def: no-cross-post, req:yes + (and (not message-cross-post-default) current-prefix-arg)) (not (string-match "poster" target-group)) (not (string-match (regexp-quote target-group) (message-fetch-field "Newsgroups")))) @@ -1926,13 +1940,14 @@ With prefix-argument just set Follow-Up, don't cross-post." "[ \t]*$") (message-fetch-field "Newsgroups"))) (insert (concat "\nFollowup-To: " target-group))) - (setq message-xpost-old-target target-group)) + (setq message-cross-post-old-target target-group)) ;;;###autoload -(defun message-xpost-insert-note (target-group xpost in-old old-groups) +(defun message-cross-post-insert-note (target-group cross-post in-old + old-groups) "Insert a in message body note about a set Followup or Crosspost. If there have been previous notes, delete them. TARGET-GROUP specifies the -group to Followup-To. When XPOST is t, insert note about +group to Followup-To. When CROSS-POST is t, insert note about crossposting. IN-OLD specifies whether TARGET-GROUP is a member of OLD-GROUPS. OLD-GROUPS lists the old-groups the posting would have been made to before the user asked for a Crosspost." @@ -1943,25 +1958,25 @@ been made to before the user asked for a Crosspost." nil t))) ; just search in body (message-goto-signature) (while (re-search-backward - (concat "^" (regexp-quote message-xpost-note) ".*") + (concat "^" (regexp-quote message-cross-post-note) ".*") head t) (message-delete-line)) (message-goto-signature) (while (re-search-backward - (concat "^" (regexp-quote message-fup2-note) ".*") + (concat "^" (regexp-quote message-followup-to-note) ".*") head t) (message-delete-line)) ;; insert new note (if (message-goto-signature) (re-search-backward message-signature-separator)) (if (or in-old - (not xpost) + (not cross-post) (string-match "^[ \t]*poster[ \t]*$" target-group)) - (insert (concat message-fup2-note target-group "\n")) - (insert (concat message-xpost-note target-group "\n"))))) + (insert (concat message-followup-to-note target-group "\n")) + (insert (concat message-cross-post-note target-group "\n"))))) ;;;###autoload -(defun message-xpost-fup2 (target-group) +(defun message-cross-post-followup-to (target-group) "Crossposts message and sets Followup-To to TARGET-GROUP. With prefix-argument just set Follow-Up, don't cross-post." (interactive @@ -1990,13 +2005,13 @@ With prefix-argument just set Follow-Up, don't cross-post." "[ \t]*$") old-groups))) ;; yes, Newsgroups line must change - (message-xpost-fup2-header target-group) - ;; insert note whether we do xpost or fup2 - (funcall message-xpost-note-function + (message-cross-post-followup-to-header target-group) + ;; insert note whether we do cross-post or fup2 + (funcall message-cross-post-note-function target-group - (if (or (and message-xpost-default + (if (or (and message-cross-post-default (not current-prefix-arg)) - (and (not message-xpost-default) + (and (not message-cross-post-default) current-prefix-arg)) t) in-old old-groups)))))))) @@ -2216,8 +2231,8 @@ Point is left at the beginning of the narrowed-to region." ;; modify headers (and insert notes in body) (define-key message-mode-map "\C-c\C-fs" 'message-change-subject) ;; - (define-key message-mode-map "\C-c\C-fx" 'message-xpost-fup2) - ;; prefix+message-xpost-fup2 = same w/o xpost + (define-key message-mode-map "\C-c\C-fx" 'message-cross-post-followup-to) + ;; prefix+message-cross-post-followup-to = same w/o cross-post (define-key message-mode-map "\C-c\C-ft" 'message-reduce-to-to-cc) (define-key message-mode-map "\C-c\C-fa" 'message-add-archive-header) ;; mark inserted text @@ -2334,8 +2349,8 @@ Point is left at the beginning of the narrowed-to region." ["Keywords" message-goto-keywords t] ["Newsgroups" message-goto-newsgroups t] ["Followup-To" message-goto-followup-to t] - ;; ["Followup-To (with note in body)" message-xpost-fup2 t] - ["Crosspost / Followup-To..." message-xpost-fup2 t] + ;; ["Followup-To (with note in body)" message-cross-post-followup-to t] + ["Crosspost / Followup-To..." message-cross-post-followup-to t] ["Distribution" message-goto-distribution t] ["X-No-Archive:" message-add-archive-header t ] "----" @@ -2932,6 +2947,8 @@ Prefix arg means justify as well." ;; Insert the signature. (unless (bolp) (insert "\n")) + (when message-signature-insert-empty-line + (insert "\n")) (insert "\n" message-signature-separator-for-insertion) (unless (bolp) (insert "\n")) @@ -3903,6 +3920,7 @@ This sub function is for exclusive use of `message-send-mail'." ;; require one newline at the end. (or (= (preceding-char) ?\n) (insert ?\n)) + (message-cleanup-headers) (when (save-restriction (message-narrow-to-headers) @@ -5186,21 +5204,27 @@ Headers already prepared in the buffer are not modified." ;; So we find out what value we should insert. (setq value (cond - ((and (consp elem) (eq (car elem) 'optional)) + ((and (consp elem) + (eq (car elem) 'optional)) ;; This is an optional header. If the cdr of this ;; is something that is nil, then we do not insert ;; this header. (setq header (cdr elem)) - (or (and (fboundp (cdr elem)) (funcall (cdr elem))) - (and (boundp (cdr elem)) (symbol-value (cdr elem))))) + (or (and (message-functionp (cdr elem)) + (funcall (cdr elem))) + (and (boundp (cdr elem)) + (symbol-value (cdr elem))))) ((consp elem) ;; The element is a cons. Either the cdr is a ;; string to be inserted verbatim, or it is a ;; function, and we insert the value returned from ;; this function. - (or (and (stringp (cdr elem)) (cdr elem)) - (and (fboundp (cdr elem)) (funcall (cdr elem))))) - ((and (boundp header) (symbol-value header)) + (or (and (stringp (cdr elem)) + (cdr elem)) + (and (message-functionp (cdr elem)) + (funcall (cdr elem))))) + ((and (boundp header) + (symbol-value header)) ;; The element is a symbol. We insert the value ;; of this symbol, if any. (symbol-value header)) @@ -5581,6 +5605,31 @@ than 988 characters long, and if they are not, trim them until they are." headers) nil switch-function yank-action actions))))) +(defun message-headers-to-generate (headers included-headers excluded-headers) + "Return a list that includes all headers from HEADERS. +If INCLUDED-HEADERS is a list, just include those headers. If if is +t, include all headers. In any case, headers from EXCLUDED-HEADERS +are not included." + (let ((result nil) + header-name) + (dolist (header headers) + (setq header-name (cond + ((and (consp header) + (eq (car header) 'optional)) + ;; On the form (optional . Header) + (cdr header)) + ((consp header) + ;; On the form (Header . function) + (car header)) + (t + ;; Just a Header. + header))) + (when (and (not (memq header-name excluded-headers)) + (or (eq included-headers t) + (memq header-name included-headers))) + (push header result))) + (nreverse result))) + (defun message-setup-1 (headers &optional replybuffer actions) (dolist (action actions) (condition-case nil @@ -5617,18 +5666,22 @@ than 988 characters long, and if they are not, trim them until they are." (or (bolp) (insert ?\n))) (when message-generate-headers-first (message-generate-headers - (delq 'Lines - (delq 'Subject - (copy-sequence message-required-news-headers)))))) + (message-headers-to-generate + (append message-required-news-headers + message-required-headers) + message-generate-headers-first + '(Lines Subject))))) (when (message-mail-p) (when message-default-mail-headers (insert message-default-mail-headers) (or (bolp) (insert ?\n))) (when message-generate-headers-first (message-generate-headers - (delq 'Lines - (delq 'Subject - (copy-sequence message-required-mail-headers)))))) + (message-headers-to-generate + (append message-required-mail-headers + message-required-headers) + message-generate-headers-first + '(Lines Subject))))) (run-hooks 'message-signature-setup-hook) (message-insert-signature) (save-restriction diff --git a/lisp/nndraft.el b/lisp/nndraft.el index 5c1f0c9..1055df3 100644 --- a/lisp/nndraft.el +++ b/lisp/nndraft.el @@ -152,6 +152,11 @@ nil)))) t) +(defun nndraft-generate-headers () + (message-generate-headers + (message-headers-to-generate + message-required-headers message-draft-headers nil))) + (deffoo nndraft-request-associate-buffer (group) "Associate the current buffer with some article in the draft group." (nndraft-open-server "") @@ -168,6 +173,7 @@ (setq buffer-file-name (expand-file-name file) buffer-auto-save-file-name (make-auto-save-file-name)) (clear-visited-file-modtime) + (push 'nndraft-generate-headers write-contents-hooks) article)) (deffoo nndraft-request-group (group &optional server dont-check) diff --git a/lisp/spam.el b/lisp/spam.el index 34a9a21..a8d02a0 100644 --- a/lisp/spam.el +++ b/lisp/spam.el @@ -36,6 +36,8 @@ (require 'gnus-sum) +(require 'gnus-uu) ; because of key prefix issues + ;; FIXME! We should not require `message' until we actually need ;; them. Best would be to declare needed functions as auto-loadable. (require 'message) @@ -140,16 +142,25 @@ All unmarked article in such group receive the spam mark on group entry." :type '(repeat (string :tag "Server")) :group 'spam) -(defcustom spam-ham-marks (list gnus-del-mark gnus-read-mark gnus-killed-mark gnus-kill-file-mark gnus-low-score-mark) +(defcustom spam-ham-marks (list 'gnus-del-mark 'gnus-read-mark 'gnus-killed-mark 'gnus-kill-file-mark 'gnus-low-score-mark) "Marks considered as being ham (positively not spam). Such articles will be processed as ham (non-spam) on group exit." - :type '(repeat (character :tag "Mark")) + :type '(set + (variable-item gnus-del-mark) + (variable-item gnus-read-mark) + (variable-item gnus-killed-mark) + (variable-item gnus-kill-file-mark) + (variable-item gnus-low-score-mark)) :group 'spam) -(defcustom spam-spam-marks (list gnus-spam-mark) +(defcustom spam-spam-marks (list 'gnus-spam-mark) "Marks considered as being spam (positively spam). Such articles will be transmitted to `bogofilter -s' on group exit." - :type '(repeat (character :tag "Mark")) + :type '(set + (variable-item gnus-spam-mark) + (variable-item gnus-killed-mark) + (variable-item gnus-kill-file-mark) + (variable-item gnus-low-score-mark)) :group 'spam) (defcustom spam-face 'gnus-splash-face @@ -516,13 +527,21 @@ spamicity coefficient of each, and the overall article spamicity." (defun spam-bogofilter-register-routine () (when (and spam-use-bogofilter spam-bogofilter-path) (let ((articles gnus-newsgroup-articles) - article mark ham-articles spam-articles) + article mark ham-articles spam-articles spam-mark-values ham-mark-values) + + ;; marks are stored as symbolic values, so we have to dereference them for memq to work + (dolist (mark spam-ham-marks) + (push (symbol-value mark) ham-mark-values)) + + (dolist (mark spam-spam-marks) + (push (symbol-value mark) spam-mark-values)) + (while articles (setq article (pop articles) mark (gnus-summary-article-mark article)) - (cond ((memq mark spam-spam-marks) (push article spam-articles)) + (cond ((memq mark spam-mark-values) (push article spam-articles)) ((memq article gnus-newsgroup-saved)) - ((memq mark spam-ham-marks) (push article ham-articles)))) + ((memq mark ham-mark-values) (push article ham-articles)))) (when ham-articles (spam-bogofilter-articles "ham" "-n" ham-articles)) (when spam-articles diff --git a/texi/ChangeLog b/texi/ChangeLog index 81efada..4153255 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,8 @@ +2003-01-01 Lars Magne Ingebrigtsen + + * message.texi (Message Headers): Added example. + (Message Headers): Addition. + 2002-12-31 Kai Gro,A_(Bjohann * gnus.texi (Top): Add pointers to related manuals. Suggested by diff --git a/texi/message-ja.texi b/texi/message-ja.texi index 48a907b..4681aa9 100644 --- a/texi/message-ja.texi +++ b/texi/message-ja.texi @@ -1134,8 +1134,13 @@ Message $B$O%a%C%;!<%8:n@.ItJ,$K4X$7$F$OHs>o$K@Q6KE*$G$9!#$=$l$Oo$K@Q6KE*$G$9!#$=$l$OC$5$l$?$j:n$jD>$5$l$?$j$7$^$9!#$3$l$K(B $B$OJQ?t(B @code{message-deletable-headers} ($B8e=R(B) $B$,4X78$7$^$9!#(B +@item message-draft-headers +@vindex message-draft-headers +Message $B$,(B gnus $B>e$GAv$C$F$$$k>l9g!"%a%C%;!<%8%P%C%U%!$O%I%i%U%H%0%k!<%W(B +$B$H4XO"IU$1$i$l$F$$$^$9!#(B@code{message-draft-headers} $B$O!"$=$N%I%i%U%H%0(B +$B%k!<%W$K%I%i%U%H$,5-O?$5$l$k$H$-$K!"$I$N%X%C%@!<$,:n@.$5$l$k$Y$-$+$r;X<((B +$B$7$^$9!#(B + @item message-from-style @vindex message-from-style @code{From} $B%X%C%@!<$,$I$N$h$&$K8+$($k$+$r;XDj$7$^$9!#0J2<$N#4$D$NCM$,;H(B @@ -1616,6 +1628,11 @@ Hallvard B Furuseth writes: @vindex message-signature-file $B%P%C%U%!$N:G8e$KA^F~$5$l$k=pL>$NF~$C$F$$$k%U%!%$%k$G$9!#=i4|CM(B $B$O(B @file{~/.signature} $B$G$9!#(B + +@item message-signature-insert-empty-line +@vindex message-signature-insert-empty-line +@code{t} ($B%G%#%U%)%k%H(B) $B$@$C$?$i!"=pL>$HK\BN$rJ,N%$9$k5-9f$NA0$K6u9T$,A^(B +$BF~$5$l$^$9!#(B @end table RFC1036bis $B$O!"=pL>$O$=$NA0$K(B @samp{-- } $B$N(B3$BJ8;z$@$1$N9T$,$"$k$Y$-$G$"$k(B @@ -1644,7 +1661,8 @@ RFC1036bis $B$O!"=pL>$O$=$NA0$K(B @samp{-- } $B$N(B3$BJ8;z$@$1$N9T$,$"$k$Y$ @c @item message-signature-separator @vindex message-signature-separator -$B=pL>J,N%$K9gCW$9$k@55,I=8=$G$9!#=i4|CM$O(B @samp{^-- *$} $B$G$9!#(B +$B=pL>$HK\BN$rJ,N%$9$k5-9f$K9gCW$9$k@55,I=8=$G$9!#=i4|CM(B +$B$O(B @samp{^-- *$} $B$G$9!#(B @item mail-header-separator @vindex mail-header-separator diff --git a/texi/message.texi b/texi/message.texi index 4008078..210cc5a 100644 --- a/texi/message.texi +++ b/texi/message.texi @@ -1130,8 +1130,13 @@ look sufficiently similar. @item message-generate-headers-first @vindex message-generate-headers-first -If non-@code{nil}, generate all required headers before starting to -compose the message. +If @code{t}, generate all required headers before starting to +compose the message. This can also be a list of headers to generate: + +@lisp +(setq message-generate-headers-first + '(References)) +@end lisp @vindex message-required-headers The variables @code{message-required-headers}, @@ -1142,6 +1147,12 @@ required. Note that some headers will be removed and re-generated before posting, because of the variable @code{message-deletable-headers} (see below). +@item message-draft-headers +@vindex message-draft-headers +When running Message from Gnus, the message buffers are associated +with a draft group. @code{message-draft-headers} says which headers +should be generated when a draft is written to the draft group. + @item message-from-style @vindex message-from-style Specifies how @code{From} headers should look. There are four valid @@ -1635,6 +1646,11 @@ If this variable is @code{nil}, no signature will be inserted at all. File containing the signature to be inserted at the end of the buffer. The default is @file{~/.signature}. +@item message-signature-insert-empty-line +@vindex message-signature-insert-empty-line +If @code{t} (the default value) an empty line is inserted before the +signature separator. + @end table Note that RFC1036bis says that a signature should be preceded by the three -- 1.7.10.4