* texi/gnus-ja.texi (Article Date): Update Japanese translation.
[elisp/gnus.git-] / lisp / gnus-group.el
index fe15317..98d08e3 100644 (file)
@@ -166,6 +166,7 @@ with some simple extensions.
 %O    Moderated group (string, \"(m)\" or \"\")
 %P    Topic indentation (string)
 %m    Whether there is new(ish) mail in the group (char, \"%\")
+%w    Number of new(ish) mails in the group (integer)
 %l    Whether there are GroupLens predictions for this group (string)
 %n    Select from where (string)
 %z    A string that look like `<%s:%n>' if a foreign select method is used
@@ -178,9 +179,6 @@ with some simple extensions.
       will be inserted into the buffer just like information from any other
       group specifier.
 
-Text between %( and %) will be highlighted with `gnus-mouse-face' when
-the mouse point move inside the area.  There can only be one such area.
-
 Note that this format specification is not always respected.  For
 reasons of efficiency, when listing killed groups, this specification
 is ignored altogether. If the spec is changed considerably, your
@@ -191,7 +189,11 @@ If you use %o or %O, reading the active file will be slower and quite
 a bit of extra memory will be used.  %D will also worsen performance.
 Also note that if you change the format specification to include any
 of these specs, you must probably re-start Gnus to see them go into
-effect."
+effect.
+
+General format specifiers can also be used.
+See (gnus)Formatting Variables."
+  :link '(custom-manual "(gnus)Formatting Variables")
   :group 'gnus-group-visual
   :type 'string)
 
@@ -340,7 +342,7 @@ variable."
     ((and (= unread 0)) .
      gnus-group-news-low-empty-face)
     (t .
-     gnus-group-news-low-face))
+       gnus-group-news-low-face))
   "*Controls the highlighting of group buffer lines.
 
 Below is a list of `Form'/`Face' pairs.  When deciding how a a
@@ -412,7 +414,7 @@ For example:
 
 (defcustom gnus-group-name-charset-group-alist
   (if (or (and (fboundp 'find-coding-system) (find-coding-system 'utf-8))
-         (and (fboundp 'coding-system-p) (coding-system-p 'utf-8)))
+         (and (fboundp 'coding-system-p) (coding-system-p 'utf-8)))
       '((".*" . utf-8))
     nil)
   "Alist of group regexp and the charset for group names.
@@ -484,6 +486,13 @@ simple manner.")
     (?l gnus-tmp-grouplens ?s)
     (?z gnus-tmp-news-method-string ?s)
     (?m (gnus-group-new-mail gnus-tmp-group) ?c)
+    (?w (if (gnus-news-group-p gnus-tmp-group)
+           ""
+         (int-to-string
+          (length
+           (nnmail-new-mail-numbers (gnus-group-real-name gnus-tmp-group))
+           )))
+       ?s)
     (?d (gnus-group-timestamp-string gnus-tmp-group) ?s)
     (?u gnus-tmp-user-defined ?s)))
 
@@ -578,6 +587,7 @@ simple manner.")
     "<" beginning-of-buffer
     ">" end-of-buffer
     "\C-c\C-b" gnus-bug
+    "\C-c\C-n" gnus-namazu-search
     "\C-c\C-s" gnus-group-sort-groups
     "t" gnus-topic-mode
     "\C-c\M-g" gnus-activate-all-groups
@@ -605,6 +615,7 @@ simple manner.")
     "k" gnus-group-make-kiboze-group
     "l" gnus-group-nnimap-edit-acl
     "m" gnus-group-make-group
+    "n" gnus-group-make-shimbun-group
     "E" gnus-group-edit-group
     "e" gnus-group-edit-group-method
     "p" gnus-group-edit-group-parameters
@@ -612,6 +623,7 @@ simple manner.")
     "V" gnus-group-make-empty-virtual
     "D" gnus-group-enter-directory
     "f" gnus-group-make-doc-group
+    "G" gnus-group-make-nnir-group
     "w" gnus-group-make-web-group
     "r" gnus-group-rename-group
     "c" gnus-group-customize
@@ -736,7 +748,7 @@ simple manner.")
        (gnus-group-group-name)]
        ["Kill" gnus-group-kill-group :active (gnus-group-group-name)
        ,@(if (featurep 'xemacs) nil
-             '(:help "Kill (remove) current group"))]
+           '(:help "Kill (remove) current group"))]
        ["Yank" gnus-group-yank-group gnus-list-of-killed-groups]
        ["Describe" gnus-group-describe-group :active (gnus-group-group-name)
        ,@(if (featurep 'xemacs) nil
@@ -823,6 +835,7 @@ simple manner.")
        ["Kill all groups on level..." gnus-group-kill-level t])
        ("Foreign groups"
        ["Make a foreign group" gnus-group-make-group t]
+       ["Make a shimbun group" gnus-group-make-shimbun-group t]
        ["Add a directory group" gnus-group-make-directory-group t]
        ["Add the help group" gnus-group-make-help-group t]
        ["Add the archive group" gnus-group-make-archive-group t]
@@ -1031,7 +1044,7 @@ The following commands are available:
 (defun gnus-group-name-decode (string charset)
   (if (and string charset (featurep 'mule)
           (not (mm-multibyte-string-p string)))
-      (mm-decode-coding-string string charset)
+      (decode-coding-string string charset)
     string))
 
 (defun gnus-group-decoded-name (string)
@@ -1868,13 +1881,15 @@ Returns whether the fetching was successful or not."
 ;; if selection was successful.
 (defun gnus-group-read-ephemeral-group (group method &optional activate
                                              quit-config request-only
-                                             select-articles)
+                                             select-articles
+                                             parameters)
   "Read GROUP from METHOD as an ephemeral group.
 If ACTIVATE, request the group first.
 If QUIT-CONFIG, use that window configuration when exiting from the
 ephemeral group.
 If REQUEST-ONLY, don't actually read the group; just request it.
 If SELECT-ARTICLES, only select those articles.
+If PARAMETERS, use those as the group parameters.
 
 Return the name of the group if selection was successful."
   ;; Transform the select method into a unique server.
@@ -1885,16 +1900,19 @@ Return the name of the group if selection was successful."
          (,(intern (format "%s-address" (car method))) ,(cadr method))
          ,@(cddr method)))
   (let ((group (if (gnus-group-foreign-p group) group
-                (gnus-group-prefixed-name (gnus-group-real-name group) 
+                (gnus-group-prefixed-name (gnus-group-real-name group)
                                           method))))
     (gnus-sethash
      group
      `(-1 nil (,group
               ,gnus-level-default-subscribed nil nil ,method
-              ((quit-config .
-                            ,(if quit-config quit-config
-                               (cons gnus-summary-buffer
-                                     gnus-current-window-configuration))))))
+              ,(cons
+                (if quit-config
+                    (cons 'quit-config quit-config)
+                  (cons 'quit-config
+                        (cons gnus-summary-buffer
+                              gnus-current-window-configuration)))
+                parameters)))
      gnus-newsrc-hashtb)
     (push method gnus-ephemeral-servers)
     (set-buffer gnus-group-buffer)
@@ -3412,7 +3430,10 @@ re-scanning.  If ARG is non-nil and not a number, this will force
        (gnus-get-unread-articles arg)))
     (gnus-run-hooks 'gnus-after-getting-new-news-hook)
     (gnus-group-list-groups (and (numberp arg)
-                                (max (car gnus-group-list-mode) arg)))))
+                                (max (car gnus-group-list-mode) arg))))
+  ;; Update modeline.
+  (when (and gnus-agent (not (interactive-p)))
+    (gnus-agent-toggle-plugged gnus-plugged)))
 
 (defun gnus-group-get-new-news-this-group (&optional n dont-scan)
   "Check for newly arrived news in the current group (and the N-1 next groups).
@@ -3599,7 +3620,7 @@ This command may read the active file."
             (> (prefix-numeric-value level) gnus-level-killed))
     (gnus-get-killed-groups))
   (funcall gnus-group-prepare-function
-   (or level gnus-level-subscribed) (and all t) (or lowest 1) regexp)
+          (or level gnus-level-subscribed) (and all t) (or lowest 1) regexp)
   (goto-char (point-min))
   (gnus-group-position-point))
 
@@ -3686,7 +3707,11 @@ The hook gnus-suspend-gnus-hook is called before actually suspending."
   ;; Kill Gnus buffers except for group mode buffer.
   (let ((group-buf (get-buffer gnus-group-buffer)))
     (mapcar (lambda (buf)
-             (unless (member buf (list group-buf gnus-dribble-buffer))
+             (unless (or (member buf (list group-buf gnus-dribble-buffer))
+                         (progn
+                           (save-excursion
+                             (set-buffer buf)
+                             (eq major-mode 'message-mode))))
                (gnus-kill-buffer buf)))
            (gnus-buffers))
     (gnus-kill-gnus-frames)
@@ -3737,8 +3762,8 @@ The hook `gnus-exit-gnus-hook' is called before actually exiting."
     (gnus-configure-windows 'group t)
     (when (and (gnus-buffer-live-p gnus-dribble-buffer)
               (not (zerop (save-excursion
-                           (set-buffer gnus-dribble-buffer)
-                           (buffer-size)))))
+                            (set-buffer gnus-dribble-buffer)
+                            (buffer-size)))))
       (gnus-dribble-enter
        ";;; Gnus was exited on purpose without saving the .newsrc files."))
     (gnus-dribble-save)
@@ -4006,22 +4031,28 @@ This command may read the active file."
 
 (defun gnus-group-mark-article-read (group article)
   "Mark ARTICLE read."
-  (gnus-activate-group group)
   (let ((buffer (gnus-summary-buffer-name group))
-       (mark gnus-read-mark))
-    (unless
-       (and
-        (get-buffer buffer)
-        (with-current-buffer buffer
-          (when gnus-newsgroup-prepared
-            (when (and gnus-newsgroup-auto-expire
-                       (memq mark gnus-auto-expirable-marks))
-              (setq mark gnus-expirable-mark))
-            (setq mark (gnus-request-update-mark
-                        group article mark))
-            (gnus-mark-article-as-read article mark)
-            (setq gnus-newsgroup-active (gnus-active group))
-            t)))
+       (mark gnus-read-mark)
+       active n)
+    (if (get-buffer buffer)
+       (with-current-buffer buffer
+         (setq active gnus-newsgroup-active)
+         (gnus-activate-group group)
+         (when gnus-newsgroup-prepared
+           (when (and gnus-newsgroup-auto-expire
+                      (memq mark gnus-auto-expirable-marks))
+             (setq mark gnus-expirable-mark))
+           (setq mark (gnus-request-update-mark
+                       group article mark))
+           (gnus-mark-article-as-read article mark)
+           (setq gnus-newsgroup-active (gnus-active group))
+           (when active
+             (setq n (1+ (cdr active)))
+             (while (<= n (cdr gnus-newsgroup-active))
+               (unless (eq n article)
+                 (push n gnus-newsgroup-unselected))
+               (setq n (1+ n))))))
+      (gnus-activate-group group)
       (gnus-group-make-articles-read group
                                     (list article))
       (when (gnus-group-auto-expirable-p group)