X-Git-Url: https://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fgnus-group.el;h=9fed125a9ed12100e4c8d589ab6c84e3e3d05cfb;hb=cc7fd62ed5abce6083f7a6566579fee26469aae5;hp=721f4d8d9a97ee7bb71b44aac042c49c36e166cc;hpb=125d88b46ad2efa065f06d5dac37a245b488985a;p=gnus diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index 721f4d8d9..9fed125a9 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -448,6 +448,7 @@ nnml:\" in the minibuffer prompt. If it is an alist, it must consist of \(NUMBER . PROMPT\) pairs, for example: \((1 . \"\") (2 . \"nnfolder+archive:\")). The element with number 0 is used when no prefix argument is given to `gnus-group-jump-to-group'." + :version "21.4" :group 'gnus-group-various :type '(choice (string :tag "Prompt string") (const :tag "Empty" nil) @@ -505,7 +506,10 @@ simple manner.") (?O gnus-tmp-moderated-string ?s) (?p gnus-tmp-process-marked ?c) (?s gnus-tmp-news-server ?s) - (?n gnus-tmp-news-method ?s) + (?n ,(if (featurep 'xemacs) + '(symbol-name gnus-tmp-news-method) + 'gnus-tmp-news-method) + ?s) (?P gnus-group-indentation ?s) (?E gnus-tmp-group-icon ?s) (?B gnus-tmp-summary-live ?c) @@ -1063,7 +1067,8 @@ The following commands are available: (gnus-group-insert-group-line "dummy.group" 0 nil 0 nil) (goto-char (point-min)) (setq gnus-group-mark-positions - (list (cons 'process (and (search-forward "\200" nil t) + (list (cons 'process (and (search-forward + (mm-string-as-multibyte "\200") nil t) (- (point) 2)))))))) (defun gnus-mouse-pick-group (e) @@ -1737,10 +1742,8 @@ If FIRST-TOO, the current line is also eligible as a target." (defun gnus-group-unmark-all-groups () "Unmark all groups." (interactive) - (let ((groups gnus-group-marked)) - (save-excursion - (while groups - (gnus-group-remove-mark (pop groups))))) + (save-excursion + (mapc 'gnus-group-remove-mark gnus-group-marked)) (gnus-group-position-point)) (defun gnus-group-mark-region (unmark beg end) @@ -1986,12 +1989,14 @@ Same as `gnus-large-newsgroup', but only used for ephemeral newsgroups. If the number of articles in a newsgroup is greater than this value, confirmation is required for selecting the newsgroup. If it is nil, no confirmation is required." + :version "21.4" :group 'gnus-group-select :type '(choice (const :tag "No limit" nil) integer)) (defcustom gnus-fetch-old-ephemeral-headers nil "Same as `gnus-fetch-old-headers', but only used for ephemeral newsgroups." + :version "21.4" :group 'gnus-thread :type '(choice (const :tag "off" nil) (const some) @@ -2090,11 +2095,7 @@ If PROMPT (the prefix) is a number, use the prompt specified in ;; Either go to the line in the group buffer... (unless (gnus-group-goto-group group) ;; ... or insert the line. - (if (or (gnus-active group) - (gnus-y-or-n-p - (format "Group %s is not active. Continue? " group))) - (gnus-group-update-group group) - (error "No such group: %s." group)) + (gnus-group-update-group group) (gnus-group-goto-group group))) ;; Adjust cursor point. (gnus-group-position-point)) @@ -2254,6 +2255,16 @@ If EXCLUDE-GROUP, do not go to that group." (interactive) (gnus-enter-server-buffer)) +(defun gnus-group-make-group-simple (&optional group) + "Add a new newsgroup. +The user will be prompted for GROUP." + (interactive + (list (completing-read "Group: " gnus-active-hashtb + nil nil nil 'gnus-group-history))) + (gnus-group-make-group + (gnus-group-real-name group) + (gnus-group-server group))) + (defun gnus-group-make-group (name &optional method address args) "Add a new newsgroup. The user will be prompted for a NAME, for a select METHOD, and an @@ -2735,7 +2746,7 @@ score file entries for articles to include in the group." (make-directory score-dir)) (with-temp-file score-file (let (emacs-lisp-mode-hook) - (pp scores (current-buffer)))))) + (gnus-pp scores))))) (defun gnus-group-add-to-virtual (n vgroup) "Add the current group to a virtual group." @@ -3264,16 +3275,14 @@ Uses the process/prefix convention." s)))))) (unless (and (>= level 1) (<= level gnus-level-killed)) (error "Invalid level: %d" level)) - (let ((groups (gnus-group-process-prefix n)) - group) - (while (setq group (pop groups)) - (gnus-group-remove-mark group) - (gnus-message 6 "Changed level of %s from %d to %d" - group (or (gnus-group-group-level) gnus-level-killed) - level) - (gnus-group-change-level - group level (or (gnus-group-group-level) gnus-level-killed)) - (gnus-group-update-group-line))) + (dolist (group (gnus-group-process-prefix n)) + (gnus-group-remove-mark group) + (gnus-message 6 "Changed level of %s from %d to %d" + group (or (gnus-group-group-level) gnus-level-killed) + level) + (gnus-group-change-level + group level (or (gnus-group-group-level) gnus-level-killed)) + (gnus-group-update-group-line)) (gnus-group-position-point)) (defun gnus-group-unsubscribe (&optional n) @@ -3626,7 +3635,8 @@ re-scanning. If ARG is non-nil and not a number, this will force (defun gnus-group-get-new-news-this-group (&optional n dont-scan) "Check for newly arrived news in the current group (and the N-1 next groups). The difference between N and the number of newsgroup checked is returned. -If N is negative, this group and the N-1 previous groups will be checked." +If N is negative, this group and the N-1 previous groups will be checked. +If DONT-SCAN is non-nil, scan non-activated groups as well." (interactive "P") (let* ((groups (gnus-group-process-prefix n)) (ret (if (numberp n) (- n (length groups)) 0)) @@ -3642,15 +3652,17 @@ If N is negative, this group and the N-1 previous groups will be checked." (gnus-group-remove-mark group) ;; Bypass any previous denials from the server. (gnus-remove-denial (setq method (gnus-find-method-for-group group))) - (if (gnus-activate-group group (if dont-scan nil 'scan)) - (progn - (gnus-get-unread-articles-in-group - (gnus-get-info group) (gnus-active group) t) + (if (gnus-activate-group group (if dont-scan nil 'scan) nil method) + (let ((info (gnus-get-info group)) + (active (gnus-active group))) + (when info + (gnus-request-update-info info method)) + (gnus-get-unread-articles-in-group info active) (unless (gnus-virtual-group-p group) (gnus-close-group group)) (when gnus-agent (gnus-agent-save-group-info - method (gnus-group-real-name group) (gnus-active group))) + method (gnus-group-real-name group) active)) (gnus-group-update-group group)) (if (eq (gnus-server-status (gnus-find-method-for-group group)) 'denied)