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 [EMAIL PROTECTED] @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
_______________________________________________
Emacs-diffs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-diffs