+2001-07-25 12:54:00 Danny Siu <dsiu@adobe.com>
+
+ * 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 <zsh@cs.rochester.edu>
+ From Henrik Enberg <henrik@enberg.org>
+
+ * gnus-msg.el: Customization patch.
+
+2001-07-25 22:22:22 Raymond Scholz <rscholz@zonix.de>
+
+ * 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 <zsh@cs.rochester.edu>
+
+ * 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 <zsh@cs.rochester.edu>
* message.el (message-use-mail-followup-to): `t' is not a
(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)
(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."
(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"))
(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
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:
"
"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))
(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)
(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)
;; 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))))
(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
(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)
: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.
(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)))
(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)
(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.
+2001-07-25 22:22:22 Raymond Scholz <rscholz@zonix.de>
+
+ * gnus.texi (Fancy Mail Splitting): New variable
+ nnmail-split-fancy-with-parent-ignore-groups
+
2001-07-24 Kai Gro\e,A_\e(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
* gnus.texi (Duplicates): Make split method regexp more specific,
@code{nnmail-split-fancy-with-parent} \e$B$O!"BP>]$H$J$k3F5-;v$N\e(B References
(\e$B$H\e(B In-Reply-To) \e$B%X%C%@$rD4$Y!"\e(B@code{nnmail-message-id-cache-file} \e$B$K;X\e(B
\e$BDj$5$l$F$$$k%U%!%$%k$K$=$l$i$N%a%C%;!<%8\e(B ID \e$B$,$"$k$+$I$&$+D4$Y$^$9!#?F5-\e(B
-\e$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\e(B
-@code{nnmail-message-id-cache-length} \e$B$NCM$r4{DjCM$h$j$b4v$i$+Bg$-$JCM$K\e(B
-\e$B@_Dj$9$k$3$H$r$*4+$a$7$^$9!#$=$&$9$k$H!":#D4$Y$i$l$?%a%C%;!<%8\e(B ID \e$BC#$O:#\e(B
-\e$B$7$P$i$/%-%c%C%7%e$NCf$KB8B3$G$-$^$9\e(B (5000 \e$B$K@_Dj$9$k$H%-%c%C%7%e%U%!%$\e(B
-\e$B%k$NBg$-$5$O$@$$$?$$\e(B 300 \e$B%-%m%P%$%H$0$i$$$K$J$k$_$?$$$G$9\e(B)\e$B!#\e(B
+\e$B;v$,8+$D$+$k$H!"$=$N%0%k!<%WL>$,@55,I=\e(B
+\e$B8=\e(B @code{nnmail-split-fancy-with-parent-ignore-groups} \e$B$K%^%C%A$7$J$1$l\e(B
+\e$B$P!"$3$N4X?t$OBP1~$9$k%0%k!<%WL>$rJV$9$o$1$G$9!#$3$3$G!"JQ\e(B
+\e$B?t\e(B @code{nnmail-message-id-cache-length} \e$B$NCM$r4{DjCM$h$j$b4v$i$+Bg$-$J\e(B
+\e$BCM$K@_Dj$9$k$3$H$r$*4+$a$7$^$9!#$=$&$9$k$H!":#D4$Y$i$l$?%a%C%;!<%8\e(B ID \e$BC#\e(B
+\e$B$O:#$7$P$i$/%-%c%C%7%e$NCf$KB8B3$G$-$^$9\e(B (5000 \e$B$K@_Dj$9$k$H%-%c%C%7%e%U%!\e(B
+\e$B%$%k$NBg$-$5$O$@$$$?$$\e(B 300 \e$B%-%m%P%$%H$0$i$$$K$J$k$_$?$$$G$9\e(B)\e$B!#\e(B
@vindex nnmail-cache-accepted-message-ids
\e$B$5$i$K!"JQ?t\e(B @code{nnmail-cache-accepted-message-ids} \e$B$NCM$r\e(B
\e$BHs\e(B @code{nil} \e$B$K@_Dj$9$l$P!"\e(Bgnus \e$B$O0\F0$5$l$?5-;v$N%a%C%;!<%8\e(B ID \e$B$r$b5-\e(B
@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