;;; gnus-group.el --- group mode commands for Gnus
-;; Copyright (C) 1996-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2015 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
;;; Code:
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
- (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-
(eval-when-compile
(require 'cl))
(defvar tool-bar-mode)
(autoload 'gnus-group-make-nnir-group "nnir")
-(defcustom gnus-no-groups-message "No Gnus is good news"
+(defcustom gnus-no-groups-message "No news is good news"
"*Message displayed by Gnus when no groups are available."
:group 'gnus-start
:type 'string)
gnus-group-news-low))
"*Controls the highlighting of group buffer lines.
-Below is a list of `Form'/`Face' pairs. When deciding how a a
+Below is a list of `Form'/`Face' pairs. When deciding how a
particular group line should be displayed, each form is
evaluated. The content of the face field after the first true form is
used. You can change how those group lines are displayed by
"p" gnus-group-prev-unread-group
"\177" gnus-group-prev-unread-group
[delete] gnus-group-prev-unread-group
- [backspace] gnus-group-prev-unread-group
"N" gnus-group-next-group
"P" gnus-group-prev-group
"\M-n" gnus-group-next-unread-group-same-level
"M" gnus-group-list-limit
"l" gnus-group-list-limit
"c" gnus-group-list-limit
- "?" gnus-group-list-limit)
+ "?" gnus-group-list-limit
+ "!" gnus-group-list-limit)
(gnus-define-keys (gnus-group-list-flush-map "f" gnus-group-list-map)
"k" gnus-group-list-flush
"M" gnus-group-list-flush
"l" gnus-group-list-flush
"c" gnus-group-list-flush
- "?" gnus-group-list-flush)
+ "?" gnus-group-list-flush
+ "!" gnus-group-list-flush)
(gnus-define-keys (gnus-group-list-plus-map "p" gnus-group-list-map)
"k" gnus-group-list-plus
"M" gnus-group-list-plus
"l" gnus-group-list-plus
"c" gnus-group-list-plus
- "?" gnus-group-list-plus)
+ "?" gnus-group-list-plus
+ "!" gnus-group-list-plus)
(gnus-define-keys (gnus-group-score-map "W" gnus-group-mode-map)
"f" gnus-score-flush-cache
'gnus-group-tool-bar-retro)
"Specifies the Gnus group tool bar.
-It can be either a list or a symbol refering to a list. See
+It can be either a list or a symbol referring to a list. See
`gmm-tool-bar-from-list' for the format of the list. The
default key map is `gnus-group-mode-map'.
'((gnus-group-post-news "mail/compose")
;; Some useful agent icons? I don't use the agent so agent users should
;; suggest useful commands:
- (gnus-agent-toggle-plugged "disconnect" t
+ (gnus-agent-toggle-plugged "unplugged" t
:help "Gnus is currently unplugged. Click to work online."
:visible (and gnus-agent (not gnus-plugged)))
- (gnus-agent-toggle-plugged "connect" t
+ (gnus-agent-toggle-plugged "plugged" t
:help "Gnus is currently plugged. Click to work offline."
:visible (and gnus-agent gnus-plugged))
;; FIXME: gnus-agent-toggle-plugged (in gnus-agent-group-make-menu-bar)
(set (make-local-variable 'tool-bar-map) map))))
gnus-group-tool-bar-map)
-(defun gnus-group-mode ()
+(define-derived-mode gnus-group-mode fundamental-mode "Group"
"Major mode for reading news.
All normal editing commands are switched off.
The following commands are available:
\\{gnus-group-mode-map}"
- (interactive)
- (kill-all-local-variables)
(when (gnus-visual-p 'group-menu 'menu)
(gnus-group-make-menu-bar)
(gnus-group-make-tool-bar))
(gnus-simplify-mode-line)
- (setq major-mode 'gnus-group-mode)
- (setq mode-name "Group")
(gnus-group-set-mode-line)
(setq mode-line-process nil)
- (use-local-map gnus-group-mode-map)
(buffer-disable-undo)
(setq truncate-lines t)
(setq buffer-read-only t
(when gnus-use-undo
(gnus-undo-mode 1))
(when gnus-slave
- (gnus-slave-mode))
- (gnus-run-mode-hooks 'gnus-group-mode-hook))
+ (gnus-slave-mode)))
(defun gnus-update-group-mark-positions ()
(save-excursion
(defun gnus-group-setup-buffer ()
(set-buffer (gnus-get-buffer-create gnus-group-buffer))
- (unless (eq major-mode 'gnus-group-mode)
+ (unless (derived-mode-p 'gnus-group-mode)
(gnus-group-mode)))
(defun gnus-group-name-charset (method group)
- (if (null method)
- (setq method (gnus-find-method-for-group group)))
- (let ((item (or (assoc method gnus-group-name-charset-method-alist)
- (and (consp method)
- (assoc (list (car method) (cadr method))
- gnus-group-name-charset-method-alist))))
- (alist gnus-group-name-charset-group-alist)
- result)
- (if item
- (cdr item)
- (while (setq item (pop alist))
- (if (string-match (car item) group)
- (setq alist nil
- result (cdr item))))
- result)))
+ (unless method
+ (setq method (gnu