From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Juanma Barranquero" Newsgroups: gmane.emacs.devel Subject: Re: unload-feature questions and thoughts Date: Wed, 10 Oct 2007 18:08:59 +0200 Message-ID: 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> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1192032779 22531 80.91.229.12 (10 Oct 2007 16:12:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 10 Oct 2007 16:12:59 +0000 (UTC) Cc: Emacs Devel To: herring@lanl.gov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 10 18:12:55 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 1IfeAv-0006QQ-98 for ged-emacs-devel@m.gmane.org; Wed, 10 Oct 2007 18:12:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IfeAo-0005ye-Rb for ged-emacs-devel@m.gmane.org; Wed, 10 Oct 2007 12:12:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ife7L-0003Xh-II for emacs-devel@gnu.org; Wed, 10 Oct 2007 12:09:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ife7J-0003WU-GK for emacs-devel@gnu.org; Wed, 10 Oct 2007 12:09:02 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ife7J-0003WM-5C for emacs-devel@gnu.org; Wed, 10 Oct 2007 12:09:01 -0400 Original-Received: from wx-out-0506.google.com ([66.249.82.239]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ife7I-0003Nz-SK for emacs-devel@gnu.org; Wed, 10 Oct 2007 12:09:00 -0400 Original-Received: by wx-out-0506.google.com with SMTP id s7so228790wxc for ; Wed, 10 Oct 2007 09:09:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=9RjyBDId53t3xMtvBnDC9MbzZ8bfS2bt1rTLIwUCTUo=; b=R05LlAUXTN0J5aezlep3LeFJrVwPag3VbAuVyXSJnhDDuG3cUhHZkkXiU9F34lR2t37rMmquYjjsDmZuJxq/xv1k5dgXbGg4eFI3WGDTPYdZw0hqvdTLj5vX4pHHVZwrz2u+anMEHpqDiU2tl99ZRnbIavD7TT7i/HxCz8Hpf7Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Bs3dNgzGAY1CtiCSa6zTU2+JLR5ylykJcKbIiSWnoZc6/ovPz5URo/ykWGVZkuRp0sXToWPECljFpo1MP2s02xpoUpcRhMbyYnzaw7iQMQX1bV/l15OFCvSD5w2q4xgyWB+qyAcnAe87lXIj0tHroO5tcdnhDiO28BKgzul74FI= Original-Received: by 10.90.29.18 with SMTP id c18mr1406040agc.1192032539690; Wed, 10 Oct 2007 09:08:59 -0700 (PDT) Original-Received: by 10.90.103.8 with HTTP; Wed, 10 Oct 2007 09:08:59 -0700 (PDT) In-Reply-To: <54853.128.165.123.18.1192027947.squirrel@webmail.lanl.gov> Content-Disposition: inline X-Detected-Kernel: Linux 2.6 (newer, 2) 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:80520 Archived-At: On 10/10/07, Davis Herring wrote: > I'm glad to contribute a native speaker's touch, but I'm afraid that I > don't see what's wrong with it. Looking at the code, it does seem that it > invokes that hook ("fortran-unload-hook" for (unload-feature 'fortran)) if > it exists, or else goes hunting for non-autoloaded functions defined by > the package that are on -hook/etc. variables or on `auto-mode-alist'. Am > I misreading the same way that you have done? Apparently, you're not misreading the docstring. Each time I read this bit: Packages may define a hook FEATURE-unload-hook that is called instead of the normal heuristics for doing this. Such a hook should undo all the relevant global state changes that may have been made by loading the package or executing functions in it. 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 :( In the previous discussion, David Kastrup said: I seem to remember that I actually had to read the code before getting the right idea about what FEATURE-unload-hook does. and afterwards: Maybe "the normal heuristics" and "all the relevant global state changes" are far too much hand-waving: readers will probably phantasize whatever they would think useful into it. I think these quotes summarize the problem nicely. Juanma