From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#21440: 25.0.50; Manual: FEATURE-unload-hook in (info "(elisp) Coding Conventions") Date: Mon, 12 Jul 2021 05:56:50 +0200 Message-ID: <87bl78w5fh.fsf@web.de> References: <87k2rzakd3.fsf@web.de> <871rk5le0t.fsf@gmx.de> <87r1g8syfe.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16430"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Michael Albinus , 21440@debbugs.gnu.org, Stefan Kangas To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 12 05:58:18 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 1m2n5F-00042w-Pc for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 12 Jul 2021 05:58:17 +0200 Original-Received: from localhost ([::1]:52294 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2n5E-0001sD-Ab for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 11 Jul 2021 23:58:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2n50-0001s4-MV for bug-gnu-emacs@gnu.org; Sun, 11 Jul 2021 23:58:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52874) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m2n50-0006ax-FG for bug-gnu-emacs@gnu.org; Sun, 11 Jul 2021 23:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m2n50-00015g-DM for bug-gnu-emacs@gnu.org; Sun, 11 Jul 2021 23:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Jul 2021 03:58: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.16260622244114 (code B ref 21440); Mon, 12 Jul 2021 03:58:02 +0000 Original-Received: (at 21440) by debbugs.gnu.org; 12 Jul 2021 03:57:04 +0000 Original-Received: from localhost ([127.0.0.1]:36187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2n43-00014I-Lg for submit@debbugs.gnu.org; Sun, 11 Jul 2021 23:57:03 -0400 Original-Received: from mout.web.de ([212.227.17.11]:43391) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2n3y-00013i-Di for 21440@debbugs.gnu.org; Sun, 11 Jul 2021 23:57:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1626062211; bh=cWKWAoABdxkn0MVaTF9AF12uOuBsxTWvkbcE5pZXhpA=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=pfSVa3qGvokEGrphq5KTCS1uuGW9Qfe30P99Yvf8ou5FOJC1bfNPCPaPjoW95hDs9 DKYCenmACUkzEDokqGzyFzCPRfXp8DuXkVE+MDjLabAFmjL0K2LndwUMnPga+Z4JRR PWz+9sjBpai1viA1Nj5Pz8kE58xJkPZNtAN7lmQo= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Original-Received: from drachen.dragon ([88.66.201.45]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MPpE6-1m6coj1rPu-004xCn; Mon, 12 Jul 2021 05:56:51 +0200 In-Reply-To: <87r1g8syfe.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 08 Jul 2021 15:55:01 +0200") X-Provags-ID: V03:K1:qrSiQby1wqXcy4Z1wn0ICqkS2uWsAhEMhdWl713ynPai9Y3mm8o sWKtgNByeJ7kVywYoCOyMZe3YQP/XC1BK/ewh4zswhmEIiljkSN/fJN/Dr6Ym3gGbaLS4Lg z2mFC+UutPZ1lazslJo+QQQqWZ/Oz2eG/ShpWLgX528agyUFa7BOmA4PGhto5XGr0HmNiIJ sMUXLShPRqKA1zi633plg== X-UI-Out-Filterresults: notjunk:1;V03:K0:9kAxKS/AiiY=:H+Bs8iy8S/pI40DGchRhJR 8QjHqJYeoBAffQC5UNDrYANJHSX7FQXQpUxBw3CgiCB80i9GLfIhUOnssxpN/T2JlQ4oBNdRn QOpJjuuDhw3sj7oWml2L17fay4SThgpScYLZ5QIuAeOJ94pgpUEo1FoOhoNmwM8Sv6pXKdXlr mtz2FBE0gpb3tr4VYGCwnNqDNPzGe/L9FkrrK8zZpPhmokPpJKRjt5gbLhUn8eHhvksgB/BJK DBlTQEUISU9VfVH6EWQMD7WNFhPDFcW29FstVHPgVTM4M9m2bfYqoe2/uKykPwYizcjokR2XQ uAyKbk84L3ZZcOA4yhr+WoP7T0mfpR27VE5KR/TmU/GtggGxdlAgLB51+jJsRWrJyxUnmYSts X1iqLY6wdW6ebbBqTurEFDgxUCfO27vvQL2dQcCPNitDRpY5JdnHGTIdLlPWqC5B4KnAXXq8v TVyXKQ/8MFMZrXssRmgYpchVZQJY5DzKpeYVRuXkqZNpJ5XpWAOYQLBQYuLV9pP76owf/N364 3Lhdq+DF2e+xcJFxwmYhoVysx8athcQNApLJFy5vOKM8OaFztQLZbPxFBSDuHNswkJrI9hFNV SarfDLsteAtra+8vs1Awe/+qHiCeaf0kh7JA4bpD8pOxHNiZhDBfPwtNX03OBOA/9CoX7JmRA Qaob4+OZDkXBae3W5ZG9b9eeUCEojCdO+xYiMOG2hEbAUB3cg/bxiMYTnjeWVG9PxI1VsFVys 40/Op3x3c/x9FVJzwragHLySo6PusiuPWcMfhR+4+1b0aRT78ufFOxPoIbYjIakQ6GhQb8Ra 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:209811 Archived-At: 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: =E2=80=A2 If loading the file adds functions to hooks, define a function =E2=80=98FEATURE-unload-function=E2=80=99, where FEATURE is the name o= f the feature the package provides, and make it undo any such changes. Using =E2=80=98unload-feature=E2=80=99 to unload the file will run this func= tion. *Note Unloading::. I guess it is a bit outdated and this had been automated long ago, although partially heuristically. Instead it could say what typical non-standard changes need to be handled in an unload-function. It is unrealistic that every author cares about implementing a non-heuristic version of the automatic unloading code. Or, say shortly what unloading actually already does of its own, and that the library developer should care about the rest. Thanks, Michael.