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: Thu, 11 Oct 2007 09:41:21 -0700 (PDT) Message-ID: <58956.128.165.123.18.1192120881.squirrel@webmail.lanl.gov> References: <86r6t5qdbo.fsf@lola.quinscape.zz> <861wl5q7al.fsf@lola.quinscape.zz> <54853.128.165.123.18.1192027947.squirrel@webmail.lanl.gov> <55463.128.165.123.18.1192035787.squirrel@webmail.lanl.gov> <55585.128.165.123.18.1192038971.squirrel@webmail.lanl.gov> <858x6atas5.fsf@lola.goethe.zz> 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 1192120909 10006 80.91.229.12 (11 Oct 2007 16:41:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 11 Oct 2007 16:41:49 +0000 (UTC) Cc: Juanma Barranquero , Emacs Devel To: "David Kastrup" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 11 18:41:46 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 1Ig16Y-00030M-Bk for ged-emacs-devel@m.gmane.org; Thu, 11 Oct 2007 18:41:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ig16S-0003uu-Bf for ged-emacs-devel@m.gmane.org; Thu, 11 Oct 2007 12:41:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ig16O-0003tO-4P for emacs-devel@gnu.org; Thu, 11 Oct 2007 12:41:36 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ig16L-0003sY-FM for emacs-devel@gnu.org; Thu, 11 Oct 2007 12:41:35 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ig16L-0003sV-Av for emacs-devel@gnu.org; Thu, 11 Oct 2007 12:41:33 -0400 Original-Received: from mailwasher.lanl.gov ([204.121.3.2]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ig16F-0007Nx-Lt; Thu, 11 Oct 2007 12:41:27 -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 l9BGfOeh021113; Thu, 11 Oct 2007 10:41:24 -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 l9BGfLnt026762; Thu, 11 Oct 2007 10:41:21 -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 l9BGfLgr016823; Thu, 11 Oct 2007 10:41:21 -0600 Original-Received: (from apache@localhost) by webmail1.lanl.gov (8.12.11.20060308/8.12.11/Submit) id l9BGfLZa016821; Thu, 11 Oct 2007 09:41:21 -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; Thu, 11 Oct 2007 09:41:21 -0700 (PDT) In-Reply-To: <858x6atas5.fsf@lola.goethe.zz> 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: by monty-python.gnu.org: 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:80632 Archived-At: >> So I think that the evidence is for the intuitively obvious >> statement that no one knows how to use the hook. I found no >> examples where the normal heuristics would break anything, although >> neither did I find any examples where the unload-hook actually broke >> things by suppressing the "normal heuristics". So I think treating >> it as a bug is probably the right thing to do for simplicity: just >> do the heuristics regardless, and let the rare hooks that really >> need to suppress them kill the variable bound for that purpose. > > Have you checked AUCTeX's loadup/startup sequence? It uses the unload > hooks in order to offer a way of selectively disabling autoloaded > parts. While the "no one knows" is somewhat accurate (it was a > combination of reverse engineering and trial and error to make me > understand the implications), it is likely not true that nothing will > break by changes in that area where external packages are concerned. First, a correction to my message and in particular the summary you quoted: delsel.el did break things with its unload-hook, since (at least in the current buffer) it would otherwise have had its pre-command-hook entry removed, but as it stands that will just error out immediately after the unload. (From this I note that buffers should be swept for local hook values as well as local variable values.) Second, I just looked at the one "unload-hook" I found (in tex-site.el.in), and it seems to just be manipulating `after-load-alist' (though it forgets to setq it at the end) and `load-path'. So it too would benefit from having the normal heuristics applied (in case the user put random AUCTeX functions on hooks). Am I missing something? 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.