X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fgnus-cache.el;h=50ab1c64a23a8387973bfd748d89e7bd6e4b311a;hb=0007de6d40db139c025a8b2cba9ef04ee4837608;hp=550614f9352ff137adc776890ada51493389dbe3;hpb=ccd77ce8a07b554cba62207328a9d3932fddc6ea;p=gnus diff --git a/lisp/gnus-cache.el b/lisp/gnus-cache.el index 550614f93..50ab1c64a 100644 --- a/lisp/gnus-cache.el +++ b/lisp/gnus-cache.el @@ -25,7 +25,7 @@ ;;; Code: -;; For Emacs < 22.2. +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) @@ -383,9 +383,14 @@ Returns the list of articles removed." "Insert all the articles cached for this group into the current buffer." (interactive) (let ((gnus-verbose (max 6 gnus-verbose))) - (if (not gnus-newsgroup-cached) - (gnus-message 3 "No cached articles for this group") - (gnus-summary-goto-subjects gnus-newsgroup-cached)))) + (cond + ((not gnus-newsgroup-cached) + (gnus-message 3 "No cached articles for this group")) + ;; This is faster if there are few articles to insert. + ((< (length gnus-newsgroup-cached) 20) + (gnus-summary-goto-subjects gnus-newsgroup-cached)) + (t + (gnus-summary-include-articles gnus-newsgroup-cached))))) (defun gnus-summary-limit-include-cached () "Limit the summary buffer to articles that are cached."