From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: unload-feature questions and thoughts Date: Mon, 05 Feb 2007 08:21:47 +0100 Message-ID: <86r6t5qdbo.fsf@lola.quinscape.zz> References: <85bqk9db9a.fsf@lola.goethe.zz> <851wl5d9b2.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1170660148 19407 80.91.229.12 (5 Feb 2007 07:22:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 5 Feb 2007 07:22:28 +0000 (UTC) Cc: Emacs Devel To: "Juanma Barranquero" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 05 08:22:20 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 1HDyB7-0006ur-QR for ged-emacs-devel@m.gmane.org; Mon, 05 Feb 2007 08:22:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HDyB7-0000m8-6f for ged-emacs-devel@m.gmane.org; Mon, 05 Feb 2007 02:22:17 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HDyAw-0000lm-0K for emacs-devel@gnu.org; Mon, 05 Feb 2007 02:22:06 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HDyAu-0000la-KO for emacs-devel@gnu.org; Mon, 05 Feb 2007 02:22:04 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HDyAu-0000lX-E1 for emacs-devel@gnu.org; Mon, 05 Feb 2007 02:22:04 -0500 Original-Received: from pc3.berlin.powerweb.de ([62.67.228.11]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HDyAt-0006sl-UW for emacs-devel@gnu.org; Mon, 05 Feb 2007 02:22:04 -0500 Original-Received: from quinscape.de (pd95b0fdb.dip0.t-ipconnect.de [217.91.15.219]) by pc3.berlin.powerweb.de (8.9.3p3/8.9.3) with ESMTP id IAA30059 for ; Mon, 5 Feb 2007 08:21:56 +0100 X-Delivered-To: Original-Received: (qmail 7430 invoked from network); 5 Feb 2007 07:22:00 -0000 Original-Received: from unknown (HELO lola.quinscape.zz) ([10.0.3.43]) (envelope-sender ) by ns.quinscape.de (qmail-ldap-1.03) with SMTP for ; 5 Feb 2007 07:22:00 -0000 Original-Received: by lola.quinscape.zz (Postfix, from userid 1001) id CF832C2ABC; Mon, 5 Feb 2007 08:21:47 +0100 (CET) In-Reply-To: (Juanma Barranquero's message of "Mon\, 5 Feb 2007 01\:10\:36 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:65888 Archived-At: "Juanma Barranquero" writes: > On 2/4/07, David Kastrup wrote: > >> It defines tex-site-unload-hook already. But "whatever is necessary" >> pretty much means restoring all functions overwritten by AUCTeX, and >> there is no point in not using the autoload unloader for that. > > In fact (and this is not a proposal, at least not now), the current > working of `unload-feature' is a bit puzzling. Instead of running > either `FEATURE-unload-hook' (if found) or its normal heuristics, it'd > be better if it ran a FEATURE-unload-function, which would return t to > stop, or nil to *also* use the function's current heuristics. That > way, a package could define a FEATURE-unload-function to undo unusual > things, and leave the burden of the unloading to `unload-feature'. You are confused. FEATURE-unload-hook only caters for removing FEATURE-related functions from hook variables (if FEATURE-unload-hook is not used, Emacs basically walks through all variables ending in "-hook" and removes variables from FEATURE from them). All the rest are unloaded as normal unless FEATURE-unload-hook removes the corresponding FEATURE from unload-hook-features-list. -- David Kastrup