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 [emacs-unicode-2]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lispref/searching.texi [emacs-unicode-2]
Date: Wed, 29 Sep 2004 03:44:57 -0400

Index: emacs/lispref/searching.texi
diff -c emacs/lispref/searching.texi:1.44.2.4 
emacs/lispref/searching.texi:1.44.2.5
*** emacs/lispref/searching.texi:1.44.2.4       Sat Jul 17 02:46:47 2004
--- emacs/lispref/searching.texi        Wed Sep 29 07:22:16 2004
***************
*** 975,980 ****
--- 975,1006 ----
  @end example
  @end defun
  
+ @defun looking-back regexp &optional limit
+ This function returns @code{t} if @var{regexp} matches text before
+ point, ending at point, and @code{nil} otherwise.
+ 
+ Because regular expression matching works only going forward, this is
+ implemented by searching backwards from point for a match that ends at
+ point.  That can be quite slow if it has to search a long distance.
+ You can bound the time required by specifying @var{limit}, which says
+ not to search before @var{limit}.  In this case, the match that is
+ found must begin at or after @var{limit}.
+ 
+ @example
+ @group
+ ---------- Buffer: foo ----------
+ I read "@point{}The cat in the hat
+ comes back" twice.
+ ---------- Buffer: foo ----------
+ 
+ (looking-back "read \"" 3)
+      @result{} t
+ (looking-back "read \"" 4)
+      @result{} nil
+ @end group
+ @end example
+ @end defun
+ 
  @node POSIX Regexps
  @section POSIX Regular Expression Searching
  




reply via email to

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