[comp.emacs] Is point in regexp -- My earlier mail went astray.

huxtable@UKANVAX.BITNET (John L. Huxtable) (07/15/88)

From:   KUHUB::HUXTABLE     "John L. Huxtable" 14-JUL-1988 08:52
To:     NET%"mcvax!inria.inria.fr!shapiro@UUNET.UU.NET",HUXTABLE
Subj:   RE: Function needed: is point within regexp?

> Date:         Thu, 7 Jul 88 08:59:22 +0200
> From:         Marc Shapiro <mcvax!inria.inria.fr!shapiro@UUNET.UU.NET>
> Subject:      Function needed: is point within regexp?
>
> I am hacking a new, much-improved bibtex-mode for GNU Emacs.  For
> this, I need a function which checks if point is *within* a certain
> regular expression.

Yes, there is a better way.  The functions (match-beginning COUNT)
and (match-end COUNT) return the positions matched by the beginning and
end of the last regexp searched for.  The arg COUNT should be 0 to match
the entire regexp, 1 to match the text matched by \1, etc.  This exists
in EMACS 18.50.  I don't know the earliest version it came with.

Yours,
  John L. Huxtable
  Computing Services
  The University of Kansas
  huxtable@kuhub.cc.ukans.edu
  huxtable@ukanvax.bitnet