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#5293: 23.1; unload-feature on buffer-local hooks Date: Fri, 15 Jul 2011 02:34:29 +0200 Message-ID: References: <87hbr4p67t.fsf@blah.blah> <871uxsl778.fsf@blah.blah> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1310690190 2547 80.91.229.12 (15 Jul 2011 00:36:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 15 Jul 2011 00:36:30 +0000 (UTC) Cc: 5293@debbugs.gnu.org To: Kevin Ryde Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 15 02:36:26 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QhWOH-0006je-E6 for geb-bug-gnu-emacs@m.gmane.org; Fri, 15 Jul 2011 02:36:25 +0200 Original-Received: from localhost ([::1]:41388 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QhWOG-0002Sy-DJ for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Jul 2011 20:36:24 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:53035) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QhWO0-0002Sj-0H for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2011 20:36:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QhWNv-0001Z1-Av for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2011 20:36:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43770) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QhWNv-0001Yw-83 for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2011 20:36:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QhWNu-0007DV-Bz; Thu, 14 Jul 2011 20:36:02 -0400 X-Loop: help-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: Fri, 15 Jul 2011 00:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5293 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 5293-submit@debbugs.gnu.org id=B5293.131069012027692 (code B ref 5293); Fri, 15 Jul 2011 00:36:02 +0000 Original-Received: (at 5293) by debbugs.gnu.org; 15 Jul 2011 00:35:20 +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 1QhWND-0007Cb-RZ for submit@debbugs.gnu.org; Thu, 14 Jul 2011 20:35:20 -0400 Original-Received: from mail-pv0-f172.google.com ([74.125.83.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QhWN8-0007CM-Us for 5293@debbugs.gnu.org; Thu, 14 Jul 2011 20:35:19 -0400 Original-Received: by pvh18 with SMTP id 18so752132pvh.3 for <5293@debbugs.gnu.org>; Thu, 14 Jul 2011 17:35:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=fQc/Rl7OiH4lDiw7QBdvaWpzXcktA/JtWZQ/MFCNMAM=; b=ZMtJSADUeRnIccZZP7BqqXrW1p4xJE699hOkZzy11nRjg5FIdS3TV6rq7+y7ZWwI0u jDMdbiktGyXOi+DLVTI4J0QJWzIin0IqlzBFMoPKMiY9Xg5P53UqLUC16PLNQNO/x2O9 +mfexAtFtZIJMBrde/Iw5JWDCptbuJ02AZ2Xc= Original-Received: by 10.142.120.1 with SMTP id s1mr1265372wfc.252.1310690109115; Thu, 14 Jul 2011 17:35:09 -0700 (PDT) Original-Received: by 10.142.144.4 with HTTP; Thu, 14 Jul 2011 17:34:29 -0700 (PDT) In-Reply-To: <871uxsl778.fsf@blah.blah> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 14 Jul 2011 20:36:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:49102 Archived-At: On Fri, Jul 15, 2011 at 02:26, Kevin Ryde wrote: > Or conversely, it's undesirable to leave behind an unbound func in a > hook, and the same undesirability as to a buffer-local value as a global > value. But the usual case is that these buffer-local values are set via major modes also defined in the same package, and so they are automatically removed when the major modes are disabled (i.e., when the buffers are switched to other major modes). The only case where a buffer-local value is left behind is when the package's code sets it in non-standard ways, and in this case, it's the package responsability to define a FEATURE-unload-function to undo the changes. The philosophy behind unload-feature is: we try to automatically undo the easy/standard things, and give the package the opportunity to undo the hard/unstandard things itself. And I think it's the right approach. =C2=A0 =C2=A0 Juanma