all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: Discrepancy in definition/use of match-data?
Date: 14 Jun 2004 11:05:42 +0200	[thread overview]
Message-ID: <x5r7si4ihl.fsf@lola.goethe.zz> (raw)
In-Reply-To: <87vfhu20el.fsf@tleepslib.sk.tsukuba.ac.jp>

"Stephen J. Turnbull" <stephen@xemacs.org> writes:

> >>>>> "rms" == Richard Stallman <rms@gnu.org> writes:
> 
>     rms> sjt writes:
> 
>     On the other hand, pretty much any time any Lisp code intervenes
>     between the return of the matching function and entry to the match
>     data access there is an opportunity for a hook or handler to be
>     called.
> 
>     rms> That is rather an exaggeration.
> 
> Exaggeration, sure.  But it contains a kernel of truth.

Those things that run in hooks/handlers/whatever need to get wrapped
in save-match-data, anyway.

>     rms> Most of the Lisp functions described in the manual cannot
>     rms> call any hook.
> 
> True, but not relevant unless you know which ones they are.

> Offhand, I don't, and the docstrings/source comments are less than
> 100% reliable.

Where the docstrings are not reliable, they need to get amended,
obviously.

> Anyway, I've implemented a last-match-succeeded flag (for debug
> usage only) and check it in match_limits and Fmatch_data (when
> XEmacs is configured for error-checking).  If we catch anything that
> looks relevant to GNU Emacs I'll report it here.

Anyway, the args-out-of-range error that now gets thrown gives a
basically completely irrelevant second value (with regard to
identifying the error.  Actually, the first value is also irrelevant
unless it is negative).  Could one replace that second value with the
function causing the error instead, or would that be inconsistent with
any known error handlers?

Or should one throw a different error altogether in the case where
match-data is called without a valid match ever having been done?
Which one?  As I said already, I have no clue about the error handling
conventions.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

  reply	other threads:[~2004-06-14  9:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-09 15:37 Discrepancy in definition/use of match-data? David Kastrup
2004-06-10 23:01 ` Richard Stallman
2004-06-10 23:56   ` David Kastrup
2004-06-11  8:34     ` Stephen J. Turnbull
2004-06-11  8:54       ` David Kastrup
2004-06-12  6:45         ` Stephen J. Turnbull
2004-06-12  9:03           ` David Kastrup
2004-06-13  0:01           ` Richard Stallman
2004-06-14  5:06             ` Stephen J. Turnbull
2004-06-14  9:05               ` David Kastrup [this message]
2004-06-14 10:05                 ` Stephen J. Turnbull
2004-06-16  7:13               ` Stephen J. Turnbull
2004-06-19  3:19                 ` Richard Stallman
2004-06-23  9:53                   ` Stephen J. Turnbull
2004-06-19  3:19                 ` Richard Stallman
2004-06-12  1:51     ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=x5r7si4ihl.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.