emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Richard M . Stallman
Subject: [Emacs-diffs] Changes to emacs/lispref/display.texi
Date: Thu, 25 Aug 2005 07:04:38 -0400

Index: emacs/lispref/display.texi
diff -c emacs/lispref/display.texi:1.182 emacs/lispref/display.texi:1.183
*** emacs/lispref/display.texi:1.182    Mon Aug 22 21:31:54 2005
--- emacs/lispref/display.texi  Thu Aug 25 11:04:38 2005
***************
*** 1501,1518 ****
  @code{(point-min)}.
  @end defun
  
!   Here's an easy way to use @code{next-overlay-change} to search for the
! next character which gets a address@hidden @code{happy} property from
  either its overlays or its text properties (@pxref{Property Search}):
  
  @smallexample
  (defun find-overlay-prop (prop)
    (save-excursion
      (while (and (not (eobp))
!                 (not (get-char-property (point) 'happy)))
        (goto-char (min (next-overlay-change (point))
!                       (next-single-property-change (point) 'happy))))
      (point)))
  @end smallexample
  
  @node Width
--- 1501,1524 ----
  @code{(point-min)}.
  @end defun
  
!   Here's a function which uses @code{next-overlay-change} to search
! for the next character which gets a given property @code{prop} from
  either its overlays or its text properties (@pxref{Property Search}):
  
  @smallexample
  (defun find-overlay-prop (prop)
    (save-excursion
      (while (and (not (eobp))
!                 (not (get-char-property (point) prop)))
        (goto-char (min (next-overlay-change (point))
!                       (next-single-property-change (point) prop))))
      (point)))
+ @end smallexample
+ 
+   Now you can search for a @code{happy} property like this:
+ 
+ @smallexample
+ (find-overlay-prop 'happy)
  @end smallexample
  
  @node Width




reply via email to

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