From xemacs-m  Tue Sep 23 07:07:30 1997
Received: from frege.math.ethz.ch (root@frege-d-math-north-g-west.math.ethz.ch [129.132.145.3])
	by xemacs.org (8.8.5/8.8.5) with SMTP id HAA20872
	for <xemacs-beta@xemacs.org>; Tue, 23 Sep 1997 07:07:29 -0500 (CDT)
Received: from midget (vroonhof@midget [129.132.145.4]) by frege.math.ethz.ch (8.6.12/Main-STAT-mailer) with ESMTP id OAA14055 for <xemacs-beta@xemacs.org>; Tue, 23 Sep 1997 14:07:17 +0200
Received: (vroonhof@localhost) by midget (SMI-8.6/D-MATH-client) id OAA16042; Tue, 23 Sep 1997 14:07:16 +0200
To: xemacs-beta@xemacs.org
Subject: Re: [patch] lazy-shot.el
References: <ocrzpp5p1c5.fsf@ml.com>
Mime-Version: 1.0 (generated by tm-edit 7.106)
Content-Type: text/plain; charset=US-ASCII
From: Jan Vroonhof <vroonhof@math.ethz.ch>
Date: 23 Sep 1997 14:07:16 +0200
In-Reply-To: Colin Rafferty's message of 22 Sep 1997 15:58:50 -0400
Message-ID: <byvhzsfd3f.fsf@midget.math.ethz.ch>
Lines: 30
X-Mailer: Gnus v5.4.55/XEmacs 19.15

Colin Rafferty <craffert@ml.com> writes:

> [1.1  <text/plain; US-ASCII (7bit)>]
> Now that I have started using it, I have found a bug.

Thanks. Feel free to hack around with it. 

> The function `lazy-shot-shot-function' does its work in the current
> buffer rather than the one on which the extent exists.  Since I am not
> familiar at all with the C code,

The C code has no idea of the current buffer at the time. Moreover it
just sends of an eval event. Therefore as you noticed, the exent
buffer must be set by the one-shot function.

> I decided to fix this in the Lisp using 
> `with-current-buffer'.

Since the shot-function already uses save-excursion it is may be
easier (anf faster) just to use an explicit set-buffer.

> Should a one-shot function be called with the buffer of the extent the
> current buffer?  I think so, but as I said, I have no idea how the C
> code works.

It would be a complication (the current C code part is extremely
simple) and as you saw the information is available to do it at lisp level.

Jan

