(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)
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
'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