comparison lisp/gnus/gnus-sum.el @ 110468:8ceac426a2d7

merge trunk
author Kenichi Handa <handa@m17n.org>
date Tue, 21 Sep 2010 20:45:10 +0900
parents de3a95d08649
children b7b7e970d807
comparison
equal deleted inserted replaced
110384:8d0ea2f29215 110468:8ceac426a2d7
5502 "Couldn't activate group %s: %s" 5502 "Couldn't activate group %s: %s"
5503 (mm-decode-coding-string group charset) 5503 (mm-decode-coding-string group charset)
5504 (mm-decode-coding-string (gnus-status-message group) charset)))) 5504 (mm-decode-coding-string (gnus-status-message group) charset))))
5505 5505
5506 (unless (gnus-request-group group t) 5506 (unless (gnus-request-group group t)
5507 (when (equal major-mode 'gnus-summary-mode) 5507 (when (equal major-mode 'gnus-summary-mode)
5508 (gnus-kill-buffer (current-buffer))) 5508 (gnus-kill-buffer (current-buffer)))
5509 (error "Couldn't request group %s: %s" 5509 (error "Couldn't request group %s: %s"
5510 (mm-decode-coding-string group charset) 5510 (mm-decode-coding-string group charset)
5511 (mm-decode-coding-string (gnus-status-message group) charset))) 5511 (mm-decode-coding-string (gnus-status-message group) charset)))
5512 5512
5513 (when gnus-agent 5513 (when gnus-agent
5514 (gnus-agent-possibly-alter-active group (gnus-active group) info) 5514 (gnus-agent-possibly-alter-active group (gnus-active group) info)
5515 5515
5516 (setq gnus-summary-use-undownloaded-faces 5516 (setq gnus-summary-use-undownloaded-faces
7328 (gnus-group-describe-group force gnus-newsgroup-name)) 7328 (gnus-group-describe-group force gnus-newsgroup-name))
7329 7329
7330 (defun gnus-summary-describe-briefly () 7330 (defun gnus-summary-describe-briefly ()
7331 "Describe summary mode commands briefly." 7331 "Describe summary mode commands briefly."
7332 (interactive) 7332 (interactive)
7333 (gnus-message 6 (substitute-command-keys "\\<gnus-summary-mode-map>\\[gnus-summary-next-page]:Select \\[gnus-summary-next-unread-article]:Forward \\[gnus-summary-prev-unread-article]:Backward \\[gnus-summary-exit]:Exit \\[gnus-info-find-node]:Run Info \\[gnus-summary-describe-briefly]:This help"))) 7333 (gnus-message 6 "%s" (substitute-command-keys "\\<gnus-summary-mode-map>\\[gnus-summary-next-page]:Select \\[gnus-summary-next-unread-article]:Forward \\[gnus-summary-prev-unread-article]:Backward \\[gnus-summary-exit]:Exit \\[gnus-info-find-node]:Run Info \\[gnus-summary-describe-briefly]:This help")))
7334 7334
7335 ;; Walking around group mode buffer from summary mode. 7335 ;; Walking around group mode buffer from summary mode.
7336 7336
7337 (defun gnus-summary-next-group (&optional no-article target-group backward) 7337 (defun gnus-summary-next-group (&optional no-article target-group backward)
7338 "Exit current newsgroup and then select next unread newsgroup. 7338 "Exit current newsgroup and then select next unread newsgroup.
7392 7392
7393 (defun gnus-summary-first-subject (&optional unread undownloaded unseen) 7393 (defun gnus-summary-first-subject (&optional unread undownloaded unseen)
7394 "Go to the first subject satisfying any non-nil constraint. 7394 "Go to the first subject satisfying any non-nil constraint.
7395 If UNREAD is non-nil, the article should be unread. 7395 If UNREAD is non-nil, the article should be unread.
7396 If UNDOWNLOADED is non-nil, the article should be undownloaded. 7396 If UNDOWNLOADED is non-nil, the article should be undownloaded.
7397 If UNSEEN is non-nil, the article should be unseen. 7397 If UNSEEN is non-nil, the article should be unseen as well as unread.
7398 Returns the article selected or nil if there are no matching articles." 7398 Returns the article selected or nil if there are no matching articles."
7399 (interactive "P") 7399 (interactive "P")
7400 (cond 7400 (cond
7401 ;; Empty summary. 7401 ;; Empty summary.
7402 ((null gnus-newsgroup-data) 7402 ((null gnus-newsgroup-data)
7415 (not (or (and unread 7415 (not (or (and unread
7416 (memq num gnus-newsgroup-unreads)) 7416 (memq num gnus-newsgroup-unreads))
7417 (and undownloaded 7417 (and undownloaded
7418 (memq num gnus-newsgroup-undownloaded)) 7418 (memq num gnus-newsgroup-undownloaded))
7419 (and unseen 7419 (and unseen
7420 (memq num gnus-newsgroup-unseen))))))) 7420 (memq num gnus-newsgroup-unseen)
7421 (memq num gnus-newsgroup-unreads)))))))
7421 (setq data (cdr data))) 7422 (setq data (cdr data)))
7422 (prog1 7423 (prog1
7423 (if data 7424 (if data
7424 (progn 7425 (progn
7425 (goto-char (gnus-data-pos (car data))) 7426 (goto-char (gnus-data-pos (car data)))
7906 (gnus-summary-show-thread) 7907 (gnus-summary-show-thread)
7907 (gnus-summary-first-subject nil nil t)) 7908 (gnus-summary-first-subject nil nil t))
7908 (gnus-summary-position-point))) 7909 (gnus-summary-position-point)))
7909 7910
7910 (defun gnus-summary-first-unseen-or-unread-subject () 7911 (defun gnus-summary-first-unseen-or-unread-subject ()
7911 "Place the point on the subject line of the first unseen article or, 7912 "Place the point on the subject line of the first unseen and unread article.
7912 if all article have been seen, on the subject line of the first unread 7913 If all article have been seen, on the subject line of the first unread
7913 article." 7914 article."
7914 (interactive) 7915 (interactive)
7915 (prog1 7916 (prog1
7916 (unless (when (gnus-summary-first-subject nil nil t) 7917 (unless (when (gnus-summary-first-subject nil nil t)
7917 (gnus-summary-show-thread) 7918 (gnus-summary-show-thread)
9688 gnus-newsgroup-name)) ; Server 9689 gnus-newsgroup-name)) ; Server
9689 (list 'gnus-request-accept-article 9690 (list 'gnus-request-accept-article
9690 to-newsgroup (list 'quote select-method) 9691 to-newsgroup (list 'quote select-method)
9691 (not articles) t) ; Accept form 9692 (not articles) t) ; Accept form
9692 (not articles) ; Only save nov last time 9693 (not articles) ; Only save nov last time
9693 move-is-internal))) ; is this move internal? 9694 (and move-is-internal
9695 (gnus-group-real-name to-newsgroup))))) ; is this move internal?
9694 ;; Copy the article. 9696 ;; Copy the article.
9695 ((eq action 'copy) 9697 ((eq action 'copy)
9696 (with-current-buffer copy-buf 9698 (with-current-buffer copy-buf
9697 (when (gnus-request-article-this-buffer article gnus-newsgroup-name) 9699 (when (gnus-request-article-this-buffer article gnus-newsgroup-name)
9698 (save-restriction 9700 (save-restriction
9819 (push to-article gnus-newsgroup-expirable)) 9821 (push to-article gnus-newsgroup-expirable))
9820 ;; Copy the expirable mark to other group. 9822 ;; Copy the expirable mark to other group.
9821 (gnus-add-marked-articles 9823 (gnus-add-marked-articles
9822 to-group 'expire (list to-article) info)) 9824 to-group 'expire (list to-article) info))
9823 9825
9824 (gnus-request-set-mark 9826 (when to-marks
9825 to-group (list (list (list to-article) 'add to-marks)))) 9827 (gnus-request-set-mark
9828 to-group (list (list (list to-article) 'add to-marks)))))
9826 9829
9827 (gnus-dribble-enter 9830 (gnus-dribble-enter
9828 (concat "(gnus-group-set-info '" 9831 (concat "(gnus-group-set-info '"
9829 (gnus-prin1-to-string (gnus-get-info to-group)) 9832 (gnus-prin1-to-string (gnus-get-info to-group))
9830 ")")))) 9833 ")"))))
10763 (incf forward)) 10766 (incf forward))
10764 (when (<= (+ forward (point)) (point-max)) 10767 (when (<= (+ forward (point)) (point-max))
10765 ;; Go to the right position on the line. 10768 ;; Go to the right position on the line.
10766 (goto-char (+ forward (point))) 10769 (goto-char (+ forward (point)))
10767 ;; Replace the old mark with the new mark. 10770 ;; Replace the old mark with the new mark.
10768 (subst-char-in-region (point) (1+ (point)) (char-after) mark) 10771 (let ((to-insert
10772 (mm-subst-char-in-string
10773 (char-after) mark
10774 (buffer-substring (point) (1+ (point))))))
10775 (delete-region (point) (1+ (point)))
10776 (insert to-insert))
10769 ;; Optionally update the marks by some user rule. 10777 ;; Optionally update the marks by some user rule.
10770 (when (eq type 'unread) 10778 (when (eq type 'unread)
10771 (gnus-data-set-mark 10779 (gnus-data-set-mark
10772 (gnus-data-find (gnus-summary-article-number)) mark) 10780 (gnus-data-find (gnus-summary-article-number)) mark)
10773 (gnus-summary-update-line (eq mark gnus-unread-mark))))))) 10781 (gnus-summary-update-line (eq mark gnus-unread-mark)))))))