From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#21440: 25.0.50; Manual: FEATURE-unload-hook in (info "(elisp) Coding Conventions") Date: Mon, 12 Jul 2021 14:59:45 +0300 Message-ID: <83y2abagjy.fsf@gnu.org> References: <87k2rzakd3.fsf@web.de> <871rk5le0t.fsf@gmx.de> <87r1g8syfe.fsf@gnus.org> <87bl78w5fh.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38407"; mail-complaints-to="usenet@ciao.gmane.io" Cc: michael.albinus@gmx.de, larsi@gnus.org, stefan@marxist.se, 21440@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 12 14:01:23 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m2ucl-0009oa-3i for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 12 Jul 2021 14:01:23 +0200 Original-Received: from localhost ([::1]:56696 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2uck-0004YM-4M for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 12 Jul 2021 08:01:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58708) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2ubT-0003Z6-MD for bug-gnu-emacs@gnu.org; Mon, 12 Jul 2021 08:00:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53340) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m2ubT-0001Mv-9F for bug-gnu-emacs@gnu.org; Mon, 12 Jul 2021 08:00:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m2ubS-0006n2-St for bug-gnu-emacs@gnu.org; Mon, 12 Jul 2021 08:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Jul 2021 12:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21440 X-GNU-PR-Package: emacs Original-Received: via spool by 21440-submit@debbugs.gnu.org id=B21440.162609120026061 (code B ref 21440); Mon, 12 Jul 2021 12:00:02 +0000 Original-Received: (at 21440) by debbugs.gnu.org; 12 Jul 2021 12:00:00 +0000 Original-Received: from localhost ([127.0.0.1]:36653 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2ubP-0006mH-Ok for submit@debbugs.gnu.org; Mon, 12 Jul 2021 08:00:00 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:60658) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2ubO-0006m5-CP for 21440@debbugs.gnu.org; Mon, 12 Jul 2021 07:59:59 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48176) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2ubI-0001CT-I8; Mon, 12 Jul 2021 07:59:52 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1031 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2ubI-0004mi-5I; Mon, 12 Jul 2021 07:59:52 -0400 In-Reply-To: <87bl78w5fh.fsf@web.de> (message from Michael Heerdegen on Mon, 12 Jul 2021 05:56:50 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:209813 Archived-At: > From: Michael Heerdegen > Date: Mon, 12 Jul 2021 05:56:50 +0200 > Cc: Michael Albinus , 21440@debbugs.gnu.org, > Stefan Kangas > > Lars Ingebrigtsen writes: > > > But I don't know whether -unload-function has the same problems that > > -unload-hook had? > > At least now (docstring of `unload-feature'): > > | If a function `FEATURE-unload-function' is defined, this function > | calls it with no arguments, before doing anything else. That function > | can do whatever is appropriate to undo the loading of the library. If > | `FEATURE-unload-function' returns non-nil, that suppresses the > | standard unloading of the library. Otherwise the standard unloading > | proceeds. > > So it can now be controlled whether standard unloading stuff will still > be performed (last problem mentioned in my report -> solved). > > This questionable paragraph is sill in the manual however: > > • If loading the file adds functions to hooks, define a function > ‘FEATURE-unload-function’, where FEATURE is the name of the feature > the package provides, and make it undo any such changes. Using > ‘unload-feature’ to unload the file will run this function. *Note > Unloading::. > > I guess it is a bit outdated and this had been automated long ago, > although partially heuristically. I don't understand why you say this is outdated. What did I miss? > Instead it could say what typical non-standard changes need to be > handled in an unload-function. Isn't that what it says?