Function: c-search-forward-char-property

c-search-forward-char-property is a macro defined in cc-defs.el.gz.

Signature

(c-search-forward-char-property PROPERTY VALUE &optional LIMIT)

Documentation

Search forward for a text-property PROPERTY having value VALUE.

LIMIT bounds the search. The comparison is done with equal.

Leave point just after the character, and set the match data on this character, and return point. If VALUE isn't found, Return nil; point is then left undefined.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/cc-defs.el.gz
(defmacro c-search-forward-char-property (property value &optional limit)
  "Search forward for a text-property PROPERTY having value VALUE.
LIMIT bounds the search.  The comparison is done with `equal'.

Leave point just after the character, and set the match data on
this character, and return point.  If VALUE isn't found, Return
nil; point is then left undefined."
  (declare (debug t))
  `(let ((place (point)))
     (while
	 (and
	  (< place ,(or limit '(point-max)))
	  (not (equal (c-get-char-property place ,property) ,value)))
       (setq place (c-next-single-property-change
		    place ,property nil ,(or limit '(point-max)))))
     (when (< place ,(or limit '(point-max)))
       (goto-char place)
       (search-forward-regexp "\\(\n\\|.\\)")	; to set the match-data.
       (point))))