X-Git-Url: https://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fgnus-group.el;h=cfa69e931aa36b7c45d1a83ea87ed22ccc7aad68;hb=a6ed25fa51418a13895ecd5071599cc581ebe252;hp=42be276fd868bff57e8b44398b55a1bb761e3026;hpb=a9406a1e31edba6cb1985fb26a4cd88420670751;p=gnus diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index 42be276fd..cfa69e931 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -1,5 +1,5 @@ ;;; gnus-group.el --- group mode commands for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -141,7 +141,7 @@ list." (function-item gnus-group-sort-by-rank) (function :tag "other" nil)))) -(defcustom gnus-group-line-format "%M\%S\%p\%P\%5y: %(%g%)%l\n" +(defcustom gnus-group-line-format "%M\%S\%p\%P\%5y: %(%g%)%l %O\n" "*Format of group lines. It works along the same lines as a normal formatting string, with some simple extensions. @@ -178,9 +178,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 +188,10 @@ 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." :group 'gnus-group-visual :type 'string) @@ -412,7 +412,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. @@ -543,6 +543,7 @@ simple manner.") "l" gnus-group-list-groups "L" gnus-group-list-all-groups "m" gnus-group-mail + "i" gnus-group-news "g" gnus-group-get-new-news "\M-g" gnus-group-get-new-news-this-group "R" gnus-group-restart @@ -867,14 +868,15 @@ simple manner.") ["Save areas" gnus-soup-save-areas (fboundp 'gnus-soup-pack-packet)] ["Brew SOUP" gnus-group-brew-soup (fboundp 'gnus-soup-pack-packet)]) ["Send a mail" gnus-group-mail t] - ["Post an article..." gnus-group-post-news t] + ["Send a message (mail or news)" gnus-group-post-news t] + ["Create a local message" gnus-group-news t] ["Check for new news" gnus-group-get-new-news ,@(if (featurep 'xemacs) '(t) '(:help "Get newly arrived articles")) ] - ["Send delayed articles" gnus-delay-send-drafts + ["Send queued messages" gnus-delay-send-queue ,@(if (featurep 'xemacs) '(t) - '(:help "Send all articles that are scheduled to be sent now")) + '(:help "Send all messages that are scheduled to be sent now")) ] ["Activate all groups" gnus-activate-all-groups t] ["Restart Gnus" gnus-group-restart t] @@ -1012,7 +1014,7 @@ The following commands are available: (when gnus-carpal (gnus-carpal-setup-buffer 'group)))) -(defsubst gnus-group-name-charset (method group) +(defun gnus-group-name-charset (method group) (if (null method) (setq method (gnus-find-method-for-group group))) (let ((item (assoc method gnus-group-name-charset-method-alist)) @@ -1026,8 +1028,9 @@ The following commands are available: result (cdr item)))) result))) -(defsubst gnus-group-name-decode (string charset) - (if (and string charset (featurep 'mule)) +(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) string)) @@ -1882,7 +1885,8 @@ 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 group method)))) + (gnus-group-prefixed-name (gnus-group-real-name group) + method)))) (gnus-sethash group `(-1 nil (,group @@ -2260,7 +2264,7 @@ and NEW-NAME will be prompted for." `(lambda (form) (gnus-group-edit-group-done ',part ,group form))) (local-set-key - "\C-c\C-i" + "\C-c\C-i" (gnus-create-info-command (cond ((eq part 'method) @@ -2329,20 +2333,33 @@ and NEW-NAME will be prompted for." (setcar entry (eval (cadar entry))))) (gnus-group-make-group group method)) -(defun gnus-group-make-help-group () - "Create the Gnus documentation group." +(defun gnus-group-make-help-group (&optional noerror) + "Create the Gnus documentation group. +Optional argument NOERROR modifies the behavior of this function when the +group already exists: +- if not given, and error is signaled, +- if t, stay silent, +- if anything else, just print a message." (interactive) (let ((name (gnus-group-prefixed-name "gnus-help" '(nndoc "gnus-help"))) (file (nnheader-find-etc-directory "gnus-tut.txt" t))) - (when (gnus-gethash name gnus-newsrc-hashtb) - (error "Documentation group already exists")) - (if (not file) - (gnus-message 1 "Couldn't find doc group") - (gnus-group-make-group - (gnus-group-real-name name) - (list 'nndoc "gnus-help" - (list 'nndoc-address file) - (list 'nndoc-article-type 'mbox))))) + (if (gnus-gethash name gnus-newsrc-hashtb) + (cond ((eq noerror nil) + (error "Documentation group already exists")) + ((eq noerror t) + ;; stay silent + ) + (t + (gnus-message 1 "Documentation group already exists"))) + ;; else: + (if (not file) + (gnus-message 1 "Couldn't find doc group") + (gnus-group-make-group + (gnus-group-real-name name) + (list 'nndoc "gnus-help" + (list 'nndoc-address file) + (list 'nndoc-article-type 'mbox)))) + )) (gnus-group-position-point)) (defun gnus-group-make-doc-group (file type) @@ -3628,7 +3645,7 @@ group." (defun gnus-group-find-new-groups (&optional arg) "Search for new groups and add them. -Each new group will be treated with `gnus-subscribe-newsgroup-method.' +Each new group will be treated with `gnus-subscribe-newsgroup-method'. With 1 C-u, use the `ask-server' method to query the server for new groups. With 2 C-u's, use most complete method possible to query the server