From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: Re: occur-mode-hook run too early to be useful Date: Wed, 28 Aug 2002 11:32:53 -0400 Sender: emacs-devel-admin@gnu.org Message-ID: <200208281532.g7SFWr404685@rum.cs.yale.edu> References: <20020828103157.9D0E.LEKTU@terra.es> <200208281430.g7SEU5Z04025@rum.cs.yale.edu> <20020828164804.A71C.LEKTU@terra.es> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1030548875 24827 127.0.0.1 (28 Aug 2002 15:34:35 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 28 Aug 2002 15:34:35 +0000 (UTC) Cc: Juanma Barranquero , "Stefan Monnier" , emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17k4py-0006S9-00 for ; Wed, 28 Aug 2002 17:34:30 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17k5Lp-0007OE-00 for ; Wed, 28 Aug 2002 18:07:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17k4rK-0002Ig-00; Wed, 28 Aug 2002 11:35:54 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17k4oY-00020h-00 for emacs-devel@gnu.org; Wed, 28 Aug 2002 11:33:02 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17k4oU-0001zz-00 for emacs-devel@gnu.org; Wed, 28 Aug 2002 11:33:01 -0400 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17k4oT-0001zC-00 for emacs-devel@gnu.org; Wed, 28 Aug 2002 11:32:57 -0400 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.11.6/8.11.6) id g7SFWr404685; Wed, 28 Aug 2002 11:32:53 -0400 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-15?q?Gro=DFjohann?=) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:7067 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:7067 > How about this: Rename occur-mode to occur-setup or occur-initialize > or occur-frobnicate, make a new function occur-mode which just sets up > keymaps and such stuff, call that function at the end of occur-1 and > run the hook from there. WDYT? That's pretty much already what happens except for the `call at the end' because occur sets up buffer-local variables which would be killed by the `kill-all-local-variables', so it needs to setup the mode first (or to mark them as temporary-local which might be the right thing to do anyway for all I know). Stefan