emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lispref/searching.texi


From: Richard M . Stallman
Subject: [Emacs-diffs] Changes to emacs/lispref/searching.texi
Date: Wed, 08 Jun 2005 11:34:13 -0400

Index: emacs/lispref/searching.texi
diff -c emacs/lispref/searching.texi:1.57 emacs/lispref/searching.texi:1.58
*** emacs/lispref/searching.texi:1.57   Thu Mar 17 23:28:42 2005
--- emacs/lispref/searching.texi        Wed Jun  8 15:34:13 2005
***************
*** 1486,1497 ****
  write the entire match data, all at once.
  
  @defun match-data &optional integers reuse
! This function returns a newly constructed list containing all the
! information on what text the last search matched.  Element zero is the
! position of the beginning of the match for the whole expression; element
! one is the position of the end of the match for the expression.  The
! next two elements are the positions of the beginning and end of the
! match for the first subexpression, and so on.  In general, element
  @ifnottex
  number address@hidden
  @end ifnottex
--- 1486,1498 ----
  write the entire match data, all at once.
  
  @defun match-data &optional integers reuse
! This function returns a list of positions (markers or integers) that
! record all the information on what text the last search matched.
! Element zero is the position of the beginning of the match for the
! whole expression; element one is the position of the end of the match
! for the expression.  The next two elements are the positions of the
! beginning and end of the match for the first subexpression, and so on.
! In general, element
  @ifnottex
  number address@hidden
  @end ifnottex
***************
*** 1508,1522 ****
  @end tex
  corresponds to @code{(match-end @var{n})}.
  
! All the elements are markers or @code{nil} if matching was done on a
! buffer and all are integers or @code{nil} if matching was done on a
! string with @code{string-match}.   If @var{integers} is
! address@hidden, then the elements are integers or @code{nil}, even if
! matching was done on a buffer.  In that case, the buffer itself is
! appended as an additional element at the end of the list
! to facilitate complete restoration of the match data.  Also,
! @code{match-beginning} and
! @code{match-end} always return integers or @code{nil}.
  
  If @var{reuse} is address@hidden, it should be a list.  In that case,
  @code{match-data} stores the match data in @var{reuse}.  That is,
--- 1509,1521 ----
  @end tex
  corresponds to @code{(match-end @var{n})}.
  
! Normally all the elements are markers or @code{nil}, but if
! @var{integers} is address@hidden, that means to use integers instead
! of markers.  (In that case, the buffer itself is appended as an
! additional element at the end of the list, to facilitate complete
! restoration of the match data.)  If the last match was done on a
! string with @code{string-match}, then integers are always used,
! since markers can't point into a string.
  
  If @var{reuse} is address@hidden, it should be a list.  In that case,
  @code{match-data} stores the match data in @var{reuse}.  That is,
***************
*** 1524,1531 ****
  have the right length.  If it is not long enough to contain the match
  data, it is extended.  If it is too long, the length of @var{reuse}
  stays the same, but the elements that were not used are set to
! @code{nil}.  The purpose of this feature is to avoid producing too
! much garbage, that would later have to be collected.
  
  As always, there must be no possibility of intervening searches between
  the call to a search function and the call to @code{match-data} that is
--- 1523,1530 ----
  have the right length.  If it is not long enough to contain the match
  data, it is extended.  If it is too long, the length of @var{reuse}
  stays the same, but the elements that were not used are set to
! @code{nil}.  The purpose of this feature is to reduce the need for
! garbage collection.
  
  As always, there must be no possibility of intervening searches between
  the call to a search function and the call to @code{match-data} that is




reply via email to

[Prev in Thread] Current Thread [Next in Thread]