From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#34686: 26.1; unload-feature doesn't remove functions locally from hooks Date: Thu, 28 Feb 2019 20:38:11 +0100 Message-ID: References: <11240364.O9o76ZdvQC@gabor> <83ef7rkcy8.fsf@gnu.org> <1551386357.RvjfsdQ5jE@gabor> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="175672"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 34686@debbugs.gnu.org To: Braun =?UTF-8?Q?G=C3=A1bor?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 28 20:39:14 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gzRWT-000jcU-Pz for geb-bug-gnu-emacs@m.gmane.org; Thu, 28 Feb 2019 20:39:13 +0100 Original-Received: from localhost ([127.0.0.1]:45547 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzRWS-0008Ce-Sm for geb-bug-gnu-emacs@m.gmane.org; Thu, 28 Feb 2019 14:39:12 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzRWJ-0008CV-F0 for bug-gnu-emacs@gnu.org; Thu, 28 Feb 2019 14:39:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gzRWI-0002Ef-MY for bug-gnu-emacs@gnu.org; Thu, 28 Feb 2019 14:39:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41995) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gzRWI-0002Eb-CA for bug-gnu-emacs@gnu.org; Thu, 28 Feb 2019 14:39:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gzRWI-0006fy-5d for bug-gnu-emacs@gnu.org; Thu, 28 Feb 2019 14:39:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Feb 2019 19:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34686 X-GNU-PR-Package: emacs Original-Received: via spool by 34686-submit@debbugs.gnu.org id=B34686.155138270325607 (code B ref 34686); Thu, 28 Feb 2019 19:39:02 +0000 Original-Received: (at 34686) by debbugs.gnu.org; 28 Feb 2019 19:38:23 +0000 Original-Received: from localhost ([127.0.0.1]:55539 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gzRVe-0006ex-Vt for submit@debbugs.gnu.org; Thu, 28 Feb 2019 14:38:23 -0500 Original-Received: from mail-wr1-f54.google.com ([209.85.221.54]:35204) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gzRVb-0006eh-U8 for 34686@debbugs.gnu.org; Thu, 28 Feb 2019 14:38:21 -0500 Original-Received: by mail-wr1-f54.google.com with SMTP id t18so23308674wrx.2 for <34686@debbugs.gnu.org>; Thu, 28 Feb 2019 11:38:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:cc:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=QQ8oP0Y59M76tEcvCxxqxxRnEdIWA4m6EI8y8ogSVvo=; b=HJPnNKUQf0bycS5VQFpG9elqUQIOLCqT5V6vCyKkUOIJ1ksR9F6sQWzDNJ85RjBLJe kaR5l9Os7TylLoEAzGt/j9AV5ZBaDwhaj3j4JzdyJXEeNO0m8fYelabDOqcL9SO1vudH Ow8LuuCgD5J/OwLn9MBE2iwI/CRBR7uDBDfSDAJmPMK93/TaU/N19kAXTF74fVvwr5za qIieNVLfYbjeG2Y5QdegKQE6Pq4eudwdr0bvAZMAFoR6pi90AiIYWhr3cKFVjjNZaRzQ 3wMAj/xsxUKxnijZBQFVxusSuidTJbJdLA9VbZ91mT1j6sFEiKlUvu2MU3hEIrmx7FJU a4Sw== 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:references:cc:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=QQ8oP0Y59M76tEcvCxxqxxRnEdIWA4m6EI8y8ogSVvo=; b=Pq39XXlJZxIvlEpkShmZ+NUxmRqZ0FlXXettAtGLPZIxOpdQZ5ggwMXFHHnllNpwc4 nlbokbyPktdJWUNC3ADqcMd+MvrQiUfoGJ/pYpo1cWUq/iPxd2GhAt7PL2WInAixqpNl 63E2zOsAkSGwsdXjDQHA3fdEgd74cvGBLY6pBXVPATrjdwK9roFwY9gG8Dzpoh8agVED MWqWsv86GdcK2183mprR4gEanWvhlVKBGd7oGD6gU9p3YqI1UCvfuSyQB40wuXI71u0I mKy+7PBiGn8Ubyz6Mz8td0q6fciCFoXCyxMNvl7fqlfcDRLfBYYyZZ0db4T3hc3jtCuL hIsA== X-Gm-Message-State: APjAAAUo0EzPuwM6EyfJ5ZKGfN/9TUTQMwVf820Au+IOvpaJT8V/W3PX J317nQUNBNtmOtCR4uRUBv1MVRGimvk= X-Google-Smtp-Source: APXvYqxymLAzycULv//zv2wzLFs+DfWpUCoTUG3JWRp6ntSTtACp74dgmARN22GAr/GzZAGh8eFNXg== X-Received: by 2002:adf:f845:: with SMTP id d5mr764937wrq.113.1551382693621; Thu, 28 Feb 2019 11:38:13 -0800 (PST) Original-Received: from rpluim-mac ([2a01:e34:ecfc:a860:c3a:aa7:7f6a:ec3a]) by smtp.gmail.com with ESMTPSA id o12sm48183111wre.0.2019.02.28.11.38.12 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 28 Feb 2019 11:38:12 -0800 (PST) In-Reply-To: <1551386357.RvjfsdQ5jE@gabor> ("Braun \=\?utf-8\?Q\?G\=C3\=A1bor\=22\?\= \=\?utf-8\?Q\?'s\?\= message of "Thu, 28 Feb 2019 20:31:20 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:155906 Archived-At: (please don=CA=BCt drop the bug address from the CC) Braun G=C3=A1bor writes: > Hi, > >> > Standard unloading activities include restoring old autoloads for >> > functions defined by the library, undoing any additions that the >> > library has made to hook variables or to =E2=80=98auto-mode-alist=E2= =80=99[...] > > Obviously, this part of the docstring of unload-feature contradicts > the info manual. >=20=20 >> In "(elisp) Unloading" it says: >>=20 >> Before restoring the previous definitions, =E2=80=98unload-feature= =E2=80=99 runs >> =E2=80=98remove-hook=E2=80=99 to remove functions in the library fr= om certain >> hooks. These hooks include variables whose names end in =E2=80=98-= hook=E2=80=99 >> (or the deprecated suffix =E2=80=98-hooks=E2=80=99), plus those lis= ted in >> =E2=80=98unload-feature-special-hooks=E2=80=99, as well as =E2=80= =98auto-mode-alist=E2=80=99. This >> is to prevent Emacs from ceasing to function because important >> hooks refer to functions that are no longer defined. >>=20 >> and a quick look at the code confirms that it at least *tries* to do >> that. > > And as far as I understand the code, it does remove functions from the=20 > global value of the hooks, but not from the buffer-local values. > > IMHO, the stated reason in the info manual (keep Emacs functioning)=20 > justifies removing functions from the hooks (both their global and local= =20 > values) which become undefined. Yes, I=CA=BCd tend to agree. Would you have a patch to offer? Thanks Robert