From: yamaoka Date: Thu, 17 Jun 1999 23:07:02 +0000 (+0000) Subject: (gnus-summary-jump-to-other-group): Rewrite as an independent function. X-Git-Tag: et-gnus-6_11_03-02~2 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e7fee287498a750c5e3e7c4ccf369c234fafb9a;p=elisp%2Fgnus.git- (gnus-summary-jump-to-other-group): Rewrite as an independent function. (gnus-summary-read-group): Revert to the previous form. --- diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 5ce39df..51fcfb7 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -2648,7 +2648,6 @@ the thread are to be displayed." (make-local-variable (car elem)) (set (car elem) (eval (nth 1 elem)))))))) -(defalias 'gnus-summary-jump-to-other-group 'gnus-summary-read-group) (defun gnus-summary-read-group (group &optional show-all no-article kill-buffer no-display backward select-articles) @@ -2656,6 +2655,31 @@ the thread are to be displayed." If SHOW-ALL is non-nil, already read articles are also listed. If NO-ARTICLE is non-nil, no article is selected initially. If NO-DISPLAY, don't generate a summary buffer." + (let (result) + (while (and group + (null (setq result + (let ((gnus-auto-select-next nil)) + (or (gnus-summary-read-group-1 + group show-all no-article + kill-buffer no-display + select-articles) + (setq show-all nil + select-articles nil))))) + (eq gnus-auto-select-next 'quietly)) + (set-buffer gnus-group-buffer) + ;; The entry function called above goes to the next + ;; group automatically, so we go two groups back + ;; if we are searching for the previous group. + (when backward + (gnus-group-prev-unread-group 2)) + (if (not (equal group (gnus-group-group-name))) + (setq group (gnus-group-group-name)) + (setq group nil))) + result)) + +(defun gnus-summary-jump-to-other-group (group &optional show-all) + "Directly jump to the other GROUP from summary buffer. +If SHOW-ALL is non-nil, already read articles are also listed." (interactive (if (eq gnus-summary-buffer (current-buffer)) (list (completing-read @@ -2666,34 +2690,11 @@ If NO-DISPLAY, don't generate a summary buffer." 'gnus-group-history) current-prefix-arg) (error "%s must be invoked from a gnus summary buffer." this-command))) - (unless (and (interactive-p) - (or (zerop (length group)) - (and gnus-newsgroup-name - (string-equal gnus-newsgroup-name group)) - (progn - (gnus-summary-exit) - nil))) - (let (result) - (while (and group - (null (setq result - (let ((gnus-auto-select-next nil)) - (or (gnus-summary-read-group-1 - group show-all no-article - kill-buffer no-display - select-articles) - (setq show-all nil - select-articles nil))))) - (eq gnus-auto-select-next 'quietly)) - (set-buffer gnus-group-buffer) - ;; The entry function called above goes to the next - ;; group automatically, so we go two groups back - ;; if we are searching for the previous group. - (when backward - (gnus-group-prev-unread-group 2)) - (if (not (equal group (gnus-group-group-name))) - (setq group (gnus-group-group-name)) - (setq group nil))) - result))) + (unless (or (zerop (length group)) + (and gnus-newsgroup-name + (string-equal gnus-newsgroup-name group))) + (gnus-summary-exit) + (gnus-summary-read-group group show-all))) (defun gnus-summary-read-group-1 (group show-all no-article kill-buffer no-display