From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-15?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.devel Subject: Re: occur-mode-hook run too early to be useful Date: Wed, 28 Aug 2002 17:29:24 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: 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 1030548597 19390 127.0.0.1 (28 Aug 2002 15:29:57 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 28 Aug 2002 15:29:57 +0000 (UTC) Cc: "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 17k4lV-00052R-00 for ; Wed, 28 Aug 2002 17:29:53 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17k5HL-0007Lw-00 for ; Wed, 28 Aug 2002 18:02:47 +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 17k4mr-0001Y7-00; Wed, 28 Aug 2002 11:31:17 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17k4lH-0001Pe-00 for emacs-devel@gnu.org; Wed, 28 Aug 2002 11:29:39 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17k4lE-0001Ox-00 for emacs-devel@gnu.org; Wed, 28 Aug 2002 11:29:38 -0400 Original-Received: from waldorf.cs.uni-dortmund.de ([129.217.4.42]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17k4lD-0001Og-00 for emacs-devel@gnu.org; Wed, 28 Aug 2002 11:29:35 -0400 Original-Received: from lothlorien.cs.uni-dortmund.de (lothlorien [129.217.19.67]) by waldorf.cs.uni-dortmund.de with ESMTP id g7SFTUb07535; Wed, 28 Aug 2002 17:29:30 +0200 (MES) Original-Received: from lucy.cs.uni-dortmund.de (lucy [129.217.19.80]) by lothlorien.cs.uni-dortmund.de id RAA19495; Wed, 28 Aug 2002 17:29:24 +0200 (MET DST) Original-Received: by lucy.cs.uni-dortmund.de (Postfix, from userid 6104) id 77C423B24C; Wed, 28 Aug 2002 17:29:24 +0200 (CEST) Original-To: Juanma Barranquero In-Reply-To: <20020828164804.A71C.LEKTU@terra.es> (Juanma Barranquero's message of "Wed, 28 Aug 2002 17:06:20 +0200") Original-Lines: 23 User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu) 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:7065 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:7065 Juanma Barranquero writes: > But in this case things aren't that clear, as the distinction between > code in occur-mode and code in occur-1 seems rather arbitrary: > > 1. occur-mode is only called from occur-1 > 2. occur-mode is called unconditionally > 3. occur-1 is the engine to all the interactive occur functions > 4. M-x occur-mode in a non-occur buffer is meaningless > 5. occur-mode-hook now serves almost no practical purpose How about making the distinction less arbitrary? 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? Caveat: I haven't even looked at the code! kai -- A large number of young women don't trust men with beards. (BFBS Radio)