Mercurial > hg > xemacs-beta
comparison lisp/gnus/gnus-group.el @ 26:441bb1e64a06 r19-15b96
Import from CVS: tag r19-15b96
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:51:32 +0200 |
parents | 4103f0995bd7 |
children | 1917ad0d78d7 |
comparison
equal
deleted
inserted
replaced
25:383a494979f8 | 26:441bb1e64a06 |
---|---|
1126 | 1126 |
1127 (defun gnus-group-update-group (group &optional visible-only) | 1127 (defun gnus-group-update-group (group &optional visible-only) |
1128 "Update all lines where GROUP appear. | 1128 "Update all lines where GROUP appear. |
1129 If VISIBLE-ONLY is non-nil, the group won't be displayed if it isn't | 1129 If VISIBLE-ONLY is non-nil, the group won't be displayed if it isn't |
1130 already." | 1130 already." |
1131 (save-excursion | 1131 ;; Can't use `save-excursion' here, so we do it manually. |
1132 (let ((buf (current-buffer)) | |
1133 mark) | |
1132 (set-buffer gnus-group-buffer) | 1134 (set-buffer gnus-group-buffer) |
1135 (setq mark (point-marker)) | |
1133 ;; The buffer may be narrowed. | 1136 ;; The buffer may be narrowed. |
1134 (save-restriction | 1137 (save-restriction |
1135 (widen) | 1138 (widen) |
1136 (let ((ident (gnus-intern-safe group gnus-active-hashtb)) | 1139 (let ((ident (gnus-intern-safe group gnus-active-hashtb)) |
1137 (loc (point-min)) | 1140 (loc (point-min)) |
1177 (save-excursion | 1180 (save-excursion |
1178 (forward-line -1) | 1181 (forward-line -1) |
1179 (run-hooks 'gnus-group-update-group-hook)))) | 1182 (run-hooks 'gnus-group-update-group-hook)))) |
1180 (when gnus-group-update-group-function | 1183 (when gnus-group-update-group-function |
1181 (funcall gnus-group-update-group-function group)) | 1184 (funcall gnus-group-update-group-function group)) |
1182 (gnus-group-set-mode-line))))) | 1185 (gnus-group-set-mode-line))) |
1186 (goto-char mark) | |
1187 (set-marker mark nil) | |
1188 (set-buffer buf))) | |
1183 | 1189 |
1184 (defun gnus-group-set-mode-line () | 1190 (defun gnus-group-set-mode-line () |
1185 "Update the mode line in the group buffer." | 1191 "Update the mode line in the group buffer." |
1186 (when (memq 'group gnus-updated-mode-lines) | 1192 (when (memq 'group gnus-updated-mode-lines) |
1187 ;; Yes, we want to keep this mode line updated. | 1193 ;; Yes, we want to keep this mode line updated. |
1834 (when (equal (gnus-group-real-name group) new-name) | 1840 (when (equal (gnus-group-real-name group) new-name) |
1835 (error "Can't rename to the same name")) | 1841 (error "Can't rename to the same name")) |
1836 | 1842 |
1837 ;; We find the proper prefixed name. | 1843 ;; We find the proper prefixed name. |
1838 (setq new-name | 1844 (setq new-name |
1839 (if (equal (gnus-group-real-name new-name) new-name) | 1845 (if (gnus-group-native-p group) |
1840 ;; Native group. | 1846 ;; Native group. |
1841 new-name | 1847 new-name |
1842 ;; Foreign group. | 1848 ;; Foreign group. |
1843 (gnus-group-prefixed-name | 1849 (gnus-group-prefixed-name |
1844 (gnus-group-real-name new-name) | 1850 (gnus-group-real-name new-name) |
2846 (gnus-read-active-file) | 2852 (gnus-read-active-file) |
2847 (gnus-get-unread-articles arg)) | 2853 (gnus-get-unread-articles arg)) |
2848 (let ((gnus-read-active-file (if arg nil gnus-read-active-file))) | 2854 (let ((gnus-read-active-file (if arg nil gnus-read-active-file))) |
2849 (gnus-get-unread-articles arg))) | 2855 (gnus-get-unread-articles arg))) |
2850 (run-hooks 'gnus-after-getting-new-news-hook) | 2856 (run-hooks 'gnus-after-getting-new-news-hook) |
2851 (gnus-group-list-groups)) | 2857 (gnus-group-list-groups (and (numberp arg) |
2858 (max (car gnus-group-list-mode) arg)))) | |
2852 | 2859 |
2853 (defun gnus-group-get-new-news-this-group (&optional n) | 2860 (defun gnus-group-get-new-news-this-group (&optional n) |
2854 "Check for newly arrived news in the current group (and the N-1 next groups). | 2861 "Check for newly arrived news in the current group (and the N-1 next groups). |
2855 The difference between N and the number of newsgroup checked is returned. | 2862 The difference between N and the number of newsgroup checked is returned. |
2856 If N is negative, this group and the N-1 previous groups will be checked." | 2863 If N is negative, this group and the N-1 previous groups will be checked." |