| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
To illustrate usage, here is a Lisp function that returns a list of the overlays that specify property prop for the character at point:
(defun find-overlays-specifying (prop)
(let ((overlays (overlays-at (point)))
found)
(while overlays
(let ((overlay (car overlays)))
(if (overlay-get overlay prop)
(setq found (cons overlay found))))
(setq overlays (cdr overlays)))
found))
|
Here's an easy way to use next-overlay-change to search for the
next character which gets a non-nil happy property from
either its overlays or its text properties (see section 32.19.3 Text Property Search Functions):
(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)))
|
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |