Mercurial > emacs
comparison lisp/gnus/gnus-sum.el @ 110809:b3be868d9343
* lisp/gnus/gnus-sum.el (gnus-number): Rename from `number'.
(gnus-article-marked-p, gnus-summary-limit-to-display-predicate)
(gnus-summary-limit-children): Update uses correspondingly.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Thu, 07 Oct 2010 20:22:07 +0200 |
parents | 9d935b7bf464 |
children | 07053df95af6 |
comparison
equal
deleted
inserted
replaced
110808:46ce8bc0e7c5 | 110809:b3be868d9343 |
---|---|
5680 (dolist (elem (append '((unread . unread) | 5680 (dolist (elem (append '((unread . unread) |
5681 (read . read) | 5681 (read . read) |
5682 (unseen . unseen)) | 5682 (unseen . unseen)) |
5683 gnus-article-mark-lists)) | 5683 gnus-article-mark-lists)) |
5684 (push (cons (cdr elem) | 5684 (push (cons (cdr elem) |
5685 (gnus-byte-compile | 5685 (gnus-byte-compile ;Why bother? |
5686 `(lambda () (gnus-article-marked-p ',(cdr elem))))) | 5686 `(lambda () (gnus-article-marked-p ',(cdr elem))))) |
5687 gnus-summary-display-cache))) | 5687 gnus-summary-display-cache))) |
5688 (let ((gnus-category-predicate-alist gnus-summary-display-cache) | 5688 (let ((gnus-category-predicate-alist gnus-summary-display-cache) |
5689 (gnus-category-predicate-cache gnus-summary-display-cache)) | 5689 (gnus-category-predicate-cache gnus-summary-display-cache)) |
5690 (gnus-get-predicate display))) | 5690 (gnus-get-predicate display))) |
5691 | 5691 |
5692 ;; Uses the dynamically bound `number' variable. | 5692 ;; Uses the dynamically bound `gnus-number' variable. |
5693 (defvar number) | 5693 (defvar gnus-number) |
5694 (defun gnus-article-marked-p (type &optional article) | 5694 (defun gnus-article-marked-p (type &optional article) |
5695 (let ((article (or article number))) | 5695 (let ((article (or article gnus-number))) |
5696 (cond | 5696 (cond |
5697 ((eq type 'tick) | 5697 ((eq type 'tick) |
5698 (memq article gnus-newsgroup-marked)) | 5698 (memq article gnus-newsgroup-marked)) |
5699 ((eq type 'spam) | 5699 ((eq type 'spam) |
5700 (memq article gnus-newsgroup-spam-marked)) | 5700 (memq article gnus-newsgroup-spam-marked)) |
8281 "Limit the summary buffer to the predicated in the `display' group parameter." | 8281 "Limit the summary buffer to the predicated in the `display' group parameter." |
8282 (interactive) | 8282 (interactive) |
8283 (unless gnus-newsgroup-display | 8283 (unless gnus-newsgroup-display |
8284 (error "There is no `display' group parameter")) | 8284 (error "There is no `display' group parameter")) |
8285 (let (articles) | 8285 (let (articles) |
8286 (dolist (number gnus-newsgroup-articles) | 8286 (dolist (gnus-number gnus-newsgroup-articles) |
8287 (when (funcall gnus-newsgroup-display) | 8287 (when (funcall gnus-newsgroup-display) |
8288 (push number articles))) | 8288 (push gnus-number articles))) |
8289 (gnus-summary-limit articles)) | 8289 (gnus-summary-limit articles)) |
8290 (gnus-summary-position-point)) | 8290 (gnus-summary-position-point)) |
8291 | 8291 |
8292 (defalias 'gnus-summary-delete-marked-as-read 'gnus-summary-limit-to-unread) | 8292 (defalias 'gnus-summary-delete-marked-as-read 'gnus-summary-limit-to-unread) |
8293 (make-obsolete | 8293 (make-obsolete |
8684 (children | 8684 (children |
8685 (if (cdr thread) | 8685 (if (cdr thread) |
8686 (apply '+ (mapcar 'gnus-summary-limit-children | 8686 (apply '+ (mapcar 'gnus-summary-limit-children |
8687 (cdr thread))) | 8687 (cdr thread))) |
8688 0)) | 8688 0)) |
8689 (number (mail-header-number (car thread))) | 8689 (number (mail-header-number (car thread))) |
8690 score) | 8690 score) |
8691 (if (and | 8691 (if (and |
8692 (not (memq number gnus-newsgroup-marked)) | 8692 (not (memq number gnus-newsgroup-marked)) |
8693 (or | 8693 (or |
8694 ;; If this article is dormant and has absolutely no visible | 8694 ;; If this article is dormant and has absolutely no visible |
8730 (push (cons number gnus-low-score-mark) | 8730 (push (cons number gnus-low-score-mark) |
8731 gnus-newsgroup-reads))) | 8731 gnus-newsgroup-reads))) |
8732 t) | 8732 t) |
8733 ;; Do the `display' group parameter. | 8733 ;; Do the `display' group parameter. |
8734 (and gnus-newsgroup-display | 8734 (and gnus-newsgroup-display |
8735 (not (funcall gnus-newsgroup-display))))) | 8735 (let ((gnus-number number)) |
8736 (not (funcall gnus-newsgroup-display)))))) | |
8736 ;; Nope, invisible article. | 8737 ;; Nope, invisible article. |
8737 0 | 8738 0 |
8738 ;; Ok, this article is to be visible, so we add it to the limit | 8739 ;; Ok, this article is to be visible, so we add it to the limit |
8739 ;; and return 1. | 8740 ;; and return 1. |
8740 (push number gnus-newsgroup-limit) | 8741 (push number gnus-newsgroup-limit) |