From 9e7fee287498a750c5e3e7c4ccf369c234fafb9a Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 17 Jun 1999 23:07:02 +0000 Subject: [PATCH] (gnus-summary-jump-to-other-group): Rewrite as an independent function. (gnus-summary-read-group): Revert to the previous form. --- lisp/gnus-sum.el | 59 +++++++++++++++++++++++++++--------------------------- 1 file changed, 30 insertions(+), 29 deletions(-) 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 -- 1.7.10.4