From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: isearch hooks Date: Tue, 29 Jun 2004 04:17:38 +0300 Organization: JURTA Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87k6xrnm2p.fsf@mail.jurta.org> References: <20040528.181649.25475113.wl@gnu.org> <200405291737.i4THbPJ06689@raven.dms.auburn.edu> <878yeyczec.fsf@mail.jurta.org> <87n03aa4jk.fsf@mail.jurta.org> <87d63wy6ux.fsf_-_@mail.jurta.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1088475755 32342 80.91.224.253 (29 Jun 2004 02:22:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 29 Jun 2004 02:22:35 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Jun 29 04:22:26 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Bf8GQ-0004py-00 for ; Tue, 29 Jun 2004 04:22:26 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1Bf8GP-0000Vy-00 for ; Tue, 29 Jun 2004 04:22:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bf8I2-0002ch-HJ for emacs-devel@quimby.gnus.org; Mon, 28 Jun 2004 22:24:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Bf8Hn-0002Wa-PG for emacs-devel@gnu.org; Mon, 28 Jun 2004 22:23:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Bf8Hl-0002Uj-V5 for emacs-devel@gnu.org; Mon, 28 Jun 2004 22:23:51 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bf8Hl-0002UB-Qe for emacs-devel@gnu.org; Mon, 28 Jun 2004 22:23:49 -0400 Original-Received: from [66.33.205.9] (helo=spatula.dreamhost.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Bf8Fx-0006EP-4K; Mon, 28 Jun 2004 22:21:57 -0400 Original-Received: from mail.jurta.org (80-235-38-110-dsl.mus.estpak.ee [80.235.38.110]) by spatula.dreamhost.com (Postfix) with ESMTP id 2570017D023; Mon, 28 Jun 2004 19:21:53 -0700 (PDT) Original-To: Stefan In-Reply-To: (Stefan's message of "28 Jun 2004 20:25:25 -0400") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:25301 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:25301 Stefan writes: >> + (if isearch-wrapped-hook >> + (run-hooks 'isearch-wrapped-hook) >> + (goto-char (if isearch-forward (point-min) (point-max)))) > > If the hook was made buffer local it might be non-nil and yet empty. > So the test for nil-ness of isearch-wrapped-hook is wrong. In the latest version posted 2004-06-25 I changed this into funcall: - (goto-char (if isearch-forward (point-min) (point-max))) + (if isearch-wrap-function + (funcall isearch-wrap-function) + (goto-char (if isearch-forward (point-min) (point-max)))) So in this case there is no problem with buffer local hooks. -- Juri Linkov http://www.jurta.org/emacs/