- (interactive "P")
- (when (eq major-mode 'gnus-summary-mode)
- (when (set (make-local-variable 'gnus-mailing-list-mode)
- (if (null arg) (not gnus-mailing-list-mode)
- (> (prefix-numeric-value arg) 0)))
- ;; Set up the menu.
- (when (gnus-visual-p 'mailing-list-menu 'menu)
- (gnus-mailing-list-make-menu-bar))
- (add-minor-mode 'gnus-mailing-list-mode " Mailing-List"
- gnus-mailing-list-mode-map)
- (gnus-run-hooks 'gnus-mailing-list-mode-hook))))
+ :lighter " Mailing-List"
+ :keymap gnus-mailing-list-mode-map
+ (cond
+ ((not (derived-mode-p 'gnus-summary-mode))
+ (setq gnus-mailing-list-mode nil))
+ (gnus-mailing-list-mode
+ ;; Set up the menu.
+ (when (gnus-visual-p 'mailing-list-menu 'menu)
+ (gnus-mailing-list-make-menu-bar)))))