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: Changing occur-hook to occur-functions Date: Tue, 5 Jul 2005 00:39:33 +0200 Message-ID: References: Reply-To: Juanma Barranquero NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1120517923 25666 80.91.229.2 (4 Jul 2005 22:58:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 4 Jul 2005 22:58:43 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 05 00:58:41 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DpZtI-0006z3-Lq for ged-emacs-devel@m.gmane.org; Tue, 05 Jul 2005 00:58:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DpZuW-0004XU-9F for ged-emacs-devel@m.gmane.org; Mon, 04 Jul 2005 18:59:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DpZst-00042E-48 for emacs-devel@gnu.org; Mon, 04 Jul 2005 18:57:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DpZsm-0003yh-OG for emacs-devel@gnu.org; Mon, 04 Jul 2005 18:57:46 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DpZsm-0003pY-HQ for emacs-devel@gnu.org; Mon, 04 Jul 2005 18:57:44 -0400 Original-Received: from [64.233.182.198] (helo=nproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DpZh5-0005tn-Aa for emacs-devel@gnu.org; Mon, 04 Jul 2005 18:45:39 -0400 Original-Received: by nproxy.gmail.com with SMTP id i2so186068nfe for ; Mon, 04 Jul 2005 15:39:33 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=qV1jmaK2JwxhXNYdl/gFGNpkzeVrzFChslJnb8gUzyf5gHyZWBoHIPWOzd/cX2s+WyOKhxebbPKyHHNoP5Pnem8iZF/J5h8Mq2bQvOnOubBdkfWq3s84yb3EmNNATSES4a6wePEhZPUezjIWoDk7f5HjsuBl6/AaL0y952mwyRI= Original-Received: by 10.48.4.10 with SMTP id 10mr127267nfd; Mon, 04 Jul 2005 15:39:33 -0700 (PDT) Original-Received: by 10.48.250.5 with HTTP; Mon, 4 Jul 2005 15:39:33 -0700 (PDT) Original-To: rms@gnu.org In-Reply-To: Content-Disposition: inline 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:40371 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:40371 > The change you intend seems to be that occur-rename-buffer will always > generate a unique name, when called interactively. Just the opposite. The function is designed to be executed interactively (it is bound to a key in the occur map), and I don't want to change its behavior. But its docstring suggests adding it to `occur-mode-hook', which is a reasonable thing to do if you always want a new name. In order for this to work, *without* changing its current behavior, I want to add an INTERACTIVE-P argument, as recommended in the docstring of `interactive-p', so I can detect that it is being executed directly with no arguments and no as an interactive call without arguments. That way, (add-hook 'occur-mode-hook 'occur-rename-bufferf) works, and so the user can simply add `occur-rename-buffer' to `occur-mode-hook' via the customize interface... --=20 /L/e/k/t/u