From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#5293: 23.1; unload-feature on buffer-local hooks Date: Mon, 6 Apr 2020 22:39:50 +0200 Message-ID: References: <87hbr4p67t.fsf@blah.blah> <871uxsl778.fsf@blah.blah> <87aabnnxna.fsf@blah.blah> <87zhbojzmv.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000deff9405a2a54633" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="107783"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Kevin Ryde , Stefan Monnier , 5293@debbugs.gnu.org To: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 06 22:41:25 2020 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 1jLYYd-000Rxk-Ol for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 Apr 2020 22:41:23 +0200 Original-Received: from localhost ([::1]:37936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLYYc-0000P8-Q5 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 Apr 2020 16:41:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60967) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLYYM-0000Ni-FA for bug-gnu-emacs@gnu.org; Mon, 06 Apr 2020 16:41:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLYYJ-0006RS-Kh for bug-gnu-emacs@gnu.org; Mon, 06 Apr 2020 16:41:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37717) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jLYYI-0006Qd-ER for bug-gnu-emacs@gnu.org; Mon, 06 Apr 2020 16:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jLYYI-0003zi-B0 for bug-gnu-emacs@gnu.org; Mon, 06 Apr 2020 16:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juanma Barranquero Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Apr 2020 20:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5293 X-GNU-PR-Package: emacs Original-Received: via spool by 5293-submit@debbugs.gnu.org id=B5293.158620563315252 (code B ref 5293); Mon, 06 Apr 2020 20:41:02 +0000 Original-Received: (at 5293) by debbugs.gnu.org; 6 Apr 2020 20:40:33 +0000 Original-Received: from localhost ([127.0.0.1]:49263 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jLYXo-0003xw-RI for submit@debbugs.gnu.org; Mon, 06 Apr 2020 16:40:33 -0400 Original-Received: from mail-qv1-f51.google.com ([209.85.219.51]:42298) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jLYXn-0003xT-GG for 5293@debbugs.gnu.org; Mon, 06 Apr 2020 16:40:32 -0400 Original-Received: by mail-qv1-f51.google.com with SMTP id ca9so717239qvb.9 for <5293@debbugs.gnu.org>; Mon, 06 Apr 2020 13:40:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LmUUPcYIXet0GmYzbA7gRXKzWub7J/JjbW7N0NAhstc=; b=a1yilRfV/KPjIpTaywJaowt60xzTfv8i1kkoW644xyy1vRllMjxTu/G0Rbm2FU3yCg PtOkSlGxYWQ+90+TxqEmyB3R4R0PWnOSmjyn3Q6FdQJy3d2FmiLRWfCKBrRShN4AAIjQ Xe/7HxBbRHcpUN99Avz+s3DOSqTd/GCXpjSGCmoQ3DKMJVq5hZa5Ubr8Oq3Cy6gLU+6X EgdaDCCDVyQxbb+RHdEMq5+zRyh++hRtGLozXYLqNhnzPpoDvQOuKA6UHauBjKRdMwn3 qkXr9EddjKHNOwP6kUYwG3F6LgU9VRMc9dwnsMI/XNjcb5+cADRLz9k0xia3A5MRszK/ +0NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LmUUPcYIXet0GmYzbA7gRXKzWub7J/JjbW7N0NAhstc=; b=XMoS8jFHOm6TdZpyxVjfiYU/A4pZZL2jOBPPnWGRIYqHaV5HV+MaK6u+HsQTDXKjVY V0SiaGPm6BmUS2+Vk9XGGNh9OpArBGFXFQYMj+pHimNJUByH/3AczKE6tNFlyLSmDPCh MzNDa/C91V5HOT7uMVPZt3EOTNJOPpxIRiSauMCm8rqc8PW5npDhPZc7tNWMvKRuDntO yQmNW3URBDscunch+p5N5GtSWBqcQsBVAmHHXOrSiga5pHi/gQWSZzLnaLUxmaYNDsfS TYuTxq0mecPuif78fyCKaTXYFX2rp3Tl2YlEFxrHtCT2o+O+mMa12BUmBDjq+Sx1wenU whfw== X-Gm-Message-State: AGi0Pubf1MOwDbFesZpn0HzAnBtugB+ryMEQrlruK7lLMr8wg+mh6XT1 +GL/E8VkrDPEY7t1bHUAqcpzfyncHATjDw4WRE0= X-Google-Smtp-Source: APiQypJgNc/1NcDzBBall9ciVOdzWvt9SHpfkYr3J0kn2nYU5LZr59OdE71cgd5iWBF66wg2NW/aM2cHVF8D96tNnIE= X-Received: by 2002:a05:6214:1449:: with SMTP id b9mr1669502qvy.217.1586205625870; Mon, 06 Apr 2020 13:40:25 -0700 (PDT) In-Reply-To: <87zhbojzmv.fsf@gmail.com> 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:178103 Archived-At: --000000000000deff9405a2a54633 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Apr 6, 2020 at 7:24 PM =C5=A0t=C4=9Bp=C3=A1n N=C4=9Bmec wrote: > Actually, I wonder if ignoring even the global hooks (as opined by > Juanma) and enforcing more widespread usage of FEATURE-unload-function > wouldn't be better; Anything automatically done in the unload-hook is just an ad hoc fix for things the module author knows how to do better than us. FEATURE-unload-function has already been there for a few years. I don't remember right now whether we suggest in the mode-creation documentation to use it, but certainly that's something module authors should do, and the automatic unloading is just a last-resort feature for those old modules that don't. There's no point IMHO to make the hands off approach work better. --000000000000deff9405a2a54633 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Apr 6, 2020 at 7:24 PM =C5=A0t=C4= =9Bp=C3=A1n N=C4=9Bmec <stepnem@gma= il.com> wrote:

> Actually= , I wonder if ignoring even the global hooks (as opined by
> Juanma) = and enforcing more widespread usage of FEATURE-unload-function
> woul= dn't be better;

Anything automatically done in the unload-hook is just an ad = hoc fix for things the
module author knows = how to do better than us. FEATURE-unload-function has already
been there for a few years. I don't remember right n= ow whether we suggest in the
mode-creation = documentation to use it, but certainly that's something module authors<= /div>
should do, and the automatic unloading is j= ust a last-resort feature for those old
mod= ules that don't. There's no point IMHO to make the hands off approa= ch work better.
=C2=A0
--000000000000deff9405a2a54633--