X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fgnus-sum.el;h=c45536c25c083482b155c11da521e1bfa18a8575;hb=ee84116e7c47c651bdc7550c3f02be841e2fc3df;hp=d9a7621baa2f30348ffa0fcda774797de8bf7249;hpb=262b2ed15b0249c24d09a85eb73852bf7b98f831;p=gnus diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index d9a7621ba..c45536c25 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -474,6 +474,12 @@ If nil, each group will get its own article buffer." :group 'gnus-article-various :type 'boolean) +(defcustom gnus-widen-article-window nil + "If non-nil, selecting the article buffer will display only the article buffer." + :version "24.1" + :group 'gnus-article-various + :type 'boolean) + (defcustom gnus-break-pages t "*If non-nil, do page breaking on articles. The page delimiter is specified by the `gnus-page-delimiter' @@ -3493,8 +3499,6 @@ display only a single character." ;; Fix by Sudish Joseph (setq gnus-summary-buffer (set-buffer (gnus-get-buffer-create buffer))) (gnus-summary-mode group) - (when gnus-carpal - (gnus-carpal-setup-buffer 'summary)) (when (gnus-group-quit-config group) (set (make-local-variable 'gnus-single-article-buffer) nil)) (make-local-variable 'gnus-article-buffer) @@ -4981,6 +4985,10 @@ Unscored articles will be counted as having a score of zero." (t (gnus-thread-total-score-1 (list thread))))) +(defun gnus-article-sort-by-most-recent-number (h1 h2) + "Sort articles by number." + (gnus-article-sort-by-number h1 h2)) + (defun gnus-thread-sort-by-most-recent-number (h1 h2) "Sort threads such that the thread with the most recently arrived article comes first." (> (gnus-thread-highest-number h1) (gnus-thread-highest-number h2))) @@ -4991,6 +4999,10 @@ Unscored articles will be counted as having a score of zero." (mail-header-number header)) (message-flatten-list thread)))) +(defun gnus-article-sort-by-most-recent-date (h1 h2) + "Sort articles by number." + (gnus-article-sort-by-date h1 h2)) + (defun gnus-thread-sort-by-most-recent-date (h1 h2) "Sort threads such that the thread with the most recently dated article comes first." (> (gnus-thread-latest-date h1) (gnus-thread-latest-date h2))) @@ -5670,17 +5682,17 @@ If SELECT-ARTICLES, only select those articles from GROUP." (unseen . unseen)) gnus-article-mark-lists)) (push (cons (cdr elem) - (gnus-byte-compile + (gnus-byte-compile ;Why bother? `(lambda () (gnus-article-marked-p ',(cdr elem))))) gnus-summary-display-cache))) (let ((gnus-category-predicate-alist gnus-summary-display-cache) (gnus-category-predicate-cache gnus-summary-display-cache)) (gnus-get-predicate display))) -;; Uses the dynamically bound `number' variable. -(defvar number) +;; Uses the dynamically bound `gnus-number' variable. +(defvar gnus-number) (defun gnus-article-marked-p (type &optional article) - (let ((article (or article number))) + (let ((article (or article gnus-number))) (cond ((eq type 'tick) (memq article gnus-newsgroup-marked)) @@ -6933,8 +6945,14 @@ displayed, no centering will be performed." (interactive) (if (not (gnus-buffer-live-p gnus-article-buffer)) (error "There is no article buffer for this summary buffer") - (select-window (get-buffer-window gnus-article-buffer)) - (gnus-configure-windows 'only-article t))) + (unless (get-buffer-window gnus-article-buffer) + (gnus-summary-show-article)) + (gnus-configure-windows + (if gnus-widen-article-window + 'only-article + 'article) + t) + (select-window (get-buffer-window gnus-article-buffer)))) (defun gnus-summary-universal-argument (arg) "Perform any operation on all articles that are process/prefixed." @@ -8265,9 +8283,9 @@ articles that are younger than AGE days." (unless gnus-newsgroup-display (error "There is no `display' group parameter")) (let (articles) - (dolist (number gnus-newsgroup-articles) + (dolist (gnus-number gnus-newsgroup-articles) (when (funcall gnus-newsgroup-display) - (push number articles))) + (push gnus-number articles))) (gnus-summary-limit articles)) (gnus-summary-position-point)) @@ -8668,8 +8686,8 @@ fetch-old-headers verbiage, and so on." (apply '+ (mapcar 'gnus-summary-limit-children (cdr thread))) 0)) - (number (mail-header-number (car thread))) - score) + (number (mail-header-number (car thread))) + score) (if (and (not (memq number gnus-newsgroup-marked)) (or @@ -8714,7 +8732,8 @@ fetch-old-headers verbiage, and so on." t) ;; Do the `display' group parameter. (and gnus-newsgroup-display - (not (funcall gnus-newsgroup-display))))) + (let ((gnus-number number)) + (not (funcall gnus-newsgroup-display)))))) ;; Nope, invisible article. 0 ;; Ok, this article is to be visible, so we add it to the limit @@ -11908,11 +11927,12 @@ save those articles instead." ((null split-name) (gnus-group-completing-read prom - (remove-if-not 'gnus-valid-move-group-p gnus-active-hashtb) + (gnus-remove-if-not 'gnus-valid-move-group-p gnus-active-hashtb t) nil prefix nil default)) ((= 1 (length split-name)) (gnus-group-completing-read - prom (remove-if-not 'gnus-valid-move-group-p gnus-active-hashtb) + prom + (gnus-remove-if-not 'gnus-valid-move-group-p gnus-active-hashtb t) nil prefix 'gnus-group-history (car split-name))) (t (gnus-completing-read