From: yamaoka Date: Wed, 25 Jul 2001 22:42:41 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_4-04-quimby-last-~12 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e971adfae93f0ac04a270244477ef4bc492a2454;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cf08b51..b38c546 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,37 @@ +2001-07-25 12:54:00 Danny Siu + + * gnus-sum.el (gnus-summary-prepare-threads): Shouldn't do tree + display (%B) for threads if threading is off. + +2001-07-25 14:00:00 ShengHuo ZHU + From Henrik Enberg + + * gnus-msg.el: Customization patch. + +2001-07-25 22:22:22 Raymond Scholz + + * nnmail.el (nnmail-split-fancy-with-parent-ignore-groups): New + variable. + (nnmail-split-fancy-with-parent): Ignore certain groups. + +2001-07-25 11:00:00 ShengHuo ZHU + + * gnus-util.el (gnus-byte-compile): New. + (gnus-use-byte-compile): New. + (gnus-make-sort-function): Use it. + + * nnmail.el (nnmail-get-new-mail): Use it. + + * gnus-agent.el (gnus-category-make-function): Simple function or + compiled function. + (gnus-agent-fetch-group-1): Don't use (caaddr predicate). + + * gnus-gl.el (bbb-build-rate-command): Remove quote before lambda. + * gnus-topic.el (gnus-topic-sort-topics-1): Ditto. + (gnus-topic-sort-topics-1): Use gnus-byte-compile. + + * message.el (message-check-news-header-syntax): Remove quote. + 2001-07-24 19:00:00 ShengHuo ZHU * message.el (message-use-mail-followup-to): `t' is not a diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index 4cad81b..d33b214 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -1165,10 +1165,10 @@ the actual number of articles toggled is returned." (gnus-get-predicate (or (gnus-group-find-parameter group 'agent-predicate t) (cadr category)))) - (if (memq (caaddr predicate) '(gnus-agent-true gnus-agent-false)) + (if (memq predicate '(gnus-agent-true gnus-agent-false)) ;; Simple implementation (setq arts - (and (eq (caaddr predicate) 'gnus-agent-true) articles)) + (and (eq predicate 'gnus-agent-true) articles)) (setq arts nil) (setq score-param (or (gnus-group-get-parameter group 'agent-score t) @@ -1484,7 +1484,11 @@ The following commands are available: (defun gnus-category-make-function (cat) "Make a function from category CAT." - `(lambda () ,(gnus-category-make-function-1 cat))) + (let ((func (gnus-category-make-function-1 cat))) + (if (and (= (length func) 1) + (symbolp (car func))) + (car func) + (gnus-byte-compile `(lambda () ,func))))) (defun gnus-agent-true () "Return t." diff --git a/lisp/gnus-gl.el b/lisp/gnus-gl.el index 810c302..a5083b8 100644 --- a/lisp/gnus-gl.el +++ b/lisp/gnus-gl.el @@ -633,10 +633,10 @@ recommend using both scores and grouplens predictions together." (defun bbb-build-rate-command (rate-alist) (concat "putratings " grouplens-bbb-token " " grouplens-current-group " \r\n" - (mapconcat '(lambda (this) ; form (mid . (score . time)) - (concat (car this) - " :rating=" (cadr this) ".00" - " :time=" (cddr this))) + (mapconcat (lambda (this) ; form (mid . (score . time)) + (concat (car this) + " :rating=" (cadr this) ".00" + " :time=" (cddr this))) rate-alist "\r\n") "\r\n.\r\n")) diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index b74b1ca..cb5581f 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -59,7 +59,7 @@ method to use when posting." (const native) (sexp :tag "Methods" ,gnus-select-method))) -(defvar gnus-outgoing-message-group nil +(defcustom gnus-outgoing-message-group nil "*All outgoing messages will be put in this group. If you want to store all your outgoing mail and articles in the group \"nnml:archive\", you set this variable to that value. This variable @@ -68,18 +68,25 @@ can also be a list of group names. If you want to have greater control over what group to put each message in, you can set this variable to a function that checks the current newsgroup name and then returns a suitable group name (or list -of names).") +of names)." + :group 'gnus-message + :type '(choice (string :tag "Group") + (function))) -(defvar gnus-mailing-list-groups nil +(defcustom gnus-mailing-list-groups nil "*Regexp matching groups that are really mailing lists. This is useful when you're reading a mailing list that has been gatewayed to a newsgroup, and you want to followup to an article in -the group.") +the group." + :group 'gnus-message + :type 'regexp) -(defvar gnus-add-to-list nil - "*If non-nil, add a `to-list' parameter automatically.") +(defcustom gnus-add-to-list nil + "*If non-nil, add a `to-list' parameter automatically." + :group 'gnus-message + :type 'boolean) -(defvar gnus-crosspost-complaint +(defcustom gnus-crosspost-complaint "Hi, You posted the article below with the following Newsgroups header: @@ -95,19 +102,44 @@ Thank you. " "Format string to be inserted when complaining about crossposts. The first %s will be replaced by the Newsgroups header; -the second with the current group name.") - -(defvar gnus-message-setup-hook '(gnus-maybe-setup-default-charset) - "Hook run after setting up a message buffer.") - -(defvar gnus-bug-create-help-buffer t - "*Should we create the *Gnus Help Bug* buffer?") - -(defvar gnus-posting-styles nil - "*Alist of styles to use when posting.") - -(defvar gnus-inews-mark-gcc-as-read nil - "If non-nil, automatically mark Gcc articles as read.") +the second with the current group name." + :group 'gnus-message + :type 'string) + +(defcustom gnus-message-setup-hook '(gnus-maybe-setup-default-charset) + "Hook run after setting up a message buffer." + :group 'gnus-message + :type 'hook) + +(defcustom gnus-bug-create-help-buffer t + "*Should we create the *Gnus Help Bug* buffer?" + :group 'gnus-message + :type 'boolean) + +(defcustom gnus-posting-styles nil + "*Alist of styles to use when posting." + :group 'gnus-message + :type '(repeat (cons (choice (regexp) + (function) + (variable) + (sexp)) + (repeat (list + (choice (const signature) + (const signature-file) + (const organization) + (const address) + (const name) + (const body) + (string :tag "Header")) + (choice (string) + (function) + (variable) + (sexp))))))) + +(defcustom gnus-inews-mark-gcc-as-read nil + "If non-nil, automatically mark Gcc articles as read." + :group 'gnus-message + :type 'boolean) (defcustom gnus-group-posting-charset-alist '(("^\\(no\\|fr\\)\\.[^,]*\\(,[ \t\n]*\\(no\\|fr\\)\\.[^,]*\\)*$" iso-8859-1 (iso-8859-1)) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 64d940b..218334e 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -4352,20 +4352,22 @@ or a straight list of headers." (1+ (match-beginning 0)) (1- (match-end 0)))) (t gnus-tmp-from)) gnus-tmp-thread-tree-header-string - (if (zerop gnus-tmp-level) - (if (cdar thread) - gnus-sum-thread-tree-root - gnus-sum-thread-tree-single-indent) + (cond + ((not gnus-show-threads) "") + ((zerop gnus-tmp-level) + (if (cdar thread) + gnus-sum-thread-tree-root + gnus-sum-thread-tree-single-indent)) + (t (concat (apply 'concat - (mapcar (lambda (item) - (if (= item 1) + (mapcar (lambda (item) + (if (= item 1) gnus-sum-thread-tree-vertical gnus-sum-thread-tree-indent)) (cdr (reverse tree-stack)))) - (if (nth 1 thread) + (if (nth 1 thread) gnus-sum-thread-tree-leaf-with-other - gnus-sum-thread-tree-single-leaf)))) - + gnus-sum-thread-tree-single-leaf))))) (when (string= gnus-tmp-name "") (setq gnus-tmp-name gnus-tmp-from)) (unless (numberp gnus-tmp-lines) diff --git a/lisp/gnus-topic.el b/lisp/gnus-topic.el index 4084abc..2267def 100644 --- a/lisp/gnus-topic.el +++ b/lisp/gnus-topic.el @@ -1612,11 +1612,12 @@ If REVERSE, sort in reverse order." (defun gnus-topic-sort-topics-1 (top reverse) (if (cdr top) (let ((subtop - (mapcar `(lambda (top) - (gnus-topic-sort-topics-1 top ,reverse)) + (mapcar (gnus-byte-compile + `(lambda (top) + (gnus-topic-sort-topics-1 top ,reverse))) (sort (cdr top) - '(lambda (t1 t2) - (string-lessp (caar t1) (caar t2))))))) + (lambda (t1 t2) + (string-lessp (caar t1) (caar t2))))))) (setcdr top (if reverse (reverse subtop) subtop)))) top) diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index d414108..c80bf88 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -509,8 +509,9 @@ If N, return the Nth ancestor instead." ;; A list of functions. ((or (cdr funs) (listp (car funs))) - `(lambda (t1 t2) - ,(gnus-make-sort-function-1 (reverse funs)))) + (gnus-byte-compile + `(lambda (t1 t2) + ,(gnus-make-sort-function-1 (reverse funs))))) ;; A list containing just one function. (t (car funs)))) @@ -1073,6 +1074,21 @@ Return the modified alist." (or (string-equal x y) (string-equal (downcase x) (downcase y))))) +(defcustom gnus-use-byte-compile t + "If non-nil, byte-compile crucial run-time codes." + :type 'boolean + :version "21.1" + :group 'gnus-various) + +(defun gnus-byte-compile (form) + "Byte-compile FORM if `gnus-use-byte-compile' is non-nil." + (if gnus-use-byte-compile + (progn + (require 'bytecomp) + (defalias 'gnus-byte-compile 'byte-compile) + (byte-compile form)) + form)) + (provide 'gnus-util) ;;; gnus-util.el ends here diff --git a/lisp/message.el b/lisp/message.el index 5764e60..21f90ba 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -3449,7 +3449,7 @@ This sub function is for exclusive use of `message-send-news'." (concat newsgroups "," followup-to) newsgroups))) (known-groups - (mapcar '(lambda (n) (gnus-group-real-name n)) + (mapcar (lambda (n) (gnus-group-real-name n)) (gnus-groups-from-server (cond ((equal gnus-post-method 'current) gnus-current-select-method) diff --git a/lisp/nnmail.el b/lisp/nnmail.el index eca08b6..e09ae5d 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -114,6 +114,14 @@ If nil, the first match found will be used." :group 'nnmail-split :type 'boolean) +(defcustom nnmail-split-fancy-with-parent-ignore-groups nil + "Regexp that matches group names to be ignored when applying +`nnmail-split-fancy-with-parent'. This can also be a list of regexps." + :group 'nnmail-split + :type '(choice (const :tag "none" nil) + (regexp :value ".*") + (repeat :value (".*") regexp))) + ;; Added by gord@enci.ucalgary.ca (Gordon Matzigkeit). (defcustom nnmail-keep-last-article nil "If non-nil, nnmail will never delete/move a group's last article. @@ -1473,14 +1481,18 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (let* ((refstr (or (message-fetch-field "references") (message-fetch-field "in-reply-to"))) (references nil) - (res nil)) + (res nil) + (regexp (if (consp nnmail-split-fancy-with-parent-ignore-groups) + (mapconcat 'nnmail-split-fancy-with-parent-ignore-groups " *\\|") + nnmail-split-fancy-with-parent-ignore-groups))) (when refstr (setq references (nreverse (gnus-split-references refstr))) (unless (gnus-buffer-live-p nnmail-cache-buffer) (nnmail-cache-open)) (mapcar (lambda (x) (setq res (or (nnmail-cache-fetch-group x) res)) - (when (string= "drafts" res) + (when (or (string= "drafts" res) + (and regexp (string-match regexp res))) (setq res nil))) references) res))) @@ -1591,10 +1603,11 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (setq source (append source (list :predicate - `(lambda (file) - (string-equal - ,(concat group suffix) - (file-name-nondirectory file)))))))) + (gnus-byte-compile + `(lambda (file) + (string-equal + ,(concat group suffix) + (file-name-nondirectory file))))))))) (when nnmail-fetched-sources (if (member source nnmail-fetched-sources) (setq source nil) @@ -1615,14 +1628,15 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (when (setq new (mail-source-fetch source - `(lambda (file orig-file) - (nnmail-split-incoming - file ',(intern (format "%s-save-mail" method)) - ',spool-func - (if (equal file orig-file) - nil - (nnmail-get-split-group orig-file ',source)) - ',(intern (format "%s-active-number" method)))))) + (gnus-byte-compile + `(lambda (file orig-file) + (nnmail-split-incoming + file ',(intern (format "%s-save-mail" method)) + ',spool-func + (if (equal file orig-file) + nil + (nnmail-get-split-group orig-file ',source)) + ',(intern (format "%s-active-number" method))))))) (incf total new) (incf i))) ;; If we did indeed read any incoming spools, we save all info. diff --git a/texi/ChangeLog b/texi/ChangeLog index e9dfb64..39052e3 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,8 @@ +2001-07-25 22:22:22 Raymond Scholz + + * gnus.texi (Fancy Mail Splitting): New variable + nnmail-split-fancy-with-parent-ignore-groups + 2001-07-24 Kai Gro,A_(Bjohann * gnus.texi (Duplicates): Make split method regexp more specific, diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index 694fa06..c042f01 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -11513,11 +11513,13 @@ table) $B$K=>$C$F40A4$K9gCW$7$J$1$l$P$J$j$^$;$s!#@55,I=8=$G%U%#!<%k%IL>$+(B @code{nnmail-split-fancy-with-parent} $B$O!"BP>]$H$J$k3F5-;v$N(B References ($B$H(B In-Reply-To) $B%X%C%@$rD4$Y!"(B@code{nnmail-message-id-cache-file} $B$K;X(B $BDj$5$l$F$$$k%U%!%$%k$K$=$l$i$N%a%C%;!<%8(B ID $B$,$"$k$+$I$&$+D4$Y$^$9!#?F5-(B -$B;v$,8+$D$+$k$H!"$3$N4X?t$OBP1~$9$k%0%k!<%WL>$rJV$9$o$1$G$9!#$3$3$G!"JQ?t(B -@code{nnmail-message-id-cache-length} $B$NCM$r4{DjCM$h$j$b4v$i$+Bg$-$JCM$K(B -$B@_Dj$9$k$3$H$r$*4+$a$7$^$9!#$=$&$9$k$H!":#D4$Y$i$l$?%a%C%;!<%8(B ID $BC#$O:#(B -$B$7$P$i$/%-%c%C%7%e$NCf$KB8B3$G$-$^$9(B (5000 $B$K@_Dj$9$k$H%-%c%C%7%e%U%!%$(B -$B%k$NBg$-$5$O$@$$$?$$(B 300 $B%-%m%P%$%H$0$i$$$K$J$k$_$?$$$G$9(B)$B!#(B +$B;v$,8+$D$+$k$H!"$=$N%0%k!<%WL>$,@55,I=(B +$B8=(B @code{nnmail-split-fancy-with-parent-ignore-groups} $B$K%^%C%A$7$J$1$l(B +$B$P!"$3$N4X?t$OBP1~$9$k%0%k!<%WL>$rJV$9$o$1$G$9!#$3$3$G!"JQ(B +$B?t(B @code{nnmail-message-id-cache-length} $B$NCM$r4{DjCM$h$j$b4v$i$+Bg$-$J(B +$BCM$K@_Dj$9$k$3$H$r$*4+$a$7$^$9!#$=$&$9$k$H!":#D4$Y$i$l$?%a%C%;!<%8(B ID $BC#(B +$B$O:#$7$P$i$/%-%c%C%7%e$NCf$KB8B3$G$-$^$9(B (5000 $B$K@_Dj$9$k$H%-%c%C%7%e%U%!(B +$B%$%k$NBg$-$5$O$@$$$?$$(B 300 $B%-%m%P%$%H$0$i$$$K$J$k$_$?$$$G$9(B)$B!#(B @vindex nnmail-cache-accepted-message-ids $B$5$i$K!"JQ?t(B @code{nnmail-cache-accepted-message-ids} $B$NCM$r(B $BHs(B @code{nil} $B$K@_Dj$9$l$P!"(Bgnus $B$O0\F0$5$l$?5-;v$N%a%C%;!<%8(B ID $B$r$b5-(B diff --git a/texi/gnus.texi b/texi/gnus.texi index 6d06468..3c17ac3 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -12175,11 +12175,12 @@ messages). When mail splitting is invoked, the function @code{nnmail-split-fancy-with-parent} then looks at the References (and In-Reply-To) header of each message to split and searches the file specified by @code{nnmail-message-id-cache-file} for the message ids. -When it has found a parent, it returns the corresponding group name. It -is recommended that you set @code{nnmail-message-id-cache-length} to a -somewhat higher number than the default so that the message ids are -still in the cache. (A value of 5000 appears to create a file some 300 -kBytes in size.) +When it has found a parent, it returns the corresponding group name +unless the group name matches the regexp +@code{nnmail-split-fancy-with-parent-ignore-groups}. It is recommended +that you set @code{nnmail-message-id-cache-length} to a somewhat higher +number than the default so that the message ids are still in the cache. +(A value of 5000 appears to create a file some 300 kBytes in size.) @vindex nnmail-cache-accepted-message-ids When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus also records the message ids of moved articles, so that the followup