From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/40420 Path: main.gmane.org!not-for-mail From: Didier Verna Newsgroups: gmane.emacs.gnus.general Subject: [PATCH] behavior of gnus-group-make-help-group Date: Tue, 20 Nov 2001 12:54:16 +0100 Sender: owner-ding@hpc.uh.edu Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1035175972 799 80.91.224.250 (21 Oct 2002 04:52:52 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:52:52 +0000 (UTC) Return-Path: Original-Received: (qmail 3594 invoked from network); 20 Nov 2001 12:01:05 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 20 Nov 2001 12:01:05 -0000 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1669V5-0008DU-00; Tue, 20 Nov 2001 05:55:39 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 20 Nov 2001 05:55:23 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@[209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id FAA09314 for ; Tue, 20 Nov 2001 05:55:06 -0600 (CST) Original-Received: (qmail 3506 invoked by alias); 20 Nov 2001 11:54:34 -0000 Original-Received: (qmail 3501 invoked from network); 20 Nov 2001 11:54:33 -0000 Original-Received: from hermes.epita.fr (163.5.255.10) by gnus.org with SMTP; 20 Nov 2001 11:54:33 -0000 Original-Received: from goa.lrde.epita.fr (mail@goa.lrde.epita.fr [10.223.13.2]) by hermes.epita.fr id fAKCrj425820 for EPITA Paris France Tue, 20 Nov 2001 12:53:45 GMT Original-Received: from uzeb.lrde.epita.fr ([10.223.13.53] ident=mail) by goa.lrde.epita.fr with esmtp (Exim 3.32 #1 (Debian)) id 1669U6-0004pn-00 for ; Tue, 20 Nov 2001 12:54:38 +0100 Original-Received: from didier by uzeb.lrde.epita.fr with local (Exim 3.32 #1 (Debian)) id 1669Tk-00049t-00 for ; Tue, 20 Nov 2001 12:54:16 +0100 Original-To: Gnus Beta Testers X-Attribution: drv X-Url: http://www.lrde.epita.fr/~didier X-Web: http://www.lrde.epita.fr/~didier X-Home-Page: http://www.lrde.epita.fr/~didier X-Face: |j}\)O|k##MrRz#VK$Jy=0r=3Qc,,a/Tr6*JQbE73dy17]2YcmW$9Z&H21e}#~#pgc>dn(is5Bv1l!{1re+Q9suKIOUmOqZs2>QMxHlR;;}kaGYA@HR3D C6 X-Face: 6o|eiKqaHN.ANh8HXDzntcWUOCg\]RsOd.ctvm~*y}Y^R&*a+Co,\s#=HWsw3x$b_n2kJ#g (7u?J^@^xP)f,jUF|0Z'J:|G/bMA5O12*b,7`-Q`=pKsCRIpso07.Y>YB2H{7`?u&yh;C_ZtLHfj * gnus-group.el (gnus-group-make-help-group): new optional argument to control the error behavior. * gnus-start.el (gnus-check-first-time-used): use it to avoid erroring. Gnus Patch (runsocks cvs -q diff -u -t -b -B -w lisp/gnus-start.el lisp/gnu= s-group.el): Index: lisp/gnus-start.el =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/local/cvsroot/gnus/lisp/gnus-start.el,v retrieving revision 6.32 diff -u -u -t -b -B -w -r6.32 gnus-start.el --- lisp/gnus-start.el 2001/11/12 18:55:22 6.32 +++ lisp/gnus-start.el 2001/11/20 11:39:23 @@ -1218,7 +1218,9 @@ group gnus-level-default-subscribed gnus-level-killed))) (save-excursion (set-buffer gnus-group-buffer) - (gnus-group-make-help-group)) + ;; Don't error if the group already exists. This happens when a + ;; first-time user types 'F'. -- didier + (gnus-group-make-help-group t)) (when gnus-novice-user (gnus-message 7 "`A k' to list killed groups")))))) Index: lisp/gnus-group.el =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/local/cvsroot/gnus/lisp/gnus-group.el,v retrieving revision 6.46 diff -u -u -t -b -B -w -r6.46 gnus-group.el --- lisp/gnus-group.el 2001/11/01 14:17:25 6.46 +++ lisp/gnus-group.el 2001/11/20 11:39:23 @@ -2329,20 +2329,33 @@ (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) + (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))))) + (list 'nndoc-article-type 'mbox)))) + )) (gnus-group-position-point)) (defun gnus-group-make-doc-group (file type) -- Didier Verna, didier@lrde.epita.fr, http://www.lrde.epita.fr/~didier EPITA / LRDE, 14-16 rue Voltaire Tel.+33 (1) 53 14 59 47 94276 Le Kremlin-Bic=EAtre, France Fax.+33 (1) 53 14 59 22 didier@xemac= s.org