From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Davis Herring" Newsgroups: gmane.emacs.devel Subject: Re: unload-feature questions and thoughts Date: Wed, 10 Oct 2007 10:03:07 -0700 (PDT) Message-ID: <55463.128.165.123.18.1192035787.squirrel@webmail.lanl.gov> References: <851wl5d9b2.fsf@lola.goethe.zz> <86r6t5qdbo.fsf@lola.quinscape.zz> <861wl5q7al.fsf@lola.quinscape.zz> <54853.128.165.123.18.1192027947.squirrel@webmail.lanl.gov> Reply-To: herring@lanl.gov NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1192035819 1621 80.91.229.12 (10 Oct 2007 17:03:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 10 Oct 2007 17:03:39 +0000 (UTC) Cc: Emacs Devel To: "Juanma Barranquero" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 10 19:03:37 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Ifey5-0001Af-EY for ged-emacs-devel@m.gmane.org; Wed, 10 Oct 2007 19:03:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ifexz-0005B5-IB for ged-emacs-devel@m.gmane.org; Wed, 10 Oct 2007 13:03:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ifexv-00059z-FW for emacs-devel@gnu.org; Wed, 10 Oct 2007 13:03:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ifexu-00059m-Ik for emacs-devel@gnu.org; Wed, 10 Oct 2007 13:03:23 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ifexu-00059h-DH for emacs-devel@gnu.org; Wed, 10 Oct 2007 13:03:22 -0400 Original-Received: from mailwasher.lanl.gov ([204.121.3.2]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ifext-0001c6-MN for emacs-devel@gnu.org; Wed, 10 Oct 2007 13:03:22 -0400 Original-Received: from mailrelay2.lanl.gov (mailrelay2.lanl.gov [128.165.4.103]) by mailwasher.lanl.gov (8.13.8/8.13.8/(ccn-5)) with ESMTP id l9AH3AsR025406; Wed, 10 Oct 2007 11:03:10 -0600 Original-Received: from webmail1.lanl.gov (webmail1.lanl.gov [128.165.4.106]) by mailrelay2.lanl.gov (8.13.8/8.13.8/(ccn-5)) with ESMTP id l9AH37BP011776; Wed, 10 Oct 2007 11:03:07 -0600 Original-Received: from webmail1.lanl.gov (localhost.localdomain [127.0.0.1]) by webmail1.lanl.gov (8.12.11.20060308/8.12.11) with ESMTP id l9AH37gs002783; Wed, 10 Oct 2007 11:03:07 -0600 Original-Received: (from apache@localhost) by webmail1.lanl.gov (8.12.11.20060308/8.12.11/Submit) id l9AH37cR002779; Wed, 10 Oct 2007 10:03:07 -0700 X-Authentication-Warning: webmail1.lanl.gov: apache set sender to herring@lanl.gov using -f Original-Received: from 128.165.123.18 (SquirrelMail authenticated user 196434) by webmail.lanl.gov with HTTP; Wed, 10 Oct 2007 10:03:07 -0700 (PDT) In-Reply-To: User-Agent: SquirrelMail/1.4.8-6.el3.2lanl X-Priority: 3 (Normal) Importance: Normal X-CTN-5-MailScanner-Information: Please see http://network.lanl.gov/email/virus-scan.php X-CTN-5-MailScanner: Found to be clean X-CTN-5-MailScanner-From: herring@lanl.gov X-Detected-Kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:80522 Archived-At: > I interpret it as if "all the relevant global state changes" refers > not just to hooks and `auto-mode-alist' (which is not mentioned in the > docstring), but to all other things that `unload-feature' does, i.e.: > killing local values of variables, f?makeunbound'ing symbols, > restoring autoloads, etc. > > In other words, these sentences always make me think that either you > use `FEATURE-unload-hook' and do all the work, or you don't use it and > let `unload-feature' work its magic. Now, I *know* that's not what it > says; it's just what I read :( It seems to me that it is ambiguous, but that (as you said in your first message) the function does the wrong thing anyway. Perhaps, instead of defining a return value for the hook, we should always do the heuristics and have the FEATURE-unload-hook do only extra things, because I can't see how the heuristics would do too much. Moreover, the hook may modify `unload-hook-features-list', even to nil, if it really needs to override the heuristics. Of course, a new doc string that describes the final behavior should be written, but there's no point in writing two new ones. (The doc should probably list what the function does more explicitly, so that package authors can see whether they need to write a hook.) Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.