GNU bug report logs - #36737
gnus-topic-mode clobbers gnus-group-change-level-function

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: dick <priapushk@HIDDEN>; Keywords: wontfix; merged with #36735; Done: Lars Ingebrigtsen <larsi@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
bug closed, send any further explanations to 36737 <at> debbugs.gnu.org and dick <priapushk@HIDDEN> Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added tag(s) wontfix. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 36737 <at> debbugs.gnu.org:


Received: (at 36737) by debbugs.gnu.org; 24 Sep 2019 06:47:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 24 02:47:17 2019
Received: from localhost ([127.0.0.1]:37477 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iCebV-0001eB-1h
	for submit <at> debbugs.gnu.org; Tue, 24 Sep 2019 02:47:17 -0400
Received: from quimby.gnus.org ([80.91.231.51]:56844)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1iCebT-0001bo-4s
 for 36737 <at> debbugs.gnu.org; Tue, 24 Sep 2019 02:47:15 -0400
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie)
 by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.89) (envelope-from <larsi@HIDDEN>)
 id 1iCebN-0002Oh-HE; Tue, 24 Sep 2019 08:47:13 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: priapushk@HIDDEN
Subject: Re: bug#36737: [priapushk@HIDDEN] Re: bug#36737: patch
References: <875znxiij0.fsf@HIDDEN>
 <87y2ye4nud.fsf@HIDDEN>
Date: Tue, 24 Sep 2019 08:47:09 +0200
In-Reply-To: <87y2ye4nud.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Tue,
 24 Sep 2019 01:03:38 +0200")
Message-ID: <871rw642du.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: > From: priapushk@HIDDEN > Subject: Re: bug#36737: patch
 > To: Lars Ingebrigtsen <larsi@HIDDEN> > Date: Mon, 23 Sep 2019 18:59:28
 -0400 (7 hours, 42 minutes, 52 seconds ago) > > Hi. > > I customi [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 36737
Cc: 36737 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> From: priapushk@HIDDEN
> Subject: Re: bug#36737: patch
> To: Lars Ingebrigtsen <larsi@HIDDEN>
> Date: Mon, 23 Sep 2019 18:59:28 -0400 (7 hours, 42 minutes, 52 seconds ago)
>
> Hi.
>
> I customize gnus-group-change-level-function but gnus-topic-mode overrides it.

(Please leave the debbugs address in the Cc headers, otherwise the bug
tracker won't see it.)

Right.  However, I think this is pretty obscure functionality, so I
don't think it warrants this sort of scaffolding.  You can set
gnus-group-change-level-function to whatever (after gnus-topic-mode has
done its stuff), and if you want your function to do both the topic mode
stuff and your own stuff, you can do that from your own function.

So I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#36737; Package emacs. Full text available.

Message received at 36737 <at> debbugs.gnu.org:


Received: (at 36737) by debbugs.gnu.org; 23 Sep 2019 23:03:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 23 19:03:47 2019
Received: from localhost ([127.0.0.1]:37273 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iCXMx-0004ii-16
	for submit <at> debbugs.gnu.org; Mon, 23 Sep 2019 19:03:47 -0400
Received: from quimby.gnus.org ([80.91.231.51]:47768)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1iCXMu-0004iY-Pv
 for 36737 <at> debbugs.gnu.org; Mon, 23 Sep 2019 19:03:45 -0400
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie)
 by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.89) (envelope-from <larsi@HIDDEN>) id 1iCXMp-00057x-E0
 for 36737 <at> debbugs.gnu.org; Tue, 24 Sep 2019 01:03:43 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: 36737 <at> debbugs.gnu.org
Subject: [priapushk@HIDDEN] Re: bug#36737: patch
Date: Tue, 24 Sep 2019 01:03:38 +0200
Message-ID: <87y2ye4nud.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Start of forwarded message From: priapushk@HIDDEN To:
 Lars Ingebrigtsen <larsi@HIDDEN> Subject: Re: bug#36737: patch Date: Mon,
 23 Sep 2019 18:59:28 -040 [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 36737
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


-------------------- Start of forwarded message --------------------
From: priapushk@HIDDEN
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#36737: patch
Date: Mon, 23 Sep 2019 18:59:28 -0400

Hi.

I customize gnus-group-change-level-function but gnus-topic-mode overrides it.
-------------------- End of forwarded message --------------------

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#36737; Package emacs. Full text available.

Message received at 36737 <at> debbugs.gnu.org:


Received: (at 36737) by debbugs.gnu.org; 23 Sep 2019 22:47:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 23 18:47:35 2019
Received: from localhost ([127.0.0.1]:37268 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iCX7H-0002GV-GH
	for submit <at> debbugs.gnu.org; Mon, 23 Sep 2019 18:47:35 -0400
Received: from quimby.gnus.org ([80.91.231.51]:47492)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>)
 id 1iCX7E-0002GD-AU; Mon, 23 Sep 2019 18:47:32 -0400
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie)
 by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.89) (envelope-from <larsi@HIDDEN>)
 id 1iCX7B-0004yY-5B; Tue, 24 Sep 2019 00:47:31 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: dick <priapushk@HIDDEN>
Subject: Re: bug#36737: patch
References: <875znxiij0.fsf@HIDDEN>
Date: Tue, 24 Sep 2019 00:47:28 +0200
In-Reply-To: <875znxiij0.fsf@HIDDEN>
 (dick's message of "Fri, 19 Jul 2019 21:47:31 -0400")
Message-ID: <8736gm635r.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  dick <priapushk@HIDDEN> writes: > Gnus backends may add
 additional hooks via > `gnus-group-change-level-functions' but should not
 modify > `gnus-group-change-level-function'. I'm not sure what this is trying
 to fix? What's the problem here? 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 36737
Cc: 36735 <at> debbugs.gnu.org, 36737 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

dick <priapushk@HIDDEN> writes:

> Gnus backends may add additional hooks via
> `gnus-group-change-level-functions' but should not modify
> `gnus-group-change-level-function'.

I'm not sure what this is trying to fix?  What's the problem here?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#36737; Package emacs. Full text available.
Merged 36735 36737. Request was from dick <dick.r.chiang@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Disconnected #36736 from all other report(s). Request was from dick <dick.r.chiang@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Disconnected #36735 from all other report(s). Request was from dick <dick.r.chiang@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Changed bug title to 'gnus-topic-mode clobbers gnus-group-change-level-function' from 'patch' Request was from Noam Postavsky <npostavs@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Merged 36735 36736 36737. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 20 Jul 2019 04:57:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jul 20 00:57:34 2019
Received: from localhost ([127.0.0.1]:56724 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hohR7-0001K7-LB
	for submit <at> debbugs.gnu.org; Sat, 20 Jul 2019 00:57:34 -0400
Received: from lists.gnu.org ([209.51.188.17]:45977)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <priapushk@HIDDEN>) id 1hoeTJ-0005K4-7e
 for submit <at> debbugs.gnu.org; Fri, 19 Jul 2019 21:47:37 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:46308)
 by lists.gnu.org with esmtp (Exim 4.86_2)
 (envelope-from <priapushk@HIDDEN>) id 1hoeTH-0002xk-P7
 for bug-gnu-emacs@HIDDEN; Fri, 19 Jul 2019 21:47:37 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM
 autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <priapushk@HIDDEN>) id 1hoeTG-0006pV-Bd
 for bug-gnu-emacs@HIDDEN; Fri, 19 Jul 2019 21:47:35 -0400
Received: from mail-qk1-x730.google.com ([2607:f8b0:4864:20::730]:36289)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <priapushk@HIDDEN>) id 1hoeTG-0006pJ-77
 for bug-gnu-emacs@HIDDEN; Fri, 19 Jul 2019 21:47:34 -0400
Received: by mail-qk1-x730.google.com with SMTP id g18so24665638qkl.3
 for <bug-gnu-emacs@HIDDEN>; Fri, 19 Jul 2019 18:47:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:subject:date:message-id:user-agent:mime-version;
 bh=z2lk+0bvECjlfZY3NAeg30aCEHj/wOQgYnWpLtVMavU=;
 b=O80mDTM7jA+7kZWHPm+P1etfpzjDSfTd+1gSfkuttdGpRuzpUfGHqK+vdmdin22fbV
 OlPszrFSLadrLQMGYyraVtyEdlge0KtWfzO0v8ZmAbVXEa3HSSss3M+0H4RogrxfGG5f
 h27Pf834H0kBteRatwp2jjYQ7jyqxWMGgdhN+8O4dzdjcnx4taRdHHYKmwATpUNPPOOp
 ZvypoMfVjLvU8r+A5D3ZJ5FDe0KpwI1hYGXkXpis0vwyixG9UzAFAwwotNT5tpXUwA+Y
 XPuJWf9MG9A24FvcDht4tEN2XvIYLI2mZ5FwoQlO0UH8pkNkE5RVgyw3+iLM9OMkkKWu
 ASsQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:date:message-id:user-agent
 :mime-version;
 bh=z2lk+0bvECjlfZY3NAeg30aCEHj/wOQgYnWpLtVMavU=;
 b=csQyQHBvyQRH1sYDsGyYJFU4f4B29serbVJOw9IP3FHfyU/nJbx5BoN53ouSFdtCsM
 uQpPjvvXqIkmBLgkl+3XX1Gxz8/+6K3PgKcmqynLEZ7db1I8BXh1fBcBmIQ844SLPrNW
 mIh4mDxcBhY3OsG/1fW1trrw+oZmjbewraidbevJBLI6THb2exMy/B0djoDVjMi2y5An
 cwy8MROq6STggaYi7/kgem2lapdQYY+j48rjjqejHlPlhDJmn2S3K2yP00Au8dmrUPh7
 60u4jW+x8grFEd1rezRudg4gsmrKfwaR6myOK4pg2L1ntYK4Cvbhj9tbxGTcjPn8hYO1
 FKoA==
X-Gm-Message-State: APjAAAXowS9nXvbXD2CtEx7Muatmxtcb0jxawQo7oiAOw0WPzA6N1+KA
 e+l1mVyLP/1oLJIUA34Oc4P5QOQz
X-Google-Smtp-Source: APXvYqzC2L7QKRfwmTr6cValSXlP7EOIlePSgd4K2JzULCgx0/swbZNJFzPwSFZmnzTAY5pf08sBVA==
X-Received: by 2002:a37:9dc8:: with SMTP id
 g191mr37884259qke.431.1563587253258; 
 Fri, 19 Jul 2019 18:47:33 -0700 (PDT)
Received: from localhost ([100.33.98.8])
 by smtp.gmail.com with ESMTPSA id k123sm13784956qkf.13.2019.07.19.18.47.32
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Fri, 19 Jul 2019 18:47:32 -0700 (PDT)
From: dick <priapushk@HIDDEN>
X-Google-Original-From: dick <dick.r.chiang@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: patch
Date: Fri, 19 Jul 2019 21:47:31 -0400
Message-ID: <875znxiij0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-Received-From: 2607:f8b0:4864:20::730
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Sat, 20 Jul 2019 00:57:31 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

--=-=-=
Content-Type: text/plain

Duplicate of preceding patch from priapushk@HIDDEN

--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
 filename=0001-Avoid-clobbering-gnus-group-change-level-function.patch
Content-Description: patch

From b8da0de6541fa5a966c30306c1f135bc60590ff0 Mon Sep 17 00:00:00 2001
From: dickmao <none>
Date: Fri, 19 Jul 2019 18:18:31 -0400
Subject: [PATCH] Avoid clobbering gnus-group-change-level-function

Gnus backends may add additional hooks via
`gnus-group-change-level-functions' but should not modify
`gnus-group-change-level-function'.
* lisp/gnus/gnus-group.el (gnus-group-kill-group): run-hook-with-args
  on `gnus-group-change-level-functions'.
* lisp/gnus/gnus-srvr.el (gnus-server-kill-server): run-hook-with-args
  on `gnus-group-change-level-functions'.
* lisp/gnus/gnus-start.el (gnus-group-change-level): run-hook-with-args
  on `gnus-group-change-level-functions'.
* lisp/gnus/gnus-topic.el (gnus-topic-mode): avoid clobbering
  `gnus-group-change-level-function'.  Mirror LOCAL flag in `add-hook'
  to `remove-hook' for `gnus-check-bogus-groups-hook'.
* lisp/gnus/gnus.el (gnus-group-change-level-function): define abnormal
  hook variable `gnus-group-change-level-functions'.
---
 lisp/gnus/gnus-group.el |  5 ++---
 lisp/gnus/gnus-srvr.el  |  5 ++---
 lisp/gnus/gnus-start.el |  5 ++---
 lisp/gnus/gnus-topic.el |  8 ++++----
 lisp/gnus/gnus.el       | 13 +++++++++++--
 5 files changed, 21 insertions(+), 15 deletions(-)

diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 299ebdec50..d95aa1ad8c 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -3919,9 +3919,8 @@ gnus-group-kill-group
 	(setq gnus-newsrc-alist
 	      (delq (assoc group gnus-newsrc-alist)
 		    gnus-newsrc-alist))
-	(when gnus-group-change-level-function
-	  (funcall gnus-group-change-level-function
-		   group gnus-level-killed 3))
+	(run-hook-with-args 'gnus-group-change-level-functions
+                            group gnus-level-killed 3)
 	(cond
 	 ((setq entry (gnus-group-entry group))
 	  (push (cons (car entry) (nth 1 entry))
diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el
index 972ff28e63..8d0b36298f 100644
--- a/lisp/gnus/gnus-srvr.el
+++ b/lisp/gnus/gnus-srvr.el
@@ -432,9 +432,8 @@ gnus-server-kill-server
 	(setq gnus-newsrc-alist
 	      (delq (assoc group gnus-newsrc-alist)
 		    gnus-newsrc-alist))
-	(when gnus-group-change-level-function
-	  (funcall gnus-group-change-level-function
-		   group gnus-level-killed 3)))))
+        (run-hook-with-args 'gnus-group-change-level-functions
+                            group gnus-level-killed 3))))
   (gnus-server-position-point))
 
 (defun gnus-server-yank-server ()
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el
index d726ee5aab..f5ded7a4fa 100644
--- a/lisp/gnus/gnus-start.el
+++ b/lisp/gnus/gnus-start.el
@@ -1351,9 +1351,8 @@ gnus-group-change-level
 	  (gnus-dribble-enter
 	   (format "(gnus-group-set-info '%S)" info)
 	   (concat "^(gnus-group-set-info '(\"" (regexp-quote group) "\"")))))
-      (when gnus-group-change-level-function
-	(funcall gnus-group-change-level-function
-		 group level oldlevel previous)))))
+      (run-hook-with-args 'gnus-group-change-level-functions
+                          group level oldlevel previous))))
 
 (defun gnus-check-bogus-newsgroups (&optional confirm)
   "Remove bogus newsgroups.
diff --git a/lisp/gnus/gnus-topic.el b/lisp/gnus/gnus-topic.el
index e2c728df8f..1daee1dcfb 100644
--- a/lisp/gnus/gnus-topic.el
+++ b/lisp/gnus/gnus-topic.el
@@ -1143,7 +1143,7 @@ gnus-topic-mode
 	   'gnus-topic-update-topics-containing-group)
       (set (make-local-variable 'gnus-group-sort-alist-function)
 	   'gnus-group-sort-topic)
-      (setq gnus-group-change-level-function 'gnus-topic-change-level)
+      (add-hook 'gnus-group-change-level-functions 'gnus-topic-change-level nil 'local)
       (setq gnus-goto-missing-group-function 'gnus-topic-goto-missing-group)
       (add-hook 'gnus-check-bogus-groups-hook 'gnus-topic-clean-alist
 		nil 'local)
@@ -1154,8 +1154,8 @@ gnus-topic-mode
     ;; Remove topic infestation.
     (unless gnus-topic-mode
       (remove-hook 'gnus-summary-exit-hook 'gnus-topic-update-topic)
-      (setq gnus-group-change-level-function nil)
-      (remove-hook 'gnus-check-bogus-groups-hook 'gnus-topic-clean-alist)
+      (remove-hook 'gnus-group-change-level-functions 'gnus-topic-change-level 'local)
+      (remove-hook 'gnus-check-bogus-groups-hook 'gnus-topic-clean-alist 'local)
       (setq gnus-group-prepare-function 'gnus-group-prepare-flat)
       (setq gnus-group-sort-alist-function 'gnus-group-sort-flat))
     (when (called-interactively-p 'any)
@@ -1741,7 +1741,7 @@ gnus-topic-move
 
 (defun gnus-subscribe-topics (newsgroup)
   (catch 'end
-    (let (match gnus-group-change-level-function)
+    (let (match gnus-group-change-level-functions)
       (dolist (topic (gnus-topic-list))
 	(when (and (setq match (cdr (assq 'subscribe
 					  (gnus-topic-parameters topic))))
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 9ee7db9e20..abb8b7c9f8 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -2112,10 +2112,19 @@ gnus-apply-kill-hook
 
 (defcustom gnus-group-change-level-function nil
   "Function run when a group level is changed.
-It is called with three parameters -- GROUP, LEVEL and OLDLEVEL."
+It is called with four parameters -- GROUP, LEVEL, OLDLEVEL, and optionally PREVIOUS"
   :group 'gnus-group-levels
   :type '(choice (const nil)
-		 function))
+		 function)
+  :set (lambda (symbol value)
+         (set-default symbol value)
+         (when value
+           (set-default 'gnus-group-change-level-functions (list value)))))
+
+(defvar gnus-group-change-level-functions nil
+  "\"Abnormal\" hook run when a group level is changed.
+Each function element is called with three parameters -- GROUP, LEVEL, OLDLEVEL, and optionally PREVIOUS.
+Its default value is determined by the :set method of `gnus-group-change-level-function'")
 
 ;;; Face thingies.
 
-- 
2.22.0


--=-=-=--




Acknowledgement sent to dick <priapushk@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#36737; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 24 Sep 2019 07:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.