From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#5294: 23.1; unload-feature disable minor-mode Date: Sun, 3 Jan 2010 01:24:58 +0100 Message-ID: References: <87aawwp631.fsf@blah.blah> <87tyv4njo7.fsf@blah.blah> Reply-To: Juanma Barranquero , 5294@debbugs.gnu.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1262479758 20665 80.91.229.12 (3 Jan 2010 00:49:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 3 Jan 2010 00:49:18 +0000 (UTC) Cc: 5294@debbugs.gnu.org To: Kevin Ryde Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jan 03 01:49:10 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NREeb-0005VQ-HL for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Jan 2010 01:49:09 +0100 Original-Received: from localhost ([127.0.0.1]:45010 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NREeb-0005dp-Rg for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Jan 2010 19:49:09 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NREeX-0005d7-J2 for bug-gnu-emacs@gnu.org; Sat, 02 Jan 2010 19:49:05 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NREeN-0005c9-W0 for bug-gnu-emacs@gnu.org; Sat, 02 Jan 2010 19:49:05 -0500 Original-Received: from [199.232.76.173] (port=41538 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NREeN-0005c6-QW for bug-gnu-emacs@gnu.org; Sat, 02 Jan 2010 19:48:55 -0500 Original-Received: from [140.186.70.43] (port=40894 helo=debbugs.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NREeN-0001KU-BY for bug-gnu-emacs@gnu.org; Sat, 02 Jan 2010 19:48:55 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NREID-0000pY-QA; Sat, 02 Jan 2010 19:26:01 -0500 X-Loop: bug-gnu-emacs@gnu.org Mail-Followup-To: Juanma Barranquero , 5294@debbugs.gnu.org Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Jan 2010 00:26:01 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5294 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 5294-submit@debbugs.gnu.org id=B5294.12624783263182 (code B ref 5294); Sun, 03 Jan 2010 00:26:01 +0000 Original-Received: (at 5294) by debbugs.gnu.org; 3 Jan 2010 00:25:26 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NREHe-0000pH-8X for submit@debbugs.gnu.org; Sat, 02 Jan 2010 19:25:26 -0500 Original-Received: from mail-bw0-f216.google.com ([209.85.218.216]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NREHc-0000pC-A7 for 5294@debbugs.gnu.org; Sat, 02 Jan 2010 19:25:24 -0500 Original-Received: by bwz8 with SMTP id 8so9037964bwz.39 for <5294@debbugs.gnu.org>; Sat, 02 Jan 2010 16:25:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=tRwLWkJ7uc+Kh4upP+urnBFqBocQ8PloOaYsIM9jsRg=; b=hrv4lIMo627jHEGUVzsOXpAFjbWPrqQLzq2bLCV4qz0Jw9ec54BUsMJwSr2NaxVcY4 MZ4VpRZFTyaoZyBQqgfknKBdig4Dn5AYqxTyMtOZgO6dMqOuYX91EzDD+JojwW95DieM 5TkwSZUtNCEIC55G36BRcisYnvUBxBcx0Gwd8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=cM38ju+vZ23hEg7L4cyDlzVcoykZPP9q8cOYB1Hqupk0ZcjKw7Shsbz/sSgwnOCCbP n/VEFtrqx3TZSX70iJHD3u5QqqdEanVtRHWYXMBagTYlwcPUS7qtmlRv5aqvg611EC0M fRGbZa2hJuX9pwfetw/SIoxY24RFTAwB86AQg= Original-Received: by 10.204.0.69 with SMTP id 5mr8114867bka.173.1262478319845; Sat, 02 Jan 2010 16:25:19 -0800 (PST) In-Reply-To: <87tyv4njo7.fsf@blah.blah> X-Spam-Score: -2.7 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list X-Spam-Score: -2.7 (--) Resent-Date: Sat, 02 Jan 2010 19:26:01 -0500 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:33883 Archived-At: On Sun, Jan 3, 2010 at 00:58, Kevin Ryde wrote: > It seems unlikely a minor mode can do anything much good when its > functions have been unloaded. =C2=A0Some "static" effects might be ok, That is the point. The writer of the mode knows better. I'm not saying that you're not right in this, only that there could be downsides. >> FOO-unload-hook is > > ... a flexible way for unrelated libraries, macros or bits of code to > undo things they know about, even different conditionalized parts of one > .el like in tramp-util.el. Yeah, well, that and also, it never really worked. You seem to think that FOO-unload-hook is a hook run while executing `unload-feature'. In fact, is a hook run *instead* of some other code. The very act of defining FOO-unload-hook has unexpected consequences: `unlead-feature' won't remove FOO functions from hooks, nor from `auto-mode-alist'. And it was always so; that's why I pushed for introducing FOO-unload-function. > A kind of inverse to eval-after-load, > difficult to arrange on a monolithic unload func. In general, a package is the place where the knowledge about its unloading should be concentrated, IMO. If you want to piggyback onto it, there are several ways, like advising FOO-unload-function, if it is defined, or `unload-feature', etc. There's nothing "difficult to arrange". If you want to have an inverse to eval-after-load, I'd suggest you propose a new hook, unload-feature-functions (not FOO-specific). Juanma