On Tue, 29 Jul 2008 05:34:29 +0300, Giorgos Keramidas <[EMAIL PROTECTED]> wrote:
> On Mon, 28 Jul 2008 16:54:19 +0200, [EMAIL PROTECTED] (Johan Bockgård) wrote:
>> Giorgos Keramidas <[EMAIL PROTECTED]> writes:
>>
>>> (dolist (pair keramida-gnus-group-thread-function-map)
>>> (message "pair is %s" pair)
>>> (if (not match-function)
>>> (let ((pattern (car pair))
>>> (func (cdr pair)))
>>> (if (and (string-match pattern group)
>>> (fboundp func))
>>> (setq match-function func))))))
>>
>> (assoc-default group keramida-gnus-group-thread-function-map
>> 'string-match)
>
> Thank you! :)
After a bit of testing, the new threading function I'm using is:
(defun keramida-gnus-gather-threads (threads)
"Dispatch function that matches Gnus group names to thread
gathering functions by looking up the group name in the
`keramida-gnus-group-thread-function-map'."
(let ((group gnus-newsgroup-name)
(gather-function (or (and (fboundp
'keramida-gnus-gather-threads-default)
(function
keramida-gnus-gather-threads-default))
(and (fboundp 'gnus-gather-threads-by-references)
(function
gnus-gather-threads-by-references)))))
(let ((match-function (and group
(boundp 'keramida-gnus-group-thread-function-map)
(assoc-default group
keramida-gnus-group-thread-function-map
'string-match))))
(funcall (or match-function gather-function) threads))))
This seems more 'Lispy' than the previous dolist-based version :)
_______________________________________________
info-gnus-english mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/info-gnus-english